Skip to content

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/slots

API Response Status Codes

CodeDescription
1000OK
1001Success
1002Partial Success
4000Bad Request
4004Not Found
5000Internal Server Error

HTTP Response Status Codes

CodeDescription
200OK
201Created
207Multi Status
400Bad Request
404Not Found
500Internal Server Error

Available Endpoints

  1. Define Slot
  2. Define Slots
  3. Update Slot
  4. Update Slots
  5. Delete Slot
  6. Delete Slots
  7. Get Slot By Id
  8. Get Slots
  9. 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 NameTypeMandatoryDescriptionExample
pincodearrayYesArray of pincode[411015]
slotsarrayYesSlot array objects[{...}]

Slots Object

Field NameTypeMandatoryDescriptionExample
datestringYesSlot date (YYYY-MM-DD)"2025-04-16"
timingsarrayYesSlot timings array objects[{...}]

Timings Object

Field NameTypeMandatoryDescriptionExample
labelstringYesSlot label"Pickup Slot - Morning"
typestringYesSlot type (‘pickup’, ‘delivery’)"pickup"
cutoffMinutesBeforenumberNoSlot cutoff minute60
fromstringYesSlot start time 24-hour (HH:mm)"10:00"
tostringYesSlot end time 24-hour (HH:mm)"11:00"
dimensionsobjectYesSlot dimensions{...}
capacityobjectYesSlot capacity{...}
recurringobjectNoRecurring configuration (optional){...}
overbookingobjectNoOverbooking configuration (optional){...}

Dimensions Object

Field NameTypeMandatoryDescriptionExample
lengthnumberYesLength in ‘cm’579
widthnumberYesWidth in ‘cm’213
heightnumberYesHeight in ‘cm’213

Capacity Object

Field NameTypeMandatoryDescriptionExample
volumetricWeightnumberYesVolumetric weight in ‘kg’42407
physicalWeightnumberYesPhysical weight in ‘kg’10000

Recurring Object

Field NameTypeMandatoryDescriptionExample
typestringYesRecurrence type (‘daily’, ‘weekly’)"daily"
startAtdatetimeNoRecurrence start date (ISO format with milliseconds)"2025-04-30T10:00:00.000Z"
endAtdatetimeYesRecurrence end date (ISO format with milliseconds)"2025-05-30T10:00:00.000Z"
daysarrayNoList of week days (for weekly recurrence)['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']

Overbooking Object

Field NameTypeMandatoryDescriptionExample
enabledbooleanYesOverbooking enabled (true/false)true
maxPercentagenumberYesOverbooking max percentage (min: 1, max: 100)10
excludeDatesarrayNoList 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 NameTypeMandatoryDescriptionExample
pincodearrayYesArray of pincode[411015]
slotsarrayYesSlot array objects[{...}]

Slots Object

Field NameTypeMandatoryDescriptionExample
datestringYesSlot date (YYYY-MM-DD)"2025-04-16"
timingsarrayYesSlot timings array objects[{...}]

Timings Object

Field NameTypeMandatoryDescriptionExample
labelstringYesSlot label"Pickup Slot - Morning"
typestringYesSlot type (‘pickup’, ‘delivery’)"pickup"
cutoffMinutesBeforedatetimeNoSlot cutoff date-time (ISO format)"2025-04-12T12:00:00Z"
fromstringYesSlot start time 24-hour (HH:mm)"10:00"
tostringYesSlot end time 24-hour (HH:mm)"11:00"
dimensionsobjectYesSlot dimensions{...}
capacityobjectYesSlot capacity{...}
recurringobjectNoRecurring configuration (optional){...}
overbookingobjectNoOverbooking configuration (optional){...}

Dimensions Object

Field NameTypeMandatoryDescriptionExample
lengthnumberYesLength in ‘cm’579
widthnumberYesWidth in ‘cm’213
heightnumberYesHeight in ‘cm’213

Capacity Object

Field NameTypeMandatoryDescriptionExample
volumetricWeightnumberYesVolumetric weight in ‘kg’42407
physicalWeightnumberYesPhysical weight in ‘kg’10000

Recurring Object

Field NameTypeMandatoryDescriptionExample
typestringYesRecurrence type (‘daily’, ‘weekly’)"daily"
startAtdatetimeNoRecurrence start date (ISO format with milliseconds)"2025-04-30T10:00:00.000Z"
endAtdatetimeYesRecurrence end date (ISO format with milliseconds)"2025-05-30T10:00:00.000Z"
daysarrayNoList of week days (for weekly recurrence)['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']

Overbooking Object

