Skip to main content

Create a new order

POST 

/api/orders

Creates a shipping order, generates the shipping label and deducts the cost from the prepaid balance.

Before creating the order, get these IDs:

Order fieldWhere it comes fromResponse field
branchInfo.branchAddressId (pickup address)GET /api/branchs/branchsAddresses, or the one returned by POST /api/branchs/branchsAddresses when creating itbranchAddressId
branchInfo.branchsClientId (client and delivery address)GET /api/branchs/branchsClient or GET /api/branchs/branchsClient/search, or the one returned by POST /api/branchs/branchsClient when registering itbranchsClientId
courier.courierServiceId (courier and service)POST /api/courier (quote), sending the pickup address and the client's municipalitycourierServiceId
courier.agencias (optional)GET /api/courier/agencies, only if the courier works with agenciesAgency ID

The delivery address is not sent separately: it is the one registered for the client.

Validation is done by section (branchInfo, courier, location, product, order) and the first error found is reported.

Request​

Responses​

Order created successfully