Locations

Manage a customer's locations.

Location

A location-object points to a physical location and functions as an address.

id
string <uuid>

Location identifier.

city
string [ 0 .. 255 ] characters

Name of location's city.

country
string or null <iso-3166-alpha-2>

A location's country expressed in two-letter code.

customer_id
string <uuid>

Identifier of the customer the address belongs to.

label
string [ 0 .. 255 ] characters

Location label.

number
string [ 0 .. 255 ] characters

Address number.

postal_code
string [ 0 .. 255 ] characters

Location's postal code.

street_name
string [ 0 .. 255 ] characters

Name of street.

{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "city": "Arnhem",
  • "country": "NL",
  • "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
  • "label": "Location Willemsplein",
  • "number": "3a",
  • "postal_code": "6811KA",
  • "street_name": "Willemsplein"
}

Retrieve locations

Retrieve a list of registered customer locations.

SecurityOAuth2 and ApiKey
Request
query Parameters
customer_id
string <uuid>

Filter locations by customer_id.

limit
integer <int32> [ 0 .. 1000 ]
Default: 25

Limits the amount of resources in result.

offset
integer <int64> >= 0
Default: 0

Offset of resources in result.

Responses
200

Successful response.

Response Schema: application/json
object >= 0 properties

Applied query parameters, including defaults.

limit
integer <int32> [ 0 .. 1000 ]
Default: 25

The applied value of the limit query parameter on the resources in result.

offset
integer <int64> >= 0
Default: 0

The applied value of the offset query parameter on the resources in result.

property name*
additional property
any
Array of objects (Location) >= 0 items

List of locations.

Array (>= 0 items)
id
string <uuid>

Location identifier.

city
string [ 0 .. 255 ] characters

Name of location's city.

country
string or null <iso-3166-alpha-2>

A location's country expressed in two-letter code.

customer_id
string <uuid>

Identifier of the customer the address belongs to.

label
string [ 0 .. 255 ] characters

Location label.

number
string [ 0 .. 255 ] characters

Address number.

postal_code
string [ 0 .. 255 ] characters

Location's postal code.

street_name
string [ 0 .. 255 ] characters

Name of street.

total
integer <int64>

Total number of resources matching provided query parameters.

default

An error occurred - see status code and problem response for more information.

get/v2/customers/locations
Response samples
application/json
{
  • "query": {
    },
  • "result": [
    ],
  • "total": 3255
}

Add location

Add a new customer location.

SecurityOAuth2 and ApiKey
Request
Request Body schema: application/json

The location you wish to add.

city
required
string [ 0 .. 255 ] characters

Name of location's city.

country
required
string or null <iso-3166-alpha-2>

A location's country expressed in two-letter code.

customer_id
required
string <uuid>

Identifier of the customer the address belongs to.

label
required
string [ 0 .. 255 ] characters

Location label.

number
string [ 0 .. 255 ] characters

Address number.

postal_code
required
string [ 0 .. 255 ] characters

Location's postal code.

street_name
required
string [ 0 .. 255 ] characters

Name of street.

Responses
201

Created.

Response Schema: application/json
id
string <uuid>

Location identifier.

city
string [ 0 .. 255 ] characters

Name of location's city.

country
string or null <iso-3166-alpha-2>

A location's country expressed in two-letter code.

customer_id
string <uuid>

Identifier of the customer the address belongs to.

label
string [ 0 .. 255 ] characters

Location label.

number
string [ 0 .. 255 ] characters

Address number.

postal_code
string [ 0 .. 255 ] characters

Location's postal code.

street_name
string [ 0 .. 255 ] characters

Name of street.

default

An error occurred - see status code and problem response for more information.

post/v2/customers/locations
Request samples
application/json
{
  • "city": "Arnhem",
  • "country": "NL",
  • "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
  • "label": "Location Willemsplein",
  • "number": "3a",
  • "postal_code": "6811KA",
  • "street_name": "Willemsplein"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "city": "Arnhem",
  • "country": "NL",
  • "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
  • "label": "Location Willemsplein",
  • "number": "3a",
  • "postal_code": "6811KA",
  • "street_name": "Willemsplein"
}

Retrieve a customer location

Retrieves a location by its identifier.

SecurityOAuth2 and ApiKey
Request
path Parameters
location-id
required
string <uuid>

The identifier of the location.

Responses
200

Successful response.

Response Schema: application/json
id
string <uuid>

Location identifier.

city
string [ 0 .. 255 ] characters

Name of location's city.

country
string or null <iso-3166-alpha-2>

A location's country expressed in two-letter code.

customer_id
string <uuid>

Identifier of the customer the address belongs to.

label
string [ 0 .. 255 ] characters

Location label.

number
string [ 0 .. 255 ] characters

Address number.

postal_code
string [ 0 .. 255 ] characters

Location's postal code.

street_name
string [ 0 .. 255 ] characters

Name of street.

default

An error occurred - see status code and problem response for more information.

get/v2/customers/locations/{location-id}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "city": "Arnhem",
  • "country": "NL",
  • "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
  • "label": "Location Willemsplein",
  • "number": "3a",
  • "postal_code": "6811KA",
  • "street_name": "Willemsplein"
}

Update location

Update a location by its identifier.

SecurityOAuth2 and ApiKey
Request
path Parameters
location-id
required
string <uuid>

The identifier of the location.

Request Body schema: application/json
required

The updated location.

city
required
string [ 0 .. 255 ] characters

Name of location's city.

country
required
string or null <iso-3166-alpha-2>

A location's country expressed in two-letter code.

label
required
string [ 0 .. 255 ] characters

Location label.

number
string [ 0 .. 255 ] characters

Address number.

postal_code
required
string [ 0 .. 255 ] characters

Location's postal code.

street_name
required
string [ 0 .. 255 ] characters

Name of street.

Responses
200

Successful response.

Response Schema: application/json
id
string <uuid>

Location identifier.

city
string [ 0 .. 255 ] characters

Name of location's city.

country
string or null <iso-3166-alpha-2>

A location's country expressed in two-letter code.

customer_id
string <uuid>

Identifier of the customer the address belongs to.

label
string [ 0 .. 255 ] characters

Location label.

number
string [ 0 .. 255 ] characters

Address number.

postal_code
string [ 0 .. 255 ] characters

Location's postal code.

street_name
string [ 0 .. 255 ] characters

Name of street.

default

An error occurred - see status code and problem response for more information.

put/v2/customers/locations/{location-id}
Request samples
application/json
{
  • "city": "Arnhem",
  • "country": "NL",
  • "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
  • "label": "Location Willemsplein",
  • "number": "3a",
  • "postal_code": "6811KA",
  • "street_name": "Willemsplein"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "city": "Arnhem",
  • "country": "NL",
  • "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
  • "label": "Location Willemsplein",
  • "number": "3a",
  • "postal_code": "6811KA",
  • "street_name": "Willemsplein"
}

Remove location

Remove a location by its identifier.

SecurityOAuth2 and ApiKey
Request
path Parameters
location-id
required
string <uuid>

The identifier of the location.

Responses
204

Successfully removed.

default

An error occurred - see status code and problem response for more information.

delete/v2/customers/locations/{location-id}
Response samples
application/problem+json

Returned when the request cannot be handled due to something that is perceived to be a client error.

{
  • "detail": "The request violates one or more constraints. Please resolve all of them and try again.",
  • "status": 400,
  • "title": "Bad request",
  • "type": "/problems/violations",
  • "violations": [
    ]
}