curl --request POST \
--url https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collected_amount": 123,
"received_by": "<string>",
"outcome_reason": "<string>",
"items": [
{
"order_delivery_item_id": "<string>",
"delivered_quantity": 1
}
]
}
'import requests
url = "https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver"
payload = {
"collected_amount": 123,
"received_by": "<string>",
"outcome_reason": "<string>",
"items": [
{
"order_delivery_item_id": "<string>",
"delivered_quantity": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collected_amount: 123,
received_by: '<string>',
outcome_reason: '<string>',
items: [{order_delivery_item_id: '<string>', delivered_quantity: 1}]
})
};
fetch('https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collected_amount' => 123,
'received_by' => '<string>',
'outcome_reason' => '<string>',
'items' => [
[
'order_delivery_item_id' => '<string>',
'delivered_quantity' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver"
payload := strings.NewReader("{\n \"collected_amount\": 123,\n \"received_by\": \"<string>\",\n \"outcome_reason\": \"<string>\",\n \"items\": [\n {\n \"order_delivery_item_id\": \"<string>\",\n \"delivered_quantity\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collected_amount\": 123,\n \"received_by\": \"<string>\",\n \"outcome_reason\": \"<string>\",\n \"items\": [\n {\n \"order_delivery_item_id\": \"<string>\",\n \"delivered_quantity\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collected_amount\": 123,\n \"received_by\": \"<string>\",\n \"outcome_reason\": \"<string>\",\n \"items\": [\n {\n \"order_delivery_item_id\": \"<string>\",\n \"delivered_quantity\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"order_id": "<string>",
"customer_id": "<string>",
"customer_address_id": "<string>",
"address_snapshot": "<string>",
"status": "<string>",
"zone_id": "<string>",
"fee": 123,
"collect_on_delivery": true,
"amount_to_collect": 123,
"collected_amount": 123,
"driver_label": "<string>",
"trip_id": "<string>",
"trip_stop_id": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"outcome_reason": "<string>",
"received_by": "<string>",
"prepared_by_user_id": "<string>",
"prepared_at": "2023-11-07T05:31:56Z",
"delivered_by_user_id": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "<string>",
"order_delivery_id": "<string>",
"order_item_id": "<string>",
"quantity": 123,
"delivered_quantity": 123,
"undelivered_quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"order_item": {
"id": "<string>",
"stockable_id": "<string>",
"quantity": 123
}
}
]
}{
"message": "<string>",
"errors": {}
}Record a delivery as done
Records what was actually delivered, who received it and any amount collected. Marks it delivered, or partially delivered when fewer units than planned were delivered.
curl --request POST \
--url https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collected_amount": 123,
"received_by": "<string>",
"outcome_reason": "<string>",
"items": [
{
"order_delivery_item_id": "<string>",
"delivered_quantity": 1
}
]
}
'import requests
url = "https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver"
payload = {
"collected_amount": 123,
"received_by": "<string>",
"outcome_reason": "<string>",
"items": [
{
"order_delivery_item_id": "<string>",
"delivered_quantity": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collected_amount: 123,
received_by: '<string>',
outcome_reason: '<string>',
items: [{order_delivery_item_id: '<string>', delivered_quantity: 1}]
})
};
fetch('https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collected_amount' => 123,
'received_by' => '<string>',
'outcome_reason' => '<string>',
'items' => [
[
'order_delivery_item_id' => '<string>',
'delivered_quantity' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver"
payload := strings.NewReader("{\n \"collected_amount\": 123,\n \"received_by\": \"<string>\",\n \"outcome_reason\": \"<string>\",\n \"items\": [\n {\n \"order_delivery_item_id\": \"<string>\",\n \"delivered_quantity\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collected_amount\": 123,\n \"received_by\": \"<string>\",\n \"outcome_reason\": \"<string>\",\n \"items\": [\n {\n \"order_delivery_item_id\": \"<string>\",\n \"delivered_quantity\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/order/orders/{order}/deliveries/{delivery}/deliver")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collected_amount\": 123,\n \"received_by\": \"<string>\",\n \"outcome_reason\": \"<string>\",\n \"items\": [\n {\n \"order_delivery_item_id\": \"<string>\",\n \"delivered_quantity\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"order_id": "<string>",
"customer_id": "<string>",
"customer_address_id": "<string>",
"address_snapshot": "<string>",
"status": "<string>",
"zone_id": "<string>",
"fee": 123,
"collect_on_delivery": true,
"amount_to_collect": 123,
"collected_amount": 123,
"driver_label": "<string>",
"trip_id": "<string>",
"trip_stop_id": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"outcome_reason": "<string>",
"received_by": "<string>",
"prepared_by_user_id": "<string>",
"prepared_at": "2023-11-07T05:31:56Z",
"delivered_by_user_id": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "<string>",
"order_delivery_id": "<string>",
"order_item_id": "<string>",
"quantity": 123,
"delivered_quantity": 123,
"undelivered_quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"order_item": {
"id": "<string>",
"stockable_id": "<string>",
"quantity": 123
}
}
]
}{
"message": "<string>",
"errors": {}
}order_deliveries.deliver
Conditions
- The order must not be cancelled.
- The delivery must be ready (a draft, delivered, partially delivered or failed delivery cannot be delivered).
- Each listed item must belong to this delivery, and delivered_quantity cannot exceed the planned quantity. Items not listed are counted as fully delivered.
- At least one unit must be delivered; use the fail action otherwise.
- When fewer units than planned are delivered, outcome_reason is required.
- collected_amount is accepted only when the delivery is set to collect on delivery.
- Sets delivered_quantity on every item of the delivery.
- Sets the status to delivered or partially_delivered, and records the receiver, reason, collected amount (in minor units), the member who delivered and delivered_at.
- Units not delivered by a partial delivery become available to be planned in another delivery.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the order.
Identifier of the delivery, which must belong to the order in the path.
Body
Amount collected from the customer, in major units, not negative, with at most the company currency exponent decimals. Refused unless the delivery is set to collect on delivery. When omitted the stored value is kept.
Name of the person who received the goods, up to 255 characters. Optional.
255Reason for a partial delivery, up to 1000 characters. Required when fewer units than planned are delivered.
1000Delivered quantity per delivery item. When omitted, every item is counted as fully delivered.
Show child attributes
Show child attributes
Response
OrderDeliveryResource
Identifier of the delivery (27-character KSUID string).
Identifier of the order delivered.
Identifier of the order's customer, copied at creation. Null for an order without customer.
Identifier of the customer address chosen for the delivery. Null when a free-text address or the customer's stored address was used.
Delivery address as text, frozen at creation or at the last address change; later edits of the customer address do not change it. Set by the server.
draft (being prepared), ready (prepared, to ship), delivered, partially_delivered (reason required) or failed. Only draft can be edited; ready can go back to draft; delivered, partially_delivered and failed are final.
Identifier of the delivery zone whose fee was applied. Null when a free fee was given.
Delivery fee in major units of the company currency, copied from the zone at creation or the amount sent. 0 when none.
True when the driver collects money from the customer at delivery.
Amount the driver must collect, in major units. Null when not set or when collect_on_delivery is false.
Amount actually collected, in major units, recorded when the delivery is delivered or failed. Null until then.
Free-text name of the driver. Defaults to the trip's default driver label when a trip stop is given.
Identifier of the trip the delivery is attached to. Null when not on a trip.
Identifier of the stop of the trip for this delivery. Null when not on a trip.
Planned delivery date and time, ISO 8601. Null when not planned.
Reason given when the delivery is partial or failed. Null otherwise.
Name of the person who received the goods, as entered when recording the delivery. Null until then.
Identifier of the member who marked the delivery ready. Cleared when returned to draft.
Time the delivery was marked ready, ISO 8601. Cleared when returned to draft.
Identifier of the member who recorded the delivery outcome (delivered, partially delivered or failed).
Time the outcome was recorded, ISO 8601. Set for delivered, partially delivered and failed deliveries.
Creation time, ISO 8601.
Last update time, ISO 8601.
Order items carried by the delivery, with planned quantity, delivered quantity and undelivered quantity.
Show child attributes
Show child attributes