Locations
Create a location
Create a location in the authorized organization. Aggregation isn’t available for locations.
POST
/
v2
/
organizations
/
{organization_id}
/
locations
curl --request POST \
--url https://api.flexxible.net/v2/organizations/{organization_id}/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "HQ",
"address": "Calle Ejemplo 1",
"latitude": 41.3874,
"longitude": 2.1686
}
'{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "HQ",
"address": "Calle Ejemplo 1",
"latitude": 41.3874,
"longitude": 2.1686,
"organization_id": "507f1f77bcf86cd799439011"
}{
"error": {
"message": "Cuerpo de solicitud inválido",
"code": "bad_request",
"details": "name, latitude y longitude son obligatorios y deben cumplir el formato esperado."
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization identifier.
Required string length:
24Pattern:
^[0-9a-f]{24}$Body
application/json
Response
Location created successfully.
Location Id (FWS Location.Oid).
Location name.
Location address.
Location latitude.
Location longitude.
Associated Portal organization Id.
Required string length:
24Pattern:
^[0-9a-f]{24}$⌘I
curl --request POST \
--url https://api.flexxible.net/v2/organizations/{organization_id}/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "HQ",
"address": "Calle Ejemplo 1",
"latitude": 41.3874,
"longitude": 2.1686
}
'{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "HQ",
"address": "Calle Ejemplo 1",
"latitude": 41.3874,
"longitude": 2.1686,
"organization_id": "507f1f77bcf86cd799439011"
}{
"error": {
"message": "Cuerpo de solicitud inválido",
"code": "bad_request",
"details": "name, latitude y longitude son obligatorios y deben cumplir el formato esperado."
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}