[POST] Create an order#

Creates shipment orders.

POST https://BASE_URL/api/v1/orders/submit-order/

Note

In the examples, BASE_URL is the base URL of your environment, for example https://api.alphaaugmented.com. See Base URLs for the complete list.

Requires Authentication.

Choose a request body#

This endpoint accepts one JSON object. The fields you can send depend on transportation_mode. There are two body definitions:

Mode

What you send

Reference

Air, OceanLCL, TruckLTL

SKUs in shipment_skus, which ALPHA palletizes

Air, LCL, and LTL

OceanFCL, TruckFTL

Containers required. ALPHA can palletize SKUs and also accept prepacked cargo (pre-built pallets and loose boxes)

FCL and FTL

Note

Lanes must be onboarded (supplier, consignee, packaging, enabled mode). SKUs in shipment_skus must exist in the item master unless lane bypass is enabled. Wrong fields for a mode return 422.

Request#

Pick the tab that matches your transportation_mode.

{
  "shipper_name": "Supplier",
  "consignee_name": "Consignee",
  "transportation_mode": "Air",
  "reference": "REF-001",
  "shipment_skus": [
    { "item": "PRD-001", "quantity": 10 }
  ]
}
{
  "shipper_name": "Supplier",
  "consignee_name": "Consignee",
  "transportation_mode": "OceanLCL",
  "reference": "REF-001",
  "shipment_skus": [
    { "item": "PRD-001", "quantity": 10 }
  ]
}
{
  "shipper_name": "Supplier",
  "consignee_name": "Consignee",
  "transportation_mode": "TruckLTL",
  "reference": "REF-001",
  "shipment_skus": [
    { "item": "PRD-001", "quantity": 10 }
  ]
}
{
  "shipper_name": "Supplier",
  "consignee_name": "Consignee",
  "transportation_mode": "OceanFCL",
  "reference": "REF-001",
  "containers": [{ "code": "40ft" }],
  "shipment_skus": [
    { "item": "PRD-001", "quantity": 10 }
  ]
}
{
  "shipper_name": "Supplier",
  "consignee_name": "Consignee",
  "transportation_mode": "TruckFTL",
  "reference": "REF-001",
  "containers": [{ "code": "40ft" }],
  "shipment_skus": [
    { "item": "PRD-001", "quantity": 10 }
  ]
}

cURL (Air example):

curl https://BASE_URL/api/v1/orders/submit-order/ \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "shipper_name": "Supplier",
    "consignee_name": "Consignee",
    "transportation_mode": "Air",
    "reference": "REF-001",
    "shipment_skus": [{"item": "PRD-001", "quantity": 10}]
  }'

Response#

On success, use order_id with retrieve an order or list orders.

HTTP status

Description

201 Created

Order accepted and queued for optimization

200 OK

No lane yet for this supplier/consignee pair and skip_missing_lane is true. The order is accepted while the lane gets set up. Without the flag a missing lane returns 400 instead (see Errors).

{
  "message": "Order has been created and will be processed shortly",
  "order_id": 42
}
{
  "detail": "Your request has been received. A new lane is being set up and the packing instructions will be sent as soon as possible."
}

Errors#

HTTP status

Description

400 Bad Request

Validation failed (missing or invalid fields), or no matching lane was found and skip_missing_lane was not enabled

401 Unauthorized

Missing or invalid API key

403 Forbidden

Supplier or consignee not accessible with this API key

422 Unprocessable Entity

Business rule violation (mode, containers, or cargo)

{ "supplier_name": ["This field is required."] }
{
  "detail": "No lane was found for the provided supplier, consignee and transportation mode."
}
{ "detail": "Invalid API key." }
{
  "detail": "The specified consignee or supplier does not exist or you do not have permission to access their lanes."
}
{
  "order_containers": "Order container(s) are mandatory for ocean shipments."
}

See Troubleshooting for common resolutions.