PUT/api/v1/shops/bulkupdate

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.
  • _id: The ID of the shop to identify which shop to update.
  • _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_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 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. Must be a valid string and should be unique.
  • deliveryMode: Delivery mode of the shop's services. Must be a valid string, and if more than one mode, they should be separated by | (e.g., Webhook|db).
PUT/api/v1/shops/bulkupdate

Parameter Details

NameInTypeRequiredDescription
bodybodyobjectRequirednone
» filebodystring(binary)RequiredThe CSV file to upload.

Responses

StatusMeaningDescriptionSchema
200OKSuccessNone
400Bad RequestBad RequestNone
401UnauthorizedUnauthorizedNone
404Not FoundNot FoundNone
429Too Many RequestsToo Many Requests.None
500Internal Server ErrorInternal Server ErrorNone

Example Request

# You can also use wget
curl -X PUT /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,
  "msg": "Shop successfully updated, shops count: 3",
  "shopID": [
    "1",
    "2",
    "3"
  ],
  "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.