Field NameTypeMandatoryDescriptionExample
enabledbooleanYesOverbooking enabled (true/false)true
maxPercentagenumberYesOverbooking max percentage (min: 1, max: 100)10
excludeDatesarrayNoList 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 NameTypeMandatoryDescriptionExample
pincodearrayYesArray of pincode[411015]
slotsarrayYesSlot array objects[{...}]

Slots Object

Field NameTypeMandatoryDescriptionExample
datestringNoSlot date (YYYY-MM-DD)"2025-04-16"
timingsarrayYesSlot timings array objects[{...}]

Timings Object

Field NameTypeMandatoryDescriptionExample
labelstringNoSlot label"Pickup Slot - Morning"
typestringNoSlot type (‘pickup’, ‘delivery’)"pickup"
cutoffMinutesBeforedatetimeNoSlot cutoff date-time (ISO format)"2025-04-12T12:00:00Z"
fromstringNoSlot start time 24-hour (HH:mm)"10:00"
tostringNoSlot end time 24-hour (HH:mm)"11:00"
capacityobjectNoSlot capacity{...}
recurringobjectNoRecurring configuration (optional){...}
overbookingobjectNoOverbooking configuration (optional){...}
slotIdNumberYesSlot Id1

Capacity Object

Field NameTypeMandatoryDescriptionExample
volumetricWeightnumberYesVolumetric weight in ‘kg’42407
physicalWeightnumberYesPhysical weight in ‘kg’10000

Recurring Object

Field NameTypeMandatoryDescriptionExample
typestringYesRecurrence type (‘daily’, ‘weekly’)"daily"
startAtdatetimeNoRecurrence start date (ISO format with milliseconds)"2025-04-30T10:00:00.000Z"
endAtdatetimeYesRecurrence end date (ISO format with milliseconds)"2025-05-30T10:00:00.000Z"
daysarrayNoList of week days (for weekly recurrence)['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']

Overbooking Object

Field NameTypeMandatoryDescriptionExample
enabledbooleanYesOverbooking enabled (true/false)true
maxPercentagenumberYesOverbooking max percentage (min: 1, max: 100)10
excludeDatesarrayNoList 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 NameTypeMandatoryDescriptionExample
pincodearrayYesArray of pincode[411015]
slotsarrayYesSlot array objects[{...}]

Slots Object

Field NameTypeMandatoryDescriptionExample
datestringNoSlot date (YYYY-MM-DD)"2025-04-16"
timingsarrayYesSlot timings array objects[{...}]

Timings Object

Field NameTypeMandatoryDescriptionExample
labelstringNoSlot label"Pickup Slot - Morning"
typestringNoSlot type (‘pickup’, ‘delivery’)"pickup"
cutoffMinutesBeforenumberNoSlot cutoff minute60
fromstringNoSlot start time 24-hour (HH:mm)"10:00"
tostringNoSlot end time 24-hour (HH:mm)"11:00"
capacityobjectNoSlot capacity{...}
recurringobjectNoRecurring configuration (optional){...}
overbookingobjectNoOverbooking configuration (optional){...}
slotIdNumberYesSlot Id1

Capacity Object

Field NameTypeMandatoryDescriptionExample
volumetricWeightnumberYesVolumetric weight in ‘kg’42407
physicalWeightnumberYesPhysical weight in ‘kg’10000

Recurring Object

Field NameTypeMandatoryDescriptionExample
typestringYesRecurrence type (‘daily’, ‘weekly’)"daily"
startAtdatetimeNoRecurrence start date (ISO format with milliseconds)"2025-04-30T10:00:00.000Z"
endAtdatetimeYesRecurrence end date (ISO format with milliseconds)"2025-05-30T10:00:00.000Z"
daysarrayNoList of week days (for weekly recurrence)['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']

Overbooking Object

Field NameTypeMandatoryDescriptionExample
enabledbooleanYesOverbooking enabled (true/false)true
maxPercentagenumberYesOverbooking max percentage (min: 1, max: 100)10
excludeDatesarrayNoList 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

FieldTypeMandatoryDescriptionExample
slotIdnumberYesSlot Id3

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

FieldTypeMandatoryDescriptionExample
slotIdnumberYesSlot Id3

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

FieldTypeMandatoryDescriptionExample
idint numberYesSlot Id2

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

FieldTypeMandatoryDescriptionExample
pageint numberNoPage1
limitint numberNoPage limit10
location_idint numberNoLocation Id1
labelstringNoLabel of the slot (Regex Match)Pickup Slot
slot_typestringNoSlot typepickup
recurring_typestringNoRecurring typedaily

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 NameTypeMandatoryDescriptionExample
idint numberYesSlot Id2

Request Query Parameters

Field NameTypeMandatoryDescriptionExample
pageint numberNoPage2
limitint numberNoPage limit5
datestringNoSlot 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
}