Create Order
Creates an order on the Stream system from a quote estimate.
Endpoint
POST /orders
Description
Creates an order on the Stream system. If you will be uploading files such as the commercial invoice or materials safety data sheet, you can use a 'multipart/form-data' request body type instead.
Request Body
Required Fields
| Field | Type | Description |
|---|---|---|
order.origin_address | object | Origin address details |
order.destination_address | object | Destination address details |
order.pickup_instructions | string | Additional pickup information |
order.purpose_of_shipment_id | integer | Purpose of shipment ID |
order.quote_estimate_id | integer | ID of the quote estimate to create order from |
order.customer_reference | string | Customer reference number |
order.description_of_contents | string | Description of package contents |
Optional Fields
| Field | Type | Description |
|---|---|---|
order.hs_codes | array | Array of HS code objects for customs |
order.broker_address | object | Broker address details |
order.importer_of_record_address | object | Importer of record address |
order.clearance_detail | object | Clearance details including invoice number |
Address Object Structure
{
"name": "My House",
"company": "Company Name",
"address_1": "5 Open Street",
"address_2": "Melrose Arch",
"city": "Johannesburg",
"province": "Gauteng",
"postal_code": "1610",
"country_id": 226,
"email": "example@stream.com",
"phone": "+27825547358",
"classification": "residential",
"import_code": "GB000000000000",
"export_code": "12345678"
}
HS Code Object Structure
{
"code": "100322",
"cost": "100",
"description": "networking equipment",
"quantity": 5,
"weight": 1.1,
"eccn": "12345",
"country_id": 5
}
Request Example
curl -X POST \
https://stream-orders-api-sandbox.herokuapp.com/client_api/v2/orders \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"order": {
"origin_address": {
"name": "John",
"company": "Tech Corp",
"address_1": "123 Tech Street",
"city": "Johannesburg",
"province": "Gauteng",
"postal_code": "2196",
"country_id": 226,
"email": "john@example.com",
"phone": "+27123456789",
"classification": "business",
"export_code": "12345678"
},
"destination_address": {
"name": "Jane Smith",
"company": "UK Business",
"address_1": "456 London Road",
"city": "London",
"province": "London",
"postal_code": "SW1A 2AA",
"country_id": 70,
"email": "jane@ukbusiness.com",
"phone": "+442012345678",
"classification": "business",
"import_code": "GB000000000000"
},
"pickup_instructions": "Please call 30 minutes before arrival",
"purpose_of_shipment_id": 8,
"quote_estimate_id": 5,
"customer_reference": "REF001",
"description_of_contents": "Networking Equipment",
"hs_codes": [
{
"code": "100322",
"cost": "100",
"description": "networking equipment",
"quantity": 5,
"weight": 1.1,
"eccn": "12345",
"country_id": 5
}
],
"clearance_detail": {
"reason_for_shipment_id": 1,
"invoice_number": "INV001",
"purchase_order_number": "PO001"
}
}
}'
Success Response (201 Created)
{
"order": {
"id": 12345,
"assigned_admin": "admin@example.com",
"battery_declaration_link": "",
"broker_address": null,
"ccd_status": "ccd_not_required",
"commercial_invoice_link": "",
"company_id": 789,
"created_at": "2025/08/04 11:48:40 UTC",
"customer_reference": "CUST-REF-001",
"customs_clearance_document_link": "",
"date_delivered": null,
"description_of_contents": "Electronic Components",
"destination_address": {
"id": 54321,
"address_1": "456 London Road",
"address_2": null,
"address_3": null,
"city": "London",
"classification": "business",
"company": "UK Business",
"country": {
"id": 70,
"default_postal_code": null,
"dhl_export_code": "GB",
"dhl_import_code": "GB",
"dhl_tax_code": "GB",
"export_code_label": "EORI Number",
"import_code_label": "Import Code",
"iso_code_2": "GB",
"iso_code_3": "GBR",
"name": "United Kingdom",
"postal_code_required": true,
"tax_number_label": "VAT Number",
"taxes_and_duties_config": {
"id": 101,
"minimum_value_of_goods": 800.0,
"minimum_value_of_goods_currency_id": "GBP"
},
"vat_rate": 0.20
},
"country_id": 70,
"email": "jane@ukbusiness.com",
"import_code": "GB000000000000",
"latitude": 51.5074,
"longitude": -0.1278,
"name": "Jane Smith",
"phone": "+442012345678",
"postal_code": "SW1A 2AA",
"province": "London",
"summary": "United Kingdom",
"tax_number": null,
"time_zone_id": "Europe/London"
},
"draft_bill_of_lading_link": "",
"eei_eligible": true,
"eei_request_document_link": "",
"export_permit_link": "",
"final_bill_of_lading_link": "",
"importer_of_record_address": null,
"internal_transaction_number": "TXN987654321",
"invoice_data": null,
"invoice_number": null,
"materials_safety_data_sheet_link": "",
"measured_weight": null,
"origin_address": {
"id": 22222,
"address_1": "123 Tech Street",
"address_2": null,
"address_3": null,
"city": "Johannesburg",
"classification": "business",
"company": "Tech Corp",
"country": {
"id": 226,
"default_postal_code": "0000",
"dhl_export_code": "ZA",
"dhl_import_code": "ZA",
"dhl_tax_code": "ZA",
"export_code_label": "Export Number",
"import_code_label": "Import Code",
"iso_code_2": "ZA",
"iso_code_3": "ZAF",
"name": "South Africa",
"postal_code_required": true,
"tax_number_label": "VAT Number",
"taxes_and_duties_config": {
"id": 150,
"minimum_value_of_goods": 500.0,
"minimum_value_of_goods_currency_id": "USD"
},
"vat_rate": 0.15
},
"country_id": 226,
"email": "john@example.com",
"import_code": null,
"latitude": -26.2041,
"longitude": 28.0473,
"name": "John Doe",
"phone": "+27123456789",
"postal_code": "2196",
"province": "Gauteng",
"summary": "South Africa",
"tax_number": null,
"time_zone_id": "Africa/Johannesburg"
},
"packaging_list_link": "",
"pickup_date": "2024-03-20",
"pickup_instructions": "Please call 30 minutes before arrival",
"proof_of_delivery_link": "",
"purpose_of_shipment_id": 8,
"quote_id": 999888,
"reference_number": "SHIP-2024-001",
"scheduled_pickup": "",
"send_consignee_tracking_details": true,
"shippers_letter_of_instruction_link": "",
"status": "order_received",
"stream_packing_list_link": "",
"tracking_link": null,
"value_of_goods": 600.0,
"value_of_goods_currency": "ZAR",
"waybill": null,
"waybill_document_link": ""
}
}
Error Responses
400 Bad Request
{
"success": false,
"error": "Invalid input, object invalid"
}
429 Rate Limit Exceeded
{
"success": false,
"error": "Too many requests (20/20 in 60 seconds)"
}
Important Notes
- Orders are created from existing quote estimates
- You must have a valid
quote_estimate_idfrom a previously created quote - All required address fields must be provided
- HS codes are required for international shipments
- The order will initially have status "order_received"
- A waybill must be generated separately using the waybill endpoint