POST/api/v1/shops/bulk

Bulk Shop Upload

Bulk 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.

The CSV file should include the following headers:

  • _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).
  • 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 (Optional): 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).
POST/api/v1/shops/bulk

Parameter Details

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

Responses

StatusMeaningDescriptionSchema
200OKSuccess
400Bad RequestBad Request
401UnauthorizedUnauthorized
404Not FoundNot Found
429Too Many RequestsToo Many Requests.None
500Internal Server ErrorInternal Server Error

Example Request

# You can also use wget
curl -X POST https://api.flightrates.example.com/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,
  "message": "Successfully Uploaded !!",
  "shopName": [
    "Flightshopname1",
    "Flightshopname2",
    "Flightshopname3"
  ],
  "errorLog": []
}

Not Found

{
  "error": true,
  "statusCode": 404,
  "message": "User not found or inactive."
}

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.