POST
/ondemandOnDemand Rates
This API call executes the shop to retrieve rates based on the configuration parameters defined during the shop creation. The only mandatory parameter is the shop ID. While all request parameters can be set at the time of shop creation, you may opt to define certain parameters, such as the markets, websiteCode, cob, lor, currency at runtime. Even if these parameters were set during creation, they can still be overridden during execution.
POST
/ondemandParameter Details
| Name | In | Type | Required | Description |
|---|---|---|---|---|
» shopId | body | integer | Required | Unique identifier for the shop. |
» markets | body | Optional | none | |
»» pickupLocation | body | string | Optional | Pickup location. |
»» dropLocation | body | string | Optional | Drop location |
» websiteCode | body | [integer] | Optional | none |
» cob | body | string | Optional | Country of booking details. |
» lor | body | integer | Optional | Length of rent details. |
» currency | body | string | Optional | Currency code (e.g., USD, EUR). |
» horizon | body | string | Optional | Number of days (if not using start and end dates). |
» horizonDow | body | [integer] | Optional | none |
» pickupTime | body | Optional | Pickup time of the trip. | |
» dropTime | body | Optional | Drop time of the trip. |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Success | |
| 400 | Bad Request | Bad Request | None |
| 401 | Unauthorized | Unauthorized | None |
| 403 | Forbidden | Forbidden - Access denied | None |
| 429 | Too Many Requests | Too Many Requests | None |
| 500 | Internal Server Error | Internal Server Error | None |
Example Request
# You can also use wget
curl -X POST /ondemand/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d '{"shopId":0,"markets":"string","»pickupLocation":"string","»dropLocation":"string","websiteCode":"string","cob":"string","lor":0,"currency":"string","horizon":"string","horizonDow":"string","pickupTime":"string","dropTime":"string"}'
Body parameter
{
"shopId": 25,
"markets": [
{
"pickupLocation": "",
"dropLocation": ""
}
],
"websiteCode": [],
"cob": "",
"lor": 0,
"currency": "",
"horizon": "",
"horizonDow": [],
"pickupTime": "",
"dropTime": ""
}
Example responses
200 Response
{
"message": "queue processed successfully."
}
Example 1
{
"shopId": 25
}
Example 2
{
"shopId": 25,
"markets": [
{
"pickupLocation": "AAR",
"dropLocation": "FMM"
},
{
"pickupLocation": "FMM",
"dropLocation": "AAR"
}
],
"horizon": "0-99"
}
Need Support?
Our team is here to help you integrate and make the most of our APIs. Get in touch for technical support, custom solutions, or any questions.