/api/v1/shopCreate Shop
Create a new Shop
A shop is a set of specific parameters that form a request to extract fares. A shop will have parameters like route, source, horizon of days to extract, etc. The user gets to include the requirement details of “what” and “how” the shopping to be done.
This API method serves the purpose of adding a new flight shop to the user's system. It offers a convenient way to specify the required parameters. Upon a successful request, the system will create the new shop and provide a confirmation response with shops unique ID.
Mandatory Fields:
- _OD: Origin-Destination pairs for the shop. The value should be in the format origin code followed by destination code (e.g., JFKLAX|LAXJFK). Multiple pairs should be separated by a comma(,).
- _sources: The ID of the source associated with the shop. Multiple sources should be separated by a comma(,) (e.g., 64ae65cfd06e77f95bfefd8d,64ae95cfd06e77f95bfefd8d).
- _alternateSources: The ID of any alternate source for the shop. Multiple alternate sources should be separated by a comma(,).
- _cabinClasses: The ID of the cabin classes associated with the shop. Multiple cabin classes should be separated by a comma(,).
- isRoundTrip: A boolean value indicating whether the trip is round-trip (true) or not (false).
- los: Length of stay for the trip. Should be a number.
- horizons: Specifies the time frame for fare extraction. Can include a date, date range, or number range, separated by a comma(,).
- pax: The number of adult passengers. Should be a valid number.
- noOfStops: Number of stops for the flight. Should be an array of integers (e.g., [1, 2, 3]).
- fareType: Type of fare. Options include Regular, Defence, Doctors, Senior Citizen, Students.
- duration_outbound_hour: The duration of the outbound flight in hours.
- duration_outbound_minute: The duration of the outbound flight in minutes.
- duration_inbound_hour: The duration of the inbound flight in hours.
- duration_inbound_minute: The duration of the inbound flight in minutes.
- startDate: The start date of the shop's activity in the format YYYY-MM-DD.
- _pos: The point of sale associated with the shop. Should be active.
- _currency: The currency to be used for fare extraction. Should be active.
- shopName: The name of the shop. Should be a valid string and must be unique.
- deliveryMode: The delivery mode for the shop’s services. Valid options include Webhook and db, and multiple modes should be separated by a comma(,).
- isActiveStatus: Boolean value indicating whether the shop is active (true or false).
Optional Fields:
- _carriers: The ID of the carriers associated with the shop. Multiple carriers should be separated by a comma(,).
Note: When Brand (Direct) is selected as source, The carriers should not be provided.
This format ensures all necessary parameters are covered with detailed explanations to facilitate a new shop creation via the API.
/api/v1/shopParameter Details
| Name | In | Type | Required | Description |
|---|---|---|---|---|
body | body | Required | none |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Success | |
| 400 | Bad Request | Request data failed validation(s) | None |
| 401 | Unauthorized | Authentication Failed! | 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 https://api.flightrates.example.com/api/v1/shop \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
Body parameter
{
"_OD": [
{
"_flyFrom": "67fe5364708e396a7183c1d0",
"_flyTo": "67fe4926708e396a7183c1cc"
}
],
"_sources": [
"66054bd62035f94f4ad8bfa4"
],
"_alternateSources": [
"64ae65cfd06e77f95bfefea6"
],
"_cabinClasses": [
"6013a6abf553c71d4dfbe92d"
],
"_carriers": [
"65ef126905a50001f87961b2"
],
"isRoundTrip": true,
"los": 1,
"horizons": [
"0",
"3-10",
"02/05/2025",
"10/06/2025-10/08/2025"
],
"pax": {
"adults": 1,
"infants": 0,
"children": 0
},
"noOfStops": [
0,
1
],
"duration": {
"outbound": {
"hour": 40,
"minute": 30
},
"inbound": {
"hour": 40,
"minute": 30
}
},
"fareType": "Doctors",
"startDate": "2019-08-24",
"_pos": "64ae807cd06e77f95bff07be",
"_currency": "64ae7d3ed06e77f95bff0563",
"shopName": "Flightshop name",
"deliveryMode": [
"db"
],
"isActiveStatus": true
}
Example responses
{
"error": false,
"shop": {
"_OD": [
{
"OD": "HDOUKE",
"_flyFrom": "67fe5364708e396a7183c1d0",
"_flyTo": "67fe4926708e396a7183c1cc"
}
],
"_sources": [
"66054bd62035f94f4ad8bfa4"
],
"_alternateSources": [
"64ae65cfd06e77f95bfefea6"
],
"_carriers": [
"65ef126905a50001f87961b2"
],
"isRoundTrip": true,
"los": 0,
"_cabinClasses": [
"6013a6abf553c71d4dfbe92d"
],
"pax": {
"adults": 1,
"infants": 0,
"children": 0
},
"_pos": "64ae807cd06e77f95bff07be",
"posName": "United Kingdom",
"_currency": "64ae7d3ed06e77f95bff0563",
"currencyName": "ZMW",
"horizons": [
"0",
"3-10",
"02/05/2025",
"10/06/2025-10/08/2025"
],
"noOfStops": [
0,
1
],
"fareType": "Doctors",
"duration": {
"outbound": {
"hour": 40,
"minute": 30
},
"inbound": {
"hour": 10,
"minute": 50
}
},
"startDate": "2026-05-19T00:00:00.000Z",
"shopName": "Flightshop name",
"_user": "6a0aaf8da93611b858a5abf8",
"userName": "testinbound",
"deliveryMode": [
"db"
],
"isActiveStatus": true,
"isRealtime": false,
"_id": "6a0bf8555e39fd9e410a98ff",
"vertical": "flightrates",
"isCustomerCreated": true,
"createdAt": "2026-05-19T05:42:45.015Z",
"id": "6a0bf8555e39fd9e410a98ff"
}
}
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.