Create a pickup point
POST/v1/company/pickup-points
scope company.write
Address rules apply exactly as they do for a delivery: the street must contain a number, the postal code must fit the country and county, and the country must be one you sell into. Get city_id from GET /v1/geo/cities. The first point you create becomes the default.
Request body#
| Field | Type | Required | Description |
|---|---|---|---|
label | string | required | Your name for this location, shown when you pick where an order ships from. |
country_code | string | required | ISO-2. Must be a country you sell into (country_not_found / country_not_supported). |
city_id | integer | required | From GET /v1/geo/cities. An id we do not know gives city_not_found. Free-text city names are not accepted — the courier needs our id. |
street | string | required | Street and number. Validated in the same format the checkout enforces, so an address that would fail there fails here instead of at the moment a courier is booked. |
postal_code | string | required | Checked against the format for that country and county. Note this is a FORMAT check, not a lookup against a list of real codes — a well-formed code that does not exist is accepted here and will be caught by the courier. |
contact_phone | string | required | Who the courier calls at this address. Include the country prefix. |
contact_email | string | required | Must be a valid address. All seven fields are required on CREATE; on update send only what changes. |
Example
{
"label": "Barcelona warehouse",
"country_code": "ES",
"city_id": 665904,
"street": "Carrer Gran 42",
"postal_code": "08001",
"contact_phone": "+34600000000",
"contact_email": "[email protected]"
}Response#
| Field | Type | Description |
|---|---|---|
id | integer | The pickup point id. |
label | string | Your name for it. |
type | string|null | What kind of location it is. |
address | object | Where it is. This is a real collection address a courier will drive to. |
address. | string|null | Street and number. |
address. | string|null | City name, as the courier holds it. |
address. | string|null | County name. |
address. | string|null | Postal code. |
address. | string|null | ISO-2. |
contact | object | Who the courier calls here. |
contact. | string|null | Phone. |
contact. | string|null | Email. |
is_default | boolean | Whether orders collect from here unless told otherwise. |
is_active | boolean | Whether it can currently be used. |
Example
{
"id": 11,
"label": "Barcelona warehouse",
"type": "warehouse",
"address": {
"street": "Carrer Gran 42",
"city": "Barcelona",
"county": "Barcelona",
"postal_code": "08001",
"country_code": "ES"
},
"contact": {
"phone": "+34600000000",
"email": "[email protected]"
},
"is_default": true,
"is_active": true
}