This API fetches all time slots available to current customer.
This API only accepts GET
requests.
https://dev-api.aymakan.com.sa/v2/time_slots/{pickupDate?}'
https://api.aymakan.net/v2/time_slots/{pickupDate?}'
The following headers should be sent along with the request
Your account security code / Api Token
Below table list the request parameters which can be sent to Create Reverse Pickup API.
Parameter | Type | Required | Description |
---|---|---|---|
pickup_date | String | Yes | Date format should be "Y-m-d" |
Upon successful request, the following response will be sent back with an HTTP status 200 OK
.
{
"success": true,
"data": {
"date": "2021-12-23",
"slots": {
"afternoon": "After Noon (02 PM - 06 PM)",
"evening": "Evening (06 PM - 09 PM)"
}
}
}
The error below means that :
The format of the date is invalid
{
"error": true,
"message": "Validation Error",
"errors": {
"pickup_date": [
"The pickup date is not a valid date.",
"The pickup date must be a date after or equal to today.",
"The pickup date does not match the format Y-m-d."
]
}
}
Also, an HTTP status of 422 Unprocessable Entity
will be returned.
In case of invalid credentials 401 Unauthorized
, the following response will be returned.
{
"error": true,
"response": "Invalid Credentials"
}