POST/ondemand

OnDemand 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/ondemand

Parameter Details

NameInTypeRequiredDescription
» shopIdbodyintegerRequiredUnique identifier for the shop.
» marketsbodyOptionalnone
»» pickupLocationbodystringOptionalPickup location.
»» dropLocationbodystringOptionalDrop location
» websiteCodebody[integer]Optionalnone
» cobbodystringOptionalCountry of booking details.
» lorbodyintegerOptionalLength of rent details.
» currencybodystringOptionalCurrency code (e.g., USD, EUR).
» horizonbodystringOptionalNumber of days (if not using start and end dates).
» horizonDowbody[integer]Optionalnone
» pickupTimebodyOptionalPickup time of the trip.
» dropTimebodyOptionalDrop time of the trip.

Responses

StatusMeaningDescriptionSchema
200OKSuccess
400Bad RequestBad RequestNone
401UnauthorizedUnauthorizedNone
403ForbiddenForbidden - Access deniedNone
429Too Many RequestsToo Many RequestsNone
500Internal Server ErrorInternal Server ErrorNone

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.