# List service locations List available locations for a given service code and country with optional postal code. If latitude and longitude are provided, the locations will be sorted by distance from the given coordinates. The supplied service code must be for a service that is location based, e.g. instabox pickup. Change. Endpoint: POST /v1/delivery/locations Version: 1.0.1 ## Request fields (application/json): - `serviceCode` (string) Example: "svc_instabox-locker-se" - `country` (string) Example: "SE" - `postalCode` (string) Example: "11350" - `latitude` (number) Example: 59.329323 - `longitude` (number) Example: 18.06858 - `limit` (integer) ## Response 200 fields (application/json): - `foo` (string) Example: "bar" - `forServiceCode` (string) Example: "svc_instabox-locker-se" - `forCountry` (string) Example: "SE" - `forPostalCode` (string) Example: "11350" - `forLatitude` (number) Example: 59.329323 - `forLongitude` (number) Example: 18.06858 - `locations` (array) - `locations.id` (string) Example: "loc_instabox-abc123def789" - `locations.name` (string) Example: "Odengatan 14 Spel & Tobak" - `locations.distance` (object) - `locations.distance.value` (number) Example: 10 - `locations.distance.unit` (string) Enum: "METERS", "KILOMETERS", "FEET", "MILES" ## Response 400 fields (application/json): - `code` (integer) Error code Example: 3 - `message` (string) Error message Example: "Request validation failed." - `details` (array) Error details containing additional information Example: [{"type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"name","description":"Name is required","reason":"REQUIRED_FIELD_MISSING"}]}] - `details.type` (string, required) A URL/resource name that uniquely identifies the type of error detail - `details.fieldViolations` (array) The field violations (if any), containing the field that violated the constraint and the reason for the violation - `details.fieldViolations.field` (string, required) The field that violated the constraint - `details.fieldViolations.description` (string) The description of the violation - `details.fieldViolations.reason` (string, required) The reason for the violation ## Response 404 fields (application/json): - `code` (integer) Error code Example: 3 - `message` (string) Error message Example: "Request validation failed." - `details` (array) Error details containing additional information Example: [{"type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"name","description":"Name is required","reason":"REQUIRED_FIELD_MISSING"}]}] - `details.type` (string, required) A URL/resource name that uniquely identifies the type of error detail - `details.fieldViolations` (array) The field violations (if any), containing the field that violated the constraint and the reason for the violation - `details.fieldViolations.field` (string, required) The field that violated the constraint - `details.fieldViolations.description` (string) The description of the violation - `details.fieldViolations.reason` (string, required) The reason for the violation ## Response default fields (application/json): - `code` (integer) Error code Example: 3 - `message` (string) Error message Example: "Request validation failed." - `details` (array) Error details containing additional information Example: [{"type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"name","description":"Name is required","reason":"REQUIRED_FIELD_MISSING"}]}] - `details.type` (string, required) A URL/resource name that uniquely identifies the type of error detail - `details.fieldViolations` (array) The field violations (if any), containing the field that violated the constraint and the reason for the violation - `details.fieldViolations.field` (string, required) The field that violated the constraint - `details.fieldViolations.description` (string) The description of the violation - `details.fieldViolations.reason` (string, required) The reason for the violation