Locations

  • Name
    id
    Type
    string
    Description

    Unique identifier of the location.

  • Name
    name
    Type
    string
    Description

    The name of the location.

  • Name
    reference
    Type
    string
    Description

    The reference of the location.

  • Name
    address
    Type
    string
    Description

    The address of the location.

    • Name
      postalCode
      Type
      string
      Description

      The postal code of the address.

    • Name
      country
      Type
      string
      Description

      The country of the address.

    • Name
      city
      Type
      string
      Description

      The city of the address.

    • Name
      route
      Type
      string
      Description

      The route of the address.

    • Name
      streetNumber
      Type
      string
      Description

      The street number of the address.

    • Name
      lat
      Type
      number
      Description

      The Latitude of the address.

    • Name
      lng
      Type
      number
      Description

      The Longitude of the address.

    • Name
      zone
      Type
      string
      Description

      The Zone of the address.

    • Name
      fullAddress
      Type
      string
      Description

      The Full address of the address.

  • Name
    fields
    Type
    array
    Description

    The custom fields of locations.


GET/api/v3.0/locations

Location List

This endpoint allows you to retrieve a list of locations.

Optional parameters

  • Name
    cursor
    Type
    string
    Description

    Cursor to paginate the results.

Request

GET
/api/v3.0/locations
curl -G https://api.bob-desk.com/api/v3.0/locations \
  -H "Authorization: Bearer {token}" \
  -d cursor="6810ec7f43b86349e1756b49" \

Response

{
"cursor": "6810ec7f43b86349e1756b49",
"locations": [
    {
        "id": "5d7e3cb4101e1d004be4c378",
        "name": "zShop 3",
        "address": {
            "postalCode": "75008",
            "country": "France",
            "city": "Paris",
            "route": "Avenue des Champs-Élysées",
            "streetNumber": "110",
            "fullAddress": "110 Av. des Champs-Élysées, 75008 Paris, France",
            "zone": "75",
            "lat": 48.8722455,
            "lng": 2.2996826
        },
        "reference": "",
        "fields": [{
            "field_id": "63826f259ab7e54a4fb4ae69",
            "name": {
                "fr": "Surface"
            }
            "value": "1340"
        }]
    }]
}

GET/api/v3.0/locations/:id

Read Location

This endpoint allows you to retrieve a specific location by its ID.

Path parameters

  • Name
    id
    Type
    string
    Description

    Unique identifier of the location to retrieve.

Request

GET
/api/v3.0/locations/:id
curl https://api.bob-desk.com/api/v3.0/locations/5d91bc72038b500034223bef \
  -H "Authorization: Bearer {token}"

POST/api/v3.0/locations

Create location

This endpoint allows you to create a location.

Required parameters

  • Name
    name
    Type
    string
    Description

    Name of the location.

Optional parameters

  • Name
    reference
    Type
    string
    Description

    The reference of the location.

  • Name
    address
    Type
    string
    Description

    The address of the location.

      Required address parameters

    • Name
      postalCode
      Type
      string
      Description

      The postal code of the address.

    • Name
      country
      Type
      string
      Description

      The country of the address.

    • Name
      city
      Type
      string
      Description

      The city of the address.

    • Name
      route
      Type
      string
      Description

      The route of the address.

    • Name
      streetNumber
      Type
      string
      Description

      The street number of the address.

    • Optional address parameters

    • Name
      lat
      Type
      number
      Description

      The Latitude of the address.

    • Name
      lng
      Type
      number
      Description

      The Longitude of the address.

    • Name
      zone
      Type
      string
      Description

      The Zone of the address. [ If not provided by the user, the zone is automatically derived from the first two digits of the postal code. ]

    • Name
      fullAddress
      Type
      string
      Description

      The Full address of the address. [ If not provided by the user, the full address is automatically generated in the following format: "streetNumber route, postalCode city, country". ]

  • Name
    fields
    Type
    array
    Description

    The custom fields of locations.

Request

POST
/api/v3.0/locations
curl -X https://api.bob-desk.com/api/v3.0/locations \
  -H "Content-Type: application/json"
  -H "Authorization: Bearer {token}" \
  -d '{
        "name": "Xing Fu tang",
        "address": {
            "postalCode": "75013",
            "country": "France",
            "city": "Paris",
            "route": "Avenue des Choisy",
            "streetNumber": "63",
            "lat": 48.787344,
            "lng": 3.1990867,
            "zone": "75",
            "fullAddress": "63 Avenue des Choisy, 75013 Paris, France"
        },
        "reference": "2716",
        "fields": [{
            "field_id": "63826f259ab7e54a4fb4ae69",
            "value": "1240"
        }]
    }'

Response

  {
    "id": "6819d704bc0c0668353cdf25",
    "name": "Xing Fu tang",
    "reference": null,
    "address": {
      "postalCode": "75013",
      "country": "France",
      "city": "Paris",
      "route": "Avenue des Choisy",
      "streetNumber": "63",
      "lat": 48.787344,
      "lng": 3.1990867,
      "zone": "75",
      "fullAddress": "63 Avenue des Choisy, 75013 Paris, France"
    },
    "fields": [{
      "field_id": "63826f259ab7e54a4fb4ae69",
      "name": {
          "fr": "Surface"
      }
      "value": "1240"
    }]
  }