Slot APIs
The Slot API is responsible for defining, updating, and managing time-based availability windows at each location. It enables businesses to configure time slots by date, duration, capacity, and recurrence. This API is essential for setting up the infrastructure on which reservations and bookings are made.
Base URL
https://sandbox-apis.prayog.io/slotsAPI Response Status Codes
| Code | Description |
|---|---|
| 1000 | OK |
| 1001 | Success |
| 1002 | Partial Success |
| 4000 | Bad Request |
| 4004 | Not Found |
| 5000 | Internal Server Error |
HTTP Response Status Codes
| Code | Description |
|---|---|
| 200 | OK |
| 201 | Created |
| 207 | Multi Status |
| 400 | Bad Request |
| 404 | Not Found |
| 500 | Internal Server Error |
Available Endpoints
- Define Slot
- Define Slots
- Update Slot
- Update Slots
- Delete Slot
- Delete Slots
- Get Slot By Id
- Get Slots
- Generate Slots
1. Define Slot
To define the slot.
Method: POST
Endpoint: /api/v1/slot
Request Headers:
{ "Content-Type": "application/json", "X-Tenant-ID": "Tenant id", "X-User-ID": "User id"}Request Body Parameters
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| pincode | array | Yes | Array of pincode | [411015] |
| slots | array | Yes | Slot array objects | [{...}] |
Slots Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| date | string | Yes | Slot date (YYYY-MM-DD) | "2025-04-16" |
| timings | array | Yes | Slot timings array objects | [{...}] |
Timings Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| label | string | Yes | Slot label | "Pickup Slot - Morning" |
| type | string | Yes | Slot type (‘pickup’, ‘delivery’) | "pickup" |
| cutoffMinutesBefore | number | No | Slot cutoff minute | 60 |
| from | string | Yes | Slot start time 24-hour (HH:mm) | "10:00" |
| to | string | Yes | Slot end time 24-hour (HH:mm) | "11:00" |
| dimensions | object | Yes | Slot dimensions | {...} |
| capacity | object | Yes | Slot capacity | {...} |
| recurring | object | No | Recurring configuration (optional) | {...} |
| overbooking | object | No | Overbooking configuration (optional) | {...} |
Dimensions Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| length | number | Yes | Length in ‘cm’ | 579 |
| width | number | Yes | Width in ‘cm’ | 213 |
| height | number | Yes | Height in ‘cm’ | 213 |
Capacity Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| volumetricWeight | number | Yes | Volumetric weight in ‘kg’ | 42407 |
| physicalWeight | number | Yes | Physical weight in ‘kg’ | 10000 |
Recurring Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| type | string | Yes | Recurrence type (‘daily’, ‘weekly’) | "daily" |
| startAt | datetime | No | Recurrence start date (ISO format with milliseconds) | "2025-04-30T10:00:00.000Z" |
| endAt | datetime | Yes | Recurrence end date (ISO format with milliseconds) | "2025-05-30T10:00:00.000Z" |
| days | array | No | List of week days (for weekly recurrence) | ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'] |
Overbooking Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| enabled | boolean | Yes | Overbooking enabled (true/false) | true |
| maxPercentage | number | Yes | Overbooking max percentage (min: 1, max: 100) | 10 |
| excludeDates | array | No | List of excludes dates for overbooking (YYYY-MM-DD) | "2025-04-18" |
Sample Request Body
{ "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "label": "Pickup Slot - Morning Window", "type": "pickup", "cutoffMinutesBefore": 4, "from": "16:00", "to": "17:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": "2025-05-11T09:00:00.000Z", "endAt": "2025-05-30T09:00:00.000Z" }, "overbooking": { "enabled": true, "maxPercentage": 10, "excludeDates": ["2025-05-22", "2025-05-25"] } } ] } ]}Sample Success Response
{ "status": "success", "message": "Slot defined successfully.", "data": { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Morning Window", "cutoffMinutesBefore": 4, "from": "16:00", "to": "17:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": "2025-05-11T09:00:00.000Z", "endAt": "2025-05-30T09:00:00.000Z", "days": null }, "overbooking": { "enabled": true, "maxPercentage": 10, "excludeDates": ["2025-05-22", "2025-05-25"] }, "slotId": 149, "createdAt": "2025-05-20T06:37:32.827Z" } ] } ] }, "statusCode": 1000}Sample Error Response
{ "status": "error", "error": "slots.0.date must be a valid ISO 8601 date string.", "statusCode": 4000}2. Define Slots
To define the slots.
Method: POST
Endpoint: /api/v1/slots
Request Headers:
{ "Content-Type": "application/json", "X-Tenant-ID": "Tenant id", "X-User-ID": "User id"}Array of Request Body Parameters
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| pincode | array | Yes | Array of pincode | [411015] |
| slots | array | Yes | Slot array objects | [{...}] |
Slots Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| date | string | Yes | Slot date (YYYY-MM-DD) | "2025-04-16" |
| timings | array | Yes | Slot timings array objects | [{...}] |
Timings Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| label | string | Yes | Slot label | "Pickup Slot - Morning" |
| type | string | Yes | Slot type (‘pickup’, ‘delivery’) | "pickup" |
| cutoffMinutesBefore | datetime | No | Slot cutoff date-time (ISO format) | "2025-04-12T12:00:00Z" |
| from | string | Yes | Slot start time 24-hour (HH:mm) | "10:00" |
| to | string | Yes | Slot end time 24-hour (HH:mm) | "11:00" |
| dimensions | object | Yes | Slot dimensions | {...} |
| capacity | object | Yes | Slot capacity | {...} |
| recurring | object | No | Recurring configuration (optional) | {...} |
| overbooking | object | No | Overbooking configuration (optional) | {...} |
Dimensions Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| length | number | Yes | Length in ‘cm’ | 579 |
| width | number | Yes | Width in ‘cm’ | 213 |
| height | number | Yes | Height in ‘cm’ | 213 |
Capacity Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| volumetricWeight | number | Yes | Volumetric weight in ‘kg’ | 42407 |
| physicalWeight | number | Yes | Physical weight in ‘kg’ | 10000 |
Recurring Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| type | string | Yes | Recurrence type (‘daily’, ‘weekly’) | "daily" |
| startAt | datetime | No | Recurrence start date (ISO format with milliseconds) | "2025-04-30T10:00:00.000Z" |
| endAt | datetime | Yes | Recurrence end date (ISO format with milliseconds) | "2025-05-30T10:00:00.000Z" |
| days | array | No | List of week days (for weekly recurrence) | ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'] |
Overbooking Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| enabled | boolean | Yes | Overbooking enabled (true/false) | true |
| maxPercentage | number | Yes | Overbooking max percentage (min: 1, max: 100) | 10 |
| excludeDates | array | No | List of excludes dates for overbooking (YYYY-MM-DD) | "2025-04-18" |
Sample Request Body
[ { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "label": "Pickup Slot - Morning Window", "type": "pickup", "cutoffMinutesBefore": 4, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": "2025-05-11T09:00:00.000Z", "endAt": "2025-05-30T09:00:00.000Z" }, "overbooking": { "enabled": true, "maxPercentage": 10, "excludeDates": ["2025-05-20", "2025-05-25"] } } ] } ] }, { "pincode": ["411015"], "slots": [ { "date": "2025-06-20", "timings": [ { "label": "Pickup Slot - Weekly Window", "type": "pickup", "cutoffMinutesBefore": 4, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "weekly", "startAt": "2025-06-11T09:00:00.000Z", "endAt": "2025-06-30T09:00:00.000Z", "days": ["monday", "wednesday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 15, "excludeDates": ["2025-06-21"] } } ] } ] }]Sample All Success Response
{ "status": "success", "message": "All slots defined successfully.", "data": [ { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Morning Window", "cutoffMinutesBefore": 4, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": "2025-05-11T09:00:00.000Z", "endAt": "2025-05-30T09:00:00.000Z", "days": null }, "overbooking": { "enabled": true, "maxPercentage": 10, "excludeDates": ["2025-05-20", "2025-05-25"] }, "slotId": 154, "createdAt": "2025-05-20T07:23:48.642Z" } ] } ] }, { "pincode": ["411015"], "slots": [ { "date": "2025-06-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Weekly Window", "cutoffMinutesBefore": 4, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "weekly", "startAt": "2025-06-11T09:00:00.000Z", "endAt": "2025-06-30T09:00:00.000Z", "days": ["monday", "wednesday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 15, "excludeDates": ["2025-06-21"] }, "slotId": 155, "createdAt": "2025-05-20T07:23:48.665Z" } ] } ] } ], "statusCode": 1001}Sample Partial Success Response
{ "status": "partial_success", "message": "Some slots defined successfully.", "data": [ { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Morning Window", "cutoffMinutesBefore": 4, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": "2025-05-11T09:00:00.000Z", "endAt": "2025-05-30T09:00:00.000Z", "days": null }, "overbooking": { "enabled": true, "maxPercentage": 10, "excludeDates": ["2025-05-20", "2025-05-25"] }, "slotId": 153, "createdAt": "2025-05-20T07:23:19.116Z" } ] } ] }, { "pincode": ["411015"], "slots": [ { "date": "2025-06-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Weekly Window", "cutoffMinutesBefore": 4, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "weekly", "startAt": "2025-06-11T09:00:00.000Z", "endAt": "2025-06-30T09:00:00.000Z", "days": ["monday", "wednesday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 15, "excludeDates": ["2025-06-21"] } } ] } ], "error": "Unknown location for tenant or user." } ], "statusCode": 1002}Sample All Error Response
{ "status": "error", "message": "No slots defined successfully.", "data": [ { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Morning Window", "cutoffMinutesBefore": 4, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "dailyy", "startAt": "2025-05-11T09:00:00.000Z", "endAt": "2025-05-30T09:00:00.000Z" }, "overbooking": { "enabled": true, "maxPercentage": 10, "excludeDates": ["2025-05-20", "2025-05-25"] } } ] } ], "error": "Type is should be a string at slots.[0].timings.[0].recurring.type." }, { "pincode": ["411015"], "slots": [ { "date": "2025-06-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Weekly Window", "cutoffMinutesBefore": 4, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 220 }, "capacity": { "volumetricWeight": 6336, "physicalWeight": 12000 }, "recurring": { "type": "weekly", "startAt": "2025-06-11T09:00:00.000Z", "endAt": "2025-06-30T09:00:00.000Z", "days": ["monday", "wednesday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 15, "excludeDates": ["2025-06-21"] } } ] } ], "error": "Unknown location for tenant or user." } ], "statusCode": 4000}3. Update Slot
To update the slot.
Method: PUT
Endpoint: /api/v1/slot
Request Headers:
{ "Content-Type": "application/json", "X-Tenant-ID": "Tenant id", "X-User-ID": "User id"}Request Body Parameters
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| pincode | array | Yes | Array of pincode | [411015] |
| slots | array | Yes | Slot array objects | [{...}] |
Slots Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| date | string | No | Slot date (YYYY-MM-DD) | "2025-04-16" |
| timings | array | Yes | Slot timings array objects | [{...}] |
Timings Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| label | string | No | Slot label | "Pickup Slot - Morning" |
| type | string | No | Slot type (‘pickup’, ‘delivery’) | "pickup" |
| cutoffMinutesBefore | datetime | No | Slot cutoff date-time (ISO format) | "2025-04-12T12:00:00Z" |
| from | string | No | Slot start time 24-hour (HH:mm) | "10:00" |
| to | string | No | Slot end time 24-hour (HH:mm) | "11:00" |
| capacity | object | No | Slot capacity | {...} |
| recurring | object | No | Recurring configuration (optional) | {...} |
| overbooking | object | No | Overbooking configuration (optional) | {...} |
| slotId | Number | Yes | Slot Id | 1 |
Capacity Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| volumetricWeight | number | Yes | Volumetric weight in ‘kg’ | 42407 |
| physicalWeight | number | Yes | Physical weight in ‘kg’ | 10000 |
Recurring Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| type | string | Yes | Recurrence type (‘daily’, ‘weekly’) | "daily" |
| startAt | datetime | No | Recurrence start date (ISO format with milliseconds) | "2025-04-30T10:00:00.000Z" |
| endAt | datetime | Yes | Recurrence end date (ISO format with milliseconds) | "2025-05-30T10:00:00.000Z" |
| days | array | No | List of week days (for weekly recurrence) | ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'] |
Overbooking Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| enabled | boolean | Yes | Overbooking enabled (true/false) | true |
| maxPercentage | number | Yes | Overbooking max percentage (min: 1, max: 100) | 10 |
| excludeDates | array | No | List of excludes dates for overbooking (YYYY-MM-DD) | "2025-04-18" |
Sample Request Body
{ "slots": [ { "timings": [ { "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "recurring": { "type": "weekly", "startAt": "2025-05-20T06:00:00.000Z", "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 1 }, "slotId": 2 } ] } ]}Sample Success Response
{ "status": "success", "message": "Slot updated successfully.", "data": { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 100, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "recurring": { "type": "weekly", "startAt": "2025-05-20T06:00:00.000Z", "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 1, "excludeDates": [] }, "slotId": 2, "updatedAt": "2025-05-21T20:47:51.121Z" } ] } ] }, "statusCode": 1000}Sample Error Response
{ "status": "error", "error": "Slots.0.timings.0.overbooking.maxPercentage should be a positive number must be between 0 and 100.", "statusCode": 4000}4. Update Slots
To update the slots.
Method: PUT
Endpoint: /api/v1/slots
Request Headers:
{ "Content-Type": "application/json", "X-Tenant-ID": "Tenant id", "X-User-ID": "User id"}Array Of Request Body Parameters
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| pincode | array | Yes | Array of pincode | [411015] |
| slots | array | Yes | Slot array objects | [{...}] |
Slots Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| date | string | No | Slot date (YYYY-MM-DD) | "2025-04-16" |
| timings | array | Yes | Slot timings array objects | [{...}] |
Timings Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| label | string | No | Slot label | "Pickup Slot - Morning" |
| type | string | No | Slot type (‘pickup’, ‘delivery’) | "pickup" |
| cutoffMinutesBefore | number | No | Slot cutoff minute | 60 |
| from | string | No | Slot start time 24-hour (HH:mm) | "10:00" |
| to | string | No | Slot end time 24-hour (HH:mm) | "11:00" |
| capacity | object | No | Slot capacity | {...} |
| recurring | object | No | Recurring configuration (optional) | {...} |
| overbooking | object | No | Overbooking configuration (optional) | {...} |
| slotId | Number | Yes | Slot Id | 1 |
Capacity Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| volumetricWeight | number | Yes | Volumetric weight in ‘kg’ | 42407 |
| physicalWeight | number | Yes | Physical weight in ‘kg’ | 10000 |
Recurring Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| type | string | Yes | Recurrence type (‘daily’, ‘weekly’) | "daily" |
| startAt | datetime | No | Recurrence start date (ISO format with milliseconds) | "2025-04-30T10:00:00.000Z" |
| endAt | datetime | Yes | Recurrence end date (ISO format with milliseconds) | "2025-05-30T10:00:00.000Z" |
| days | array | No | List of week days (for weekly recurrence) | ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'] |
Overbooking Object
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| enabled | boolean | Yes | Overbooking enabled (true/false) | true |
| maxPercentage | number | Yes | Overbooking max percentage (min: 1, max: 100) | 10 |
| excludeDates | array | No | List of excludes dates for overbooking (YYYY-MM-DD) | "2025-04-18" |
Sample Request Body
[ { "slots": [ { "timings": [ { "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "recurring": { "type": "weekly", "startAt": "2025-05-20T06:00:00.000Z", "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 1 }, "slotId": 2 } ] } ] }, { "pincode": ["411015"], "slots": [ { "date": "2025-05-22", "timings": [ { "type": "delivery", "label": "Delivery Slot - Midday", "cutoffMinutesBefore": 5, "from": "12:00", "to": "13:00", "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": null, "endAt": "2025-06-12T12:00:00.000Z", "days": null }, "slotId": 3 } ] } ] }]Sample All Success Response
{ "status": "success", "message": "All slots updated successfully.", "data": [ { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 100, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "recurring": { "type": "weekly", "startAt": "2025-05-20T06:00:00.000Z", "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 1, "excludeDates": [] }, "slotId": 2, "updatedAt": "2025-05-21T20:47:51.121Z" } ] } ] }, { "pincode": ["411015"], "slots": [ { "date": "2025-05-22", "timings": [ { "type": "delivery", "label": "Delivery Slot - Midday", "cutoffMinutesBefore": 5, "from": "12:00", "to": "13:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": null, "endAt": "2025-06-12T12:00:00.000Z", "days": null }, "overbooking": null, "slotId": 3, "updatedAt": "2025-05-23T06:53:00.874Z" } ] } ] } ], "statusCode": 1001}Sample Partial Success Response
{ "status": "partial_success", "message": "Some slots updated successfully.", "data": [ { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 100, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "recurring": { "type": "weekly", "startAt": "2025-05-20T06:00:00.000Z", "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 1, "excludeDates": [] }, "slotId": 2, "updatedAt": "2025-05-21T20:47:51.121Z" } ] } ] }, { "pincode": ["411015"], "slots": [ { "date": "2025-05-22", "timings": [ { "type": "delivery", "label": "Delivery Slot - Midday", "cutoffMinutesBefore": -5, "from": "12:00", "to": "13:00", "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": null, "endAt": "2025-06-12T12:00:00.000Z", "days": null }, "slotId": 3 } ] } ], "error": "cutoffMinutesBefore should be a positive number at slots.[0].timings.[0].cutoffMinutesBefore." } ], "statusCode": 1002}Sample All Error Response
{ "status": "error", "message": "No slots updated successfully.", "data": [ { "slots": [ { "timings": [ { "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "recurring": { "type": "wegekly", "startAt": "2025-05-20T06:00:00.000Z", "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 1 }, "slotId": 2 } ] } ], "error": "Type should be a string at slots.[0].timings.[0].recurring.type." }, { "pincode": ["411015"], "slots": [ { "date": "2025-05-22", "timings": [ { "type": "delivery", "label": "Delivery Slot - Midday", "cutoffMinutesBefore": -5, "from": "12:00", "to": "13:00", "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": null, "endAt": "2025-06-12T12:00:00.000Z", "days": null }, "slotId": 3 } ] } ], "error": "cutoffMinutesBefore should be a positive number at slots.[0].timings.[0].cutoffMinutesBefore." } ], "statusCode": 4000}5. Delete Slot
To delete the slot.
Method: DELETE
Endpoint: /api/v1/slot
Request Headers:
{ "Content-Type": "application/json", "X-Tenant-ID": "Tenant id", "X-User-ID": "User id"}Request Body Parameters
| Field | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| slotId | number | Yes | Slot Id | 3 |
Sample Request Body
{ "slotId": 151}Sample Success Response
{ "status": "success", "message": "Slot deleted successfully.", "data": { "slotId": 151, "deletedAt": "2025-05-23T08:12:55.111Z" }, "statusCode": 1000}Sample Error Response
{ "status": "error", "error": "Slot not found.", "statusCode": 4004}6. Delete Slots
To delete the slots.
Method: DELETE
Endpoint: /api/v1/slots
Request Headers:
{ "Content-Type": "application/json", "X-Tenant-ID": "Tenant id", "X-User-ID": "User id"}Array Of Request Body Parameters
| Field | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| slotId | number | Yes | Slot Id | 3 |
Sample Request Body
[ { "slotId": 152 }, { "slotId": 153 }]Sample All Success Response
{ "status": "success", "message": "All slots deleted successfully.", "data": [ { "slotId": 152, "deletedAt": "2025-05-23T08:24:30.871Z" }, { "slotId": 153, "deletedAt": "2025-05-23T08:24:30.887Z" } ], "statusCode": 1001}Sample Partial Success Response
{ "status": "partial_success", "message": "Some slots deleted successfully.", "data": [ { "slotId": 152, "error": "Slot not found." }, { "slotId": 154, "deletedAt": "2025-05-23T08:27:23.723Z" } ], "statusCode": 1002}Sample All Error Response
{ "status": "error", "message": "No slots deleted successfully.", "data": [ { "slotId": 152, "error": "Slot not found." }, { "slotId": "slotId", "error": "Property slotId should be an integer number." } ], "statusCode": 4000}7. Get Slot By Id
To get the slot by Id.
Method: GET
Endpoint: /api/v1/slot/{id}
Request Headers:
{ "Content-Type": "application/json", "X-Tenant-ID": "Tenant id", "X-User-ID": "User id"}Request Params Parameters
| Field | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| id | int number | Yes | Slot Id | 2 |
Sample Success Response
{ "status": "success", "message": "Slot fetched successfully.", "data": { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 100, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "recurring": { "type": "weekly", "startAt": "2025-05-20T06:00:00.000Z", "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 1, "excludeDates": [] }, "updatedAt": "2025-05-21T20:47:51.121Z", "slotId": 2, "createdAt": "2025-04-24T09:48:44.509Z" } ] } ] }, "statusCode": 1000}Sample Error Response
{ "status": "error", "error": "Id must be a positive integer number.", "statusCode": 4000}Sample Not Found Response
{ "status": "error", "error": "Slot not found.", "statusCode": 4004}8. Get Slots
To get the slots.
Method: GET
Endpoint: /api/v1/slots
Request Headers:
{ "Content-Type": "application/json", "X-Tenant-ID": "Tenant id", "X-User-ID": "User id"}Request Query Parameters
| Field | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| page | int number | No | Page | 1 |
| limit | int number | No | Page limit | 10 |
| location_id | int number | No | Location Id | 1 |
| label | string | No | Label of the slot (Regex Match) | Pickup Slot |
| slot_type | string | No | Slot type | pickup |
| recurring_type | string | No | Recurring type | daily |
Sample Success Response
{ "status": "success", "message": "Slots fetched successfully.", "data": [ { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Morning Window", "cutoffMinutesBefore": 5, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": "2025-05-11T09:00:00.000Z", "endAt": "2025-05-30T09:00:00.000Z", "days": null }, "overbooking": null, "updatedAt": "2025-04-24T09:48:44.509Z", "slotId": 1, "createdAt": "2025-04-24T09:48:44.509Z" }, { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 100, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "recurring": { "type": "weekly", "startAt": "2025-05-20T06:00:00.000Z", "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": { "enabled": true, "maxPercentage": 1, "excludeDates": [] }, "updatedAt": "2025-05-21T20:47:51.121Z", "slotId": 2, "createdAt": "2025-04-24T09:48:44.509Z" }, { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "weekly", "startAt": null, "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": null, "updatedAt": "2025-04-24T10:00:51.796Z", "slotId": 10, "createdAt": "2025-04-24T10:00:51.796Z" }, { "type": "pickup", "label": "Pickup Slot - Morning Window", "cutoffMinutesBefore": 5, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": "2025-05-11T09:00:00.000Z", "endAt": "2025-05-30T09:00:00.000Z", "days": null }, "overbooking": null, "updatedAt": "2025-04-24T10:00:51.450Z", "slotId": 5, "createdAt": "2025-04-24T10:00:51.450Z" }, { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "weekly", "startAt": null, "endAt": "2025-06-01T06:00:00.000Z", "days": ["monday", "friday"] }, "overbooking": null, "updatedAt": "2025-04-24T10:00:51.450Z", "slotId": 6, "createdAt": "2025-04-24T10:00:51.450Z" }, { "type": "pickup", "label": "Pickup Slot - Morning Window", "cutoffMinutesBefore": 5, "from": "09:00", "to": "10:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": "2025-05-11T09:00:00.000Z", "endAt": "2025-05-30T09:00:00.000Z", "days": null }, "overbooking": null, "updatedAt": "2025-04-24T10:00:51.796Z", "slotId": 9, "createdAt": "2025-04-24T10:00:51.796Z" } ] }, { "date": "2025-05-22", "timings": [ { "type": "delivery", "label": "Delivery Slot - Late Night", "cutoffMinutesBefore": 5, "from": "22:00", "to": "23:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "weekly", "startAt": "2025-05-23T22:00:00.000Z", "endAt": "2025-06-12T22:00:00.000Z", "days": ["saturday", "sunday"] }, "overbooking": null, "updatedAt": "2025-04-24T10:00:51.450Z", "slotId": 8, "createdAt": "2025-04-24T10:00:51.450Z" }, { "type": "delivery", "label": "Delivery Slot - Late Night", "cutoffMinutesBefore": 5, "from": "22:00", "to": "23:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "weekly", "startAt": "2025-05-23T22:00:00.000Z", "endAt": "2025-06-12T22:00:00.000Z", "days": ["saturday", "sunday"] }, "overbooking": null, "updatedAt": "2025-04-24T09:48:44.509Z", "slotId": 4, "createdAt": "2025-04-24T09:48:44.509Z" }, { "type": "delivery", "label": "Delivery Slot - Midday", "cutoffMinutesBefore": 5, "from": "12:00", "to": "13:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": null, "endAt": "2025-06-12T12:00:00.000Z", "days": null }, "overbooking": null, "updatedAt": "2025-04-24T10:00:51.450Z", "slotId": 7, "createdAt": "2025-04-24T10:00:51.450Z" } ] } ] }, { "pincode": ["411015"], "slots": [ { "date": "2025-05-22", "timings": [ { "type": "delivery", "label": "Delivery Slot - Midday", "cutoffMinutesBefore": 5, "from": "12:00", "to": "13:00", "dimensions": { "length": 600, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 45000, "physicalWeight": 12000 }, "recurring": { "type": "daily", "startAt": null, "endAt": "2025-06-12T12:00:00.000Z", "days": null }, "overbooking": null, "updatedAt": "2025-05-23T08:12:32.734Z", "slotId": 3, "createdAt": "2025-04-24T09:48:44.509Z" } ] } ] } ], "pagination": { "page": 1, "limit": 10, "offset": 0, "totalPage": 16, "totalItem": 151 }, "statusCode": 1000}Sample Error Response
{ "status": "error", "error": "Limit must be an integer number.", "statusCode": 4000}Sample No Match Response
{ "status": "success", "message": "Slots fetched successfully.", "data": [], "pagination": { "page": 1, "limit": 100, "offset": 0, "totalPage": 2, "totalItem": 131 }, "statusCode": 1000}9. Generate Slot
To get the generate slot.
Method: GET
Endpoint: /api/v1/slot/{id}/generate
Request Headers:
{ "Content-Type": "application/json", "X-Tenant-ID": "Tenant id", "X-User-ID": "User id"}Request Params Parameters
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| id | int number | Yes | Slot Id | 2 |
Request Query Parameters
| Field Name | Type | Mandatory | Description | Example |
|---|---|---|---|---|
| page | int number | No | Page | 2 |
| limit | int number | No | Page limit | 5 |
| date | string | No | Slot date (YYYY-MM-DD) | 2025-04-16 |
Sample Success Response
{ "status": "success", "message": "Slots generated successfully.", "data": { "pincode": ["411015"], "slots": [ { "date": "2025-05-20", "timings": [ { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 100, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "overbooking": { "enabled": true, "maxPercentage": 1, "excludeDates": [] }, "updatedAt": "2025-05-21T20:47:51.121Z", "slotId": 2, "createdAt": "2025-04-24T09:48:44.509Z" } ] }, { "date": "2025-05-23", "timings": [ { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 100, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "overbooking": { "enabled": true, "maxPercentage": 1, "excludeDates": [] }, "updatedAt": "2025-05-21T20:47:51.121Z", "slotId": 2, "createdAt": "2025-04-24T09:48:44.509Z" } ] }, { "date": "2025-05-26", "timings": [ { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 100, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "overbooking": { "enabled": true, "maxPercentage": 1, "excludeDates": [] }, "updatedAt": "2025-05-21T20:47:51.121Z", "slotId": 2, "createdAt": "2025-04-24T09:48:44.509Z" } ] }, { "date": "2025-05-30", "timings": [ { "type": "pickup", "label": "Pickup Slot - Early Morning", "cutoffMinutesBefore": 5, "from": "06:00", "to": "07:00", "dimensions": { "length": 100, "width": 220, "height": 240 }, "capacity": { "volumetricWeight": 230, "physicalWeight": 75 }, "overbooking": { "enabled": true, "maxPercentage": 1, "excludeDates": [] }, "updatedAt": "2025-05-21T20:47:51.121Z", "slotId": 2, "createdAt": "2025-04-24T09:48:44.509Z" } ] } ] }, "pagination": { "page": 1, "limit": 10, "offset": 0, "totalPage": 1, "totalItem": 4 }, "statusCode": 1000}Sample Error Response
{ "status": "error", "error": "Id must be a positive integer number.", "statusCode": 4000}Sample No Match Response
{ "status": "success", "message": "Slots generated successfully.", "data": [], "pagination": { "page": 1, "limit": 1, "offset": 0, "totalPage": 22, "totalItem": 22 }, "statusCode": 1000}