POST
/api/v1/shops/bulkBulk Shop Upload
The bulk shops endpoint enables users to create multiple shops at once. The sample data and template for the bulk upload can be downloaded from the “GET /shops/bulk/sample” endpoint.
- •_sources: The ID of the source associated with the shop. If more than one, they should be separated by | (e.g., 64ae65cfd06e77f95bfefd8d|64ae95cfd06e77f95bfefd8d).
- •_alternateSources: The ID of the source associated with the shop. If more than one, they should be separated by | (e.g., 64ae65cfd06e77f95bfefd8d|64ae95cfd06e77f95bfefd8d).
- •isRoundTrip: Boolean value indicating whether it's round-trip or not (true or false).
- •los: Length of stay, must be a number.
- •_cabinClasses: The ID of the cabin classes associated with the shop. If more than one, they should be separated by | (e.g., 64ae65cfd06e77f95bfefd8d|64ae95cfd06e77f95bfefd8d).
- •pax_adults: Number of adult passengers.
- •pax_children: Number of children passengers.
- •pax_infants: Number of infant passengers.
- •pos: Should be active.
- •_currency: Should be active.
- •OD: Origin-Destination pairs for the shop, separated by |. Each pair should be in the format: origin code followed by destination code (e.g., JFKLAX).
- •_carriers: The ID of the sources associated with the shop. If more than one, they should be separated by | (e.g., 64ae65cfd06e77f95bfefd8d|64ae95cfd06e77f95bfefd8d). The channel should be Direct only.
- •isActiveStatus: Boolean value indicating whether the shop is active (true or false).
- •horizons: Values containing date, date range, number, or number range, separated by |.
- •noOfStops: Number of stops for the flight. Should be one of 0, 1, 2, 3, or 3+.
- •fareType: Type of fare. Should be one of: Regular, Defence, Doctors, Senior Citizen, Students.
- •duration_hour: Duration in hours.
- •duration_minute: Duration in minutes.
- •startDate: The start date of the shop's activity (format: YYYY-MM-DD).
- •shopName: The name of the shop. Should be a valid string and must be unique.
- •deliveryMode: Delivery mode of the shop's services. Should be a valid string, and if more than one mode, they should be separated by | (e.g., Webhook|db).
POST
/api/v1/shops/bulkParameter Details
| Name | In | Type | Required | Description |
|---|---|---|---|---|
body | body | object | Required | none |
» file | body | string(binary) | Required | The CSV file to upload. |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Success | None |
| 400 | Bad Request | Bad Request | None |
| 401 | Unauthorized | Unauthorized | None |
| 404 | Not Found | Not Found | 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 /api/v1/shops/bulk \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
Body parameter
file: string
Example responses
200 Response
{
"error": false,
"statusCode": 200,
"msg": "Successfully Uploaded !!",
"shopName": [
"Flightshopname1",
"Flightshopname2",
"Flightshopname3"
],
"errorLog": []
}
Bad Request - 400
{
"error": true,
"statusCode": 400,
"msg": "Invalid input, please check the errorLog!",
"errorLog": [
"Field 'shopName' must be a valid string for shop: Shop1",
"Invalid currency: XYZ for shop: Shop2"
]
}
Unauthorized - 401
{
"error": "Unauthorized",
"message": "Authorization token is invalid or missing."
}
Not Found - 404
{
"error": true,
"statusCode": 404,
"message": "User not found or inactive."
}
Internal Server Error - 500
{
"error": "InternalServerError",
"message": "An error occurred while uploading shops."
}
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.