Booking API

This document describes the Logistics Explorer Booking API web service.

Api uses Bearer token. To get token follow this link with ID that gives your manager.

URL

https://www.searates.com/auth/platform-token?id=XXXXXX

You must send this token as header to all requests. Header example:

authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG....

Link to send all these API queries:

https://www.searates.com/graphql_booking

Create booking

Property Type Description
shipment_id int, required This is the parameter returned by the Logistics Explorer API for requesting quotes.
booker_email, booker_name, booker_phone string The parameter is necessary if the user is not authorized on the SeaRates website. If there is no registration, an account is created, and a confirmation and password are sent to the user's mail.
product_name, comment string, required If necessary, include the name of the cargo and any notes.
ready_to_load int, required Date when the cargo is ready to be loaded. It is provided as a timestamp (in Unix time) - https://en.wikipedia.org/wiki/Unix
customs_clearance, insurance, shipment_inspection, cargo_payment boolean, required These parameters are marked true or false depending on the necessity for additional services.
spot_rate boolean, required True if the rate is spot, false otherwise.
type string, required Type of transportation. (FCL, LCL, BULK, FTL, LTL, FCL RAIL, AIR, FCL LAND)
link string, required Link from where the booking was made.
origincountry string, required Country code (ISO-3166 Alpha 2) from which the booking was made.
truck_from, rail_from, fees_from, truck_to, rail_to, fees_to, barge_from, barge_to boolean, required What does transportation include.
schedule_index int The schedule that was received via Logistics Explorer for the rate, or null if there is no schedule.
Response: booking_id int, required This is the id of the created booking.
Response: order_id int This is the payment id in Rosoom. It is returned only to the spot rate with prepayment. This parameter is optional and may be ignored.


mutation {
    booking {
      create(
        shipment_id: 66998,
        booker_email: "",
        booker_name: "",
        booker_phone: "+442070486438",
        product_name: "merging branches",
        comment: "Booking Odessa - Shanghai",
        ready_to_load: 1654203600,
        customs_clearance: true,
        insurance: true,
        shipment_inspection: true,
        cargo_payment: true,
        spot_rate: true,
        type: "FCL",
        link: "",
        origincountry: "US",
        truck_from: true,
        rail_from: false,
        fees_from: true,
        truck_to: false,
        rail_to: false,
        fees_to: false,
        barge_from: false,
        barge_to: false,
        schedule_index: null
   ) {
    booking_id,
    order_id
   }
    }
  }

                              

{
 "data": {
  "booking": {
   "create": {
    "booking_id": 1000737,
    "order_id": 1420
   }
  }
 }
}