Skip to main content

Create Order

Create a new delivery order in Courimax.

POST /integrations/yango/orders

Request

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key
Content-TypeYesapplication/json
Idempotency-KeyNoUnique key for idempotent requests

Body Parameters

ParameterTypeRequiredDescription
pickupAddressstringYesPickup address
pickupLatnumberNo*Pickup latitude
pickupLngnumberNo*Pickup longitude
dropoffAddressstringYesDropoff address
dropoffLatnumberNo*Dropoff latitude
dropoffLngnumberNo*Dropoff longitude
recipientNamestringYesRecipient name
recipientPhonestringYesRecipient phone number
packageSizestringNo**small, medium, or large
externalRefstringYesYour unique order reference
weightKgnumberNo**Package weight in kilograms
temperatureClassstringNoAmbient, Chilled, or Frozen
deliveryMethodstringNomotorcycle, car, or refrigerated
deliveryZonestringNoDelivery zone name
geocodeOnIngestbooleanNoAuto-geocode addresses if coordinates missing
notesstringNoAdditional notes
deliveryWindowStartstringNoISO 8601 delivery window start
deliveryWindowEndstringNoISO 8601 delivery window end
codAmountnumberNoCash on delivery amount
expectedBarcodestringNoExpected package barcode
serviceTypestringNostandard, return, click_collect, locker, round

*Coordinates required unless geocodeOnIngest is true
**Either packageSize or weightKg is required

Examples

cURL

curl -X POST "https://api.courimax.com/api/integrations/yango/orders" \
-H "X-API-Key: cmx_your_api_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id-123" \
-d '{
"pickupAddress": "Rothschild Blvd 1, Tel Aviv",
"pickupLat": 32.0639,
"pickupLng": 34.7742,
"dropoffAddress": "Dizengoff Center, Tel Aviv",
"dropoffLat": 32.0753,
"dropoffLng": 34.7749,
"recipientName": "Jane Doe",
"recipientPhone": "+972501234567",
"packageSize": "small",
"externalRef": "YANGO-ORDER-123",
"notes": "Handle with care",
"deliveryWindowStart": "2026-08-20T10:00:00Z",
"deliveryWindowEnd": "2026-08-20T14:00:00Z"
}'

JavaScript (Fetch)

const response = await fetch('https://api.courimax.com/api/integrations/yango/orders', {
method: 'POST',
headers: {
'X-API-Key': 'cmx_your_api_key',
'Content-Type': 'application/json',
'Idempotency-Key': 'unique-request-id-123'
},
body: JSON.stringify({
pickupAddress: 'Rothschild Blvd 1, Tel Aviv',
pickupLat: 32.0639,
pickupLng: 34.7742,
dropoffAddress: 'Dizengoff Center, Tel Aviv',
dropoffLat: 32.0753,
dropoffLng: 34.7749,
recipientName: 'Jane Doe',
recipientPhone: '+972501234567',
packageSize: 'small',
externalRef: 'YANGO-ORDER-123',
notes: 'Handle with care',
deliveryWindowStart: '2026-08-20T10:00:00Z',
deliveryWindowEnd: '2026-08-20T14:00:00Z'
})
});

const order = await response.json();
console.log(order);

Python (Requests)

import requests

response = requests.post(
'https://api.courimax.com/api/integrations/yango/orders',
headers={
'X-API-Key': 'cmx_your_api_key',
'Content-Type': 'application/json',
'Idempotency-Key': 'unique-request-id-123'
},
json={
'pickupAddress': 'Rothschild Blvd 1, Tel Aviv',
'pickupLat': 32.0639,
'pickupLng': 34.7742,
'dropoffAddress': 'Dizengoff Center, Tel Aviv',
'dropoffLat': 32.0753,
'dropoffLng': 34.7749,
'recipientName': 'Jane Doe',
'recipientPhone': '+972501234567',
'packageSize': 'small',
'externalRef': 'YANGO-ORDER-123',
'notes': 'Handle with care',
'deliveryWindowStart': '2026-08-20T10:00:00Z',
'deliveryWindowEnd': '2026-08-20T14:00:00Z'
}
)

order = response.json()
print(order)

Response

Success (201 Created)

{
"id": "order-uuid",
"status": "pending",
"pickupAddress": "Rothschild Blvd 1, Tel Aviv",
"pickupLat": 32.0639,
"pickupLng": 34.7742,
"dropoffAddress": "Dizengoff Center, Tel Aviv",
"dropoffLat": 32.0753,
"dropoffLng": 34.7749,
"recipientName": "Jane Doe",
"recipientPhone": "+972501234567",
"packageSize": "small",
"externalRef": "YANGO-ORDER-123",
"notes": "temp=Ambient; weightKg=5; zone=TLV-CENTER; Handle with care",
"deliveryWindowStart": "2026-08-20T10:00:00.000Z",
"deliveryWindowEnd": "2026-08-20T14:00:00.000Z",
"trackingToken": "tracking-token-abc",
"createdAt": "2026-08-19T10:00:00.000Z",
"updatedAt": "2026-08-19T10:00:00.000Z"
}

Error Responses

400 Bad Request - Validation error

{
"statusCode": 400,
"message": [
"externalRef (partner order ID) is required",
"dropoffLat/dropoffLng required unless geocodeOnIngest is true"
],
"error": "Bad Request"
}

401 Unauthorized - Missing or invalid API key

{
"statusCode": 401,
"message": "Missing X-API-Key header",
"error": "Unauthorized"
}

409 Conflict - Duplicate external reference

{
"statusCode": 409,
"message": "Order with externalRef YANGO-ORDER-123 already exists",
"error": "Conflict"
}

Idempotency

Include an Idempotency-Key header to safely retry requests without creating duplicate orders. If a request with the same idempotency key was already processed, the original response is returned.

Webhook Notifications

When an order is created, a webhook notification is sent to your configured webhook URL with the event order.created.

Next Steps