PUT
/api/v1/shops/bulkupdateBulk Shop Update
Bulk Shop update
This endpoint allows users to edit multiple shops in bulk. A CSV file containing the shop details for modification can be downloaded from the “/shops/download” endpoint. Modifications should follow the provided instructions, and only the updated shop details should be uploaded to this endpoint.
The CSV file should include the following headers:
- _id: The ID of the shop to identify which shop to update.
- _sources: The ID of the source associated with the shop. If more the one should be separated by | (64ae65cfd06e77f95bfefd8d|64ae95cfd06e77f95bfefd8d).
- _alternateSources: The ID of the source associated with the shop. If more the one should be separated by | (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 cabinclasses associated with the shop. If more the one should be separated by | (64ae65cfd06e77f95bfefd8d|64ae95cfd06e77f95bfefd8d).
- pax_adult: 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 the one should be separated by | (64ae65cfd06e77f95bfefd8d|64ae95cfd06e77f95bfefd8d) and 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 a pipe-separated string containing positive integers (e.g., "1|2|3").
- fareType: Type of fare. Should be one of the following options: Regular, Defence, Doctors, Senior Citizen, Students.
- duration_outbound_hour: Duration of outbound in hours.
- duration_outbound_minute: Duration of outbound in minutes.
- duration_inbound_hour: Duration of inbound in hours.
- duration_inbound_minute: Duration of inbound in minutes.
- startDate: The start date of the shop's activity (format: YYYY-MM-DD).
- shopName: The name of the shop. Should be valid string and should 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 | (Webhook|db).
PUT
/api/v1/shops/bulkupdateParameter 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 | |
| 400 | Bad Request | Bad Request | |
| 401 | Unauthorized | Unauthorized | |
| 404 | Not Found | Not Found | |
| 429 | Too Many Requests | Too Many Requests. | None |
| 500 | Internal Server Error | Internal Server Error |
Example Request
# You can also use wget
curl -X PUT https://api.flightrates.example.com/api/v1/shops/bulkupdate \
-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,
"message": "Shops updated successfully",
"shopID": [
"1",
"2",
"3"
],
"errorLog": []
}
Not Found
{
"error": true,
"statusCode": 404,
"message": "No shop found to be updated!"
}
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.