Get Delivery
Retrieves a Delivery from Centelar, with its items and the location and state of each one.
GET /api/v2_2/delivery/<id>
Users that are not read-only can only retrieve deliveries of orders in their management unit.
This is the endpoint to call when a delivery_changed webhook is received.
Input Parameters
None
Response
| Name | Type | Description |
|---|---|---|
id |
integer |
Id of the delivery |
code |
string |
Code of the delivery in Centelar |
type |
string |
One of immediate, home_delivery, pickup, transfer or replenishment
|
state |
string |
Delivery state of the delivery as a whole |
state_date |
string |
When the delivery entered its current state |
order_id |
integer |
Id of the order the delivery belongs to |
order_ext_code |
string |
Id of the order in the source system, if any |
customer |
object |
The customer of the order |
consolidation_location |
object |
Location where the items are gathered before the delivery |
delivery_location |
object |
Location where the customer picks up the items, for pickup deliveries |
address |
object |
Shipping address |
desired_date, desired_time_range
|
string |
When the customer wants to receive the delivery |
confirmed_date, confirmed_time_range
|
string |
When the delivery was scheduled |
receiver_name, receiver_phone, receiver_email, receiver_dni
|
string |
Who receives the delivery |
items |
array |
The items of the delivery |
Each item has:
| Name | Type | Description |
|---|---|---|
id |
integer |
Id of the item, to be used with Receive Item and Item Status Change |
product_id, product_code, product_name
|
The product | |
quantity |
integer |
Units of the product |
state |
string |
Delivery state of the item |
state_date |
string |
When the item entered its current state |
stock_channel |
string |
Stock channel the item is taken from |
origin_location |
object |
Location the item was reserved at |
current_location |
object |
Location the item is at now |
next_location |
object |
Location the item has to go to next |
Fields without a value are not included in the response.
Response Sample
Status: 200 OK
{
"address": {
"city": "Ciudad Autónoma de Buenos Aires",
"complement": "7 b",
"country": "AR",
"disposition": "residential",
"number": "1233",
"postal_code": "1119",
"state": "Ciudad Autónoma de Buenos Aires",
"street": "Av Pueyrredón"
},
"code": "EN4180",
"consolidation_location": {
"id": 89,
"name": "Tortuguitas Warehouse"
},
"customer": {
"document": "28123123",
"id": 124179,
"is_corporate": false,
"name": "Pedro Perez"
},
"desired_date": "2023-11-21T00:00:00-0300",
"desired_time_range": "9 to 13",
"id": 434360354,
"items": [
{
"current_location": {
"id": 64,
"name": "Unicenter Store"
},
"id": 434360355,
"next_location": {
"id": 89,
"name": "Tortuguitas Warehouse"
},
"origin_location": {
"id": 64,
"name": "Unicenter Store"
},
"product_code": "162120",
"product_id": 10876,
"product_name": "Niles Glass Jewelry Box",
"quantity": 2,
"state": "ready_for_transfer",
"state_date": "2023-11-19T16:02:10-0300",
"stock_channel": "stores"
}
],
"order_ext_code": "1377470532923-01",
"order_id": 434360353,
"receiver_name": "Pedro Perez",
"receiver_phone": "+541164446444",
"state": "ready_for_transfer",
"state_date": "2023-11-19T16:02:10-0300",
"type": "home_delivery"
}