Skip to main content

Create Delivery Order

POST {{base_url}}/delivery-orders

Description

This API endpoint is used to create a new delivery order.

Request

Headers:

NameDescription
tenantIdA string identifying the tenant.
countryCodeA string representing the country code.

Request Body:

{
"shippingFeeRequestId": "string",
"orderReference": "string",
"pickupLocation": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string"
},
"dropOffLocation": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string"
},
"dropOffContact": "string",
"pickupContact": "string",
"pickupEmail": "string",
"dropOffEmail": "string",
"shippingFee": 0,
"items": [
{
"id": 0,
"name": "string",
"paid": true,
"price": 1,
"quantity": 1,
"weight": 1
}
]
}

  • JSON Example:
{
"shippingFeeRequestId": "req123",
"orderReference": "ord123",
"pickupLocation": {
"latitude": 37.7749,
"longitude": -122.4194,
"address": "123 Main St, City, State",
"userId": "user123"
},
"dropOffLocation": {
"latitude": 34.0522,
"longitude": -118.2437,
"address": "456 Elm St, City, State",
"userId": "user456"
},
"dropOffContact": "John Doe",
"pickupContact": "Jane Smith",
"pickupEmail": "jane@example.com",
"dropOffEmail": "john@example.com",
"shippingFee": 10.99,
"items": [
{
"id": 1,
"name": "Item 1",
"paid": true,
"price": 9.99,
"quantity": 2,
"weight": 0.5
}
]
}

Responses:

  • 201 Created:
{
"status": true,
"statusCode": 0,
"message": "Delivery order created.",
"data": {},
"errors": []
}

  • 400 Bad Request:
{
"status": false,
"statusCode": 400,
"message": "Invalid request.",
"errors": [
{
"message": "Invalid request.",
"descriptiveMessage": "The request is invalid. Please check the provided data."
}
]
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /delivery-orders \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!