Skip to main content

Bulk Availability

Get delivery window availability for all zones across a date range.

GET /integrations/yango/availability-bulk

Request

Query Parameters

ParameterTypeRequiredDescription
fromDatestringYesStart date in YYYY-MM-DD format
toDatestringYesEnd date in YYYY-MM-DD format

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key

Use Cases

  • Import availability data into ERP systems
  • Plan delivery schedules across multiple days
  • Analyze capacity utilization
  • Build calendar views for customers

Examples

cURL

curl -X GET "https://api.courimax.com/api/integrations/yango/availability-bulk?fromDate=2026-08-20&toDate=2026-08-25" \
-H "X-API-Key: cmx_your_api_key"

JavaScript (Fetch)

const params = new URLSearchParams({
fromDate: '2026-08-20',
toDate: '2026-08-25'
});

const response = await fetch(
`https://api.courimax.com/api/integrations/yango/availability-bulk?${params}`,
{
headers: {
'X-API-Key': 'cmx_your_api_key'
}
}
);

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

Python (Requests)

import requests

params = {
'fromDate': '2026-08-20',
'toDate': '2026-08-25'
}

response = requests.get(
'https://api.courimax.com/api/integrations/yango/availability-bulk',
headers={
'X-API-Key': 'cmx_your_api_key'
},
params=params
)

availability = response.json()
print(availability)

Response

Success (200 OK)

{
"timezone": "Asia/Jerusalem",
"generatedAt": "2026-08-19T10:00:00.000Z",
"slots": [
{
"zone": "TLV-CENTER",
"date": "2026-08-20",
"startTime": "08:00",
"endTime": "12:00",
"available": true,
"scheduledCount": 5,
"capacityLimit": 20
},
{
"zone": "TLV-CENTER",
"date": "2026-08-20",
"startTime": "12:00",
"endTime": "16:00",
"available": true,
"scheduledCount": 12,
"capacityLimit": 20
},
{
"zone": "TLV-CENTER",
"date": "2026-08-20",
"startTime": "16:00",
"endTime": "20:00",
"available": false,
"scheduledCount": 20,
"capacityLimit": 20
},
{
"zone": "TLV-NORTH",
"date": "2026-08-20",
"startTime": "08:00",
"endTime": "12:00",
"available": true,
"scheduledCount": 3,
"capacityLimit": 20
}
]
}

Response Fields

FieldTypeDescription
timezonestringTimezone for all times
generatedAtstringWhen the data was generated (ISO 8601)
slotsarrayFlattened list of all available slots
slots[].zonestringZone name
slots[].datestringDate (YYYY-MM-DD)
slots[].startTimestringStart time (HH:MM)
slots[].endTimestringEnd time (HH:MM)
slots[].availablebooleanWhether slot has capacity
slots[].scheduledCountnumberNumber of orders scheduled
slots[].capacityLimitnumberMaximum capacity per slot

Error Responses

400 Bad Request - Missing or invalid parameters

{
"statusCode": 400,
"message": "fromDate query parameter is required (format: YYYY-MM-DD)",
"error": "Bad Request"
}
{
"statusCode": 400,
"message": "fromDate must be before toDate",
"error": "Bad Request"
}

401 Unauthorized - Missing or invalid API key

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

404 Not Found - No active zones configured

{
"statusCode": 404,
"message": "No active zones configured for organization",
"error": "Not Found"
}

Data Format

The response provides a flattened list of all slots across all zones and dates, making it easy to:

  • Import into spreadsheet applications
  • Load into ERP systems
  • Build calendar UIs
  • Analyze capacity trends

Filtering Results

Filter the results client-side based on your needs:

// Get only available slots
const availableSlots = availability.slots.filter(slot => slot.available);

// Get slots for a specific zone
const tlvCenterSlots = availability.slots.filter(
slot => slot.zone === 'TLV-CENTER'
);

// Get slots for a specific date
const mondaySlots = availability.slots.filter(
slot => slot.date === '2026-08-20'
);

Performance Considerations

  • Large date ranges return more data
  • Consider limiting to 7-14 days for optimal performance
  • Cache results when appropriate (data changes as orders are scheduled)

Next Steps