Save Booking

  1. Home
  2. Docs
  3. API Docs
  4. Booking
  5. Save Booking
API Version: v1.0

Overview

The Save Booking API creates or updates a booking on Save.

PS: Please contact us if you wish to use this API.

Sample Request

HTTP

 POST https://app.logisoft.io/api/booking/save

Responses

Status Meaning Description
200 OK Successful operation
1 OK Ok with DomainErrorMessage if an exception is handled
500 Internal Server Error Something has gone wrong on the website’s server.

Parameters

Name Type
ExtBookingSaveMessage object

ExtBookingSaveMessage

Property Name Required Type Description
Booking true ExtBooking Booking object
TestOnly true bool Indicates whether this request is only for testing purposes

ExtBooking

Property Name Required Type Description
Header true ExtBookingHeader The booking header
Items true <ExtBookingItem> list List of booking items

ExtBookingHeader

Property Name Required Type Description
Id false long The booking id
IsCanceled true bool Indicates whether the booking is canceled
ReferenceNumber false string Client reference number
Description false string Booking description
BookingCode false string Booking code
Pol false string The name of the port of loading
Terminal false string The name of the terminal
BookingVoyage false string The voyage number
Pod false string The name of the port of discharge
AgentId true long The Id of the shipping agent, provided by us
Line false string The name of the shipping line
Shipper true ExtBookingParty The shipper object
Exporter true ExtBookingParty The exporter object
Consignee true ExtBookingParty The consignee object
IntermediateConsignee true ExtBookingParty The intermediate consignee object
Notify true ExtBookingParty The object of the person to notify
Nvocc true ExtBookingParty The NVOCC object
DestinationAgent true ExtBookingParty The destination agent object
Collector true ExtBookingParty The collector object
CustomsTemplateId false long Id of customs template

ExtBookingItem

Property Name Required Type Description
Id false string Id of the booking item
RelativeId true int Indicates the order of the item in the sent object
IsCanceled true bool Indicates whether the booking item is canceled
Reference false string Reference number of booking item
Description false string Vehicle’s model
BolDescription false string Vehicle’s model to show on the bill of lading
SerialType false string Serial or VIN
SerialNumber false string Serial number or the VIN number of the unit
Year false int The booking item’s registration year
Type false string C = car, V = Van, B = Big Van, T = Truck, U = Unit, M = Motorcycle, E = Equipment, K = Container
Length false int The booking item’s length
Width false int The booking item’s width
Height false int The booking item’s height
Weight false int The booking item’s weight
HasCustomCbm true bool Indicates whether the booking item’s cubic meter has been measured by customs
BolCbm false decimal The booking item’s cubic meter to show on the bill of lading
Priority false string Used, VIP, new, priority
Block true bool Indicates whether the booking item is blocked
BlockReason false string The reason for blocking the booking item in case it is blocked
Mobility false string Regular, NonRunner, ForkLifted, Other
Insured true bool Indicates whether the booking item is insured
VehicleValue false decimal In case the vehicle is insured, specify the value
Currency false string The currency of the vehicle’s value
CountryOfOrigin false string The booking item’s country of origin
StateOfOrigin false string The booking item’s state of origin
TitleNumber false string The booking item’s title number
Titlestate false string The booking item’s title state
Notes false string Additional notes
CTN false string Cargo Tracking Note
ClearanceDoc false string The booking item’s clearance document
SealNumber false string The identification number of the booking item’s container seal
PaymentMode false int Collect or prepaid
Client true ExtBookingParty The client object
IsClientManual false bool Indicates whether the booking confirmation is manual
Transit true ExtBookingTransit The transit object
UpdatePaperForCustoms true bool Indicates whether to update customs paper
PaperForCustoms true ExtFile Customs paper object
SubUnits true <ExtBookingSubUnit> list List of sub units
SubItems true <ExtBookingSubItems> list List of sub items

ExtBookingSubUnit

Property Name Required Type Description
Id false string The Id of the sub unit
RelationType false string Attached or STC (Said To Contain)
RelativeId true int Indicates the order of the sub item in the sent object
IsCanceled true bool Indicates whether the sub unit is canceled
Description false string Vehicle’s model
BolDescription false string vehicle’s model to show on the bill of lading
SerialType false string Serial or VIN
Weight false int The weight of the sub unit
year false int The registration year of the sub unit
VehicleValue false decimal The sub unit’s price
Currency false string The sub unit’s price’s currency
Notes false string Additional notes
Transit true ExtBookingTransit The transit object
UpdatePaperForCustoms true bool Indicates whether to update customs paper
PaperForCustoms true ExtFile Customs paper object

ExtBookingSubItem

Property Name Required Type Description
Id false string Id of the sub item
RelativeId true int Indicates the order of the sub item in the sent object
IsCanceled true bool Indicates whether the sub item is canceled
Description false string Cargo description
Notes false string Additional notes
UpdatePaperForCustoms true bool Indicates whether to update customs paper
PaperForCustoms true ExtFile Customs paper object

ExtBookingParty

Property Name Required Type Description
Id false string Id of the booking party
Code false string The code of the booking party
Name false string The name of the booking party
Mobile false string The mobile number of the booking party
Phone false string The phone number of the booking party
Email false string The email address of the booking party
Address true ExtBookingPartyAddress The booking party’s address’s object
IsReferenceOnly true bool Indicates whether the booking party is reference only

ExtBookingPartyAddress

Property Name Required Type Description
Address1 false string Street details
Address2 false string Appartment details
Country false string The name of the country
Region false string The name of the region
City false string The name of the city
Street false string The name of the street
PostalCode false string The postal code
IsBolManual true bool Indicates whether the bill of lading is manual
Bol false string The bill of lading number

ExtBookingTransit

Property Name Required Type Description
Description true string The transit description
Country true string The transit country
Pod false string The name of the port of discharge

Sample object

Status code: 200

JSON

{
  "TestOnly": True,//To push test bookings. Tests will pass through all business validations but will not be saved.
  "Booking": {
    "Header": {
      "Id": "",
      "IsCanceled": false,
      "ReferenceNumber": "",
      "Description": "",
      "BookingCode":"",
      "Pol": "BEANR",
      "Terminal": "332",
      "BookingVoyage": "16CR01",
      "Pod": "CIABJ",
      "AgentId": 0,//to be provided by Line, static by caller
      "Line": "Sallaum Lines DMCC",
      "Shipper": {
        "Id": "",
        "Code": null,
        "Name": "Shipper name",
        "Mobile": "",
        "Phone": "",
        "Email": "",
        "Address": {
          "Adress1: "",
          "Address2: "",
          "Country": "BE",
          "City": "ANTWERP",
          "Street": "Street name",
          "PostalCode": "00000",
          "IsBolManual": true,
          "Bol": "4 lines, 50 chars max per line"
        },
         "IsReferenceOnly": true
      },
      "Exporter": {
        "Id": "",
        "Code": null,
        "Name": "Exporter name",
        "Mobile": "",
        "Phone": "",
        "Email": "",
        "Address": {
          "Adress1: "",
          "Address2: "",
          "Country": "BE",
          "City": "ANTWERP",
          "Street": "Street name",
          "PostalCode": "00001",
          "IsBolManual": true,
          "Bol": "4 lines, 50 chars max per line"
        },
         "IsReferenceOnly": true
      },
      "Consignee": {
        "Id": "",
        "Code": null,
        "Name": "Consignee name",
        "Mobile": "",
        "Phone": "",
        "Email": "",
        "Address": {
          "Adress1: "",
          "Address2: "",
          "Country": "CI",
          "City": "Abidjan",
          "Street": "Street name",
          "PostalCode": "00002",
          "IsBolManual": true,
          "Bol": "4 lines, 50 chars max per line"
        },
         "IsReferenceOnly": true
      },
      "IntermediateConsignee": {
        "Id": "",
        "Code": null,
        "Name": "Intermediate consignee name",
        "Mobile": "",
        "Phone": "",
        "Email": "",
        "Address": {
          "Adress1: "",
          "Address2: "",
          "Country": "CI",
          "City": "Abidjan",
          "Street": "Street name",
          "PostalCode": "00003",
          "IsBolManual": true,
          "Bol": "4 lines, 50 chars max per line"
        },
         "IsReferenceOnly": true
      },
      "Notify": {
        "Id": "",
        "Code": null,
        "Name": "Notify name",
        "Mobile": "",
        "Phone": "",
        "Email": "",
        "Address": {
          "Adress1: "",
          "Address2: "",
          "Country": "CI",
          "City": "Abidjan",
          "Street": "Street name",
          "PostalCode": "00004",
          "IsBolManual": true,
          "Bol": "4 lines, 50 chars max per line"
        },
         "IsReferenceOnly": true
      },
      "Nvocc": {
        "Id": "",
        "Code": null,
        "Name": "Notify name",
        "Mobile": "",
        "Phone": "",
        "Email": "",
        "Address": {
          "Adress1: "",
          "Address2: "",
          "Country": "CI",
          "City": "Abidjan",
          "Street": "Street name",
          "PostalCode": "00004",
          "IsBolManual": true,
          "Bol": "4 lines, 50 chars max per line"
        },
         "IsReferenceOnly": true
      },
      "DestinationAgent": {
        "Id": "",
        "Code": null,
        "Name": "Notify name",
        "Mobile": "",
        "Phone": "",
        "Email": "",
        "Address": {
          "Adress1: "",
          "Address2: "",
          "Country": "CI",
          "City": "Abidjan",
          "Street": "Street name",
          "PostalCode": "00004",
          "IsBolManual": true,
          "Bol": "4 lines, 50 chars max per line"
        },
         "IsReferenceOnly": true
      },
      "Collector": {
        "Id": "",
        "Code": null,
        "Name": "Notify name",
        "Mobile": "",
        "Phone": "",
        "Email": "",
        "Address": {
          "Adress1: "",
          "Address2: "",
          "Country": "CI",
          "City": "Abidjan",
          "Street": "Street name",
          "PostalCode": "00004",
          "IsBolManual": true,
          "Bol": "4 lines, 50 chars max per line"
        },
         "IsReferenceOnly": true
      },
     "CustomsTemplateId": ""
    },
    "Items": [
      {
        "Id": null,
        "RelativeId": 1,
        "IsCanceled": false,
        "Reference": "",
        "Description": "MAN TRUC",
        BolDescription": "",
        "SerialType: "SERIAL",
        "SerialNumber": "155414893",
        "Year": null,
        "Type": "C",//C: Car (POV), V: Van (SUV), B: Big Van (High SUV), T: Truck (High and heavy, U: General Cargo
        "Length": 1050,
        "Width": 305,
        "Height": 310,
        "Weight": 15300,
        "HasCustomCBM": false,
        "BolCbm": "",
        "Priority": "USED",
        "Block": false,
        "BlockReason": null,
        "Mobility": "Regular",
        "Insured": false,
        "VehicleValue": null,
        "Currency": null,
        "CountryOfOrigin": null,
        "StateOfOrigin": "",
        "TitleNumber": "",
        "TitleState": "",
        "Notes": null,
        "CTN": "",
        "ClearanceDoc": null,//Customs ITN number, 
        "SealNumber": "",
        "PaymentMode": null,
        "Client":  {
         "Id": "",
         "Code": null,
         "Name": "Notify name",
         "Mobile": "",
         "Phone": "",
         "Email": "",
         "Address": {
           "Adress1: "",
           "Address2: "",
           "Country": "CI",
           "City": "Abidjan",
           "Street": "Street name",
           "PostalCode": "00004",
           "IsBolManual": true,
           "Bol": "4 lines, 50 chars max per line"
                    },
         "IsReferenceOnly": true
         },
        "IsClientManual": true,
        "Transit": {
          "Description": "",
          "Country": "",
          "Pod": ""
        },
        "UpdatePaperForCustoms": "true",
        "PaperForCustoms": "",
        "SubUnit": [
          {
            "Id": "",
            "RelationType": "Attached",
            "RelativeId": 1,
            "IsCanceled": false,
            "Description": "TRAILER LOOSE",
            "BolDescription": "",
            "SerialType": "SERIAL",
            "SerialNumber": "XXA145Z1",
            "Weight": "20000",
            "Year": "",
            "VehicleValue": "",
            "Currency": "",
            "Notes": "",
            "Transit": {
            "Description": "In transit to Niger",
            "Country": "NE",
            "Pod": "Abidjan"
        },
           "UpdatePaperForCustoms": "true",
           "PaperForCustoms": ""
          },
          {
            "Id": "",
            "RelationType": "STC",
            "RelativeId": 2,
            "IsCanceled": false,
            "Description": "TOYOTA COROLLA VERSO",
            "BolDescription": "",
            "SerialType": "VIN",
            "SerialNumber": "144524",
            "Weight": "850",
            "Year": "1997",
            "VehicleValue": "",
            "Currency": "",
            "Notes": "",
            "Transit": {
            "Description": "In transit to Niger",
            "Country": "NE",
            "Pod": "Abidjan"
        },
           "UpdatePaperForCustoms": "true",
           "PaperForCustoms": ""
          }
        ],
        "SubItem": [
          {
            "Id": "",
            "RelativeId": 1,
            "IsCanceled": false,
            "Description": "50 USED TIRES",
            "Notes": "",
           "UpdatePaperForCustoms": "true",
           "PaperForCustoms": ""
       }
     ]
   }
  ]
 }
}

Logical Validation

A sequence of business logic lays on top of the code to determine whether a booking can be processed into the database or not. Some of these business rules are:

  1. All the values must be defined in the system. If not found, a NOT FOUND exception shall be generated. (I.e. Bookings can only be edited by owner or owner’s shipping line.) a. Terminal not found b. Pod not found c. Unit Reference not found (make and model) d. Unknown booking parties (shipper, exporter, consignee, notify…)
  2. To update an existing booking, booking item or sub item, they must be found in the database based on the ID that is already matched and sent to the client. In case the id is not found, error NOT FOUND will be sent to caller.
  3. To update an existing booking, a booking item or a sub item, when found, the target must not be canceled. If canceled, error NOT ALLOWED is sent to caller.
  4. To change the terminal, POL of a unit, the unit must still be in Approved status. (Statuses are described below in details). Other than that, the error NOT ALLOWED is sent to the caller.
  5. Required fields for a booking are: a. Pol b. Terminal c. Shipper entities (shipper, exporter, consignee and notify) are required. Intermediate consignee is not required. d. Booking must at least contain 1 item in it e. Pol <> Pod f. A booking can contain a max of 250 items.
  6. Required fields for an item are: a. Make and model (description) b. Serial number: i. Cannot contain spaces ii. Length between 5 and 21 inclusive (if type = Vin) iii. Length between 3 and 25 inclusive (if type = Serial) iv. No special characters allowed, only alpha-numeric are allowed (in case of Vin only) v. Cannot contain I(i), O(o) or Q(q) (in case of Vin only) c. Registration year (in case specified) must be valid (> 1900, and < (this year + 2)) d. Priority code (Used, New, VIP, Priority)
  7. Full chassis for same make and model must be unique as per ISO specifications (cannot be repeated over a cycled of 35 years) for the same Pol.
  8. Last 6 characters of the same make and model must be unique. In case of duplicates, a full chassis will be required to identify the difference between the units.
  9. Chassis must be unique within the same POL. In case of exceptions, contact the line to solve the issue.
  10. When a unit is delivered, update is not allowed on priority. To make the change, it must go through the line.
  11. You cannot cancel or delete a unit that already has a status other than approved, or that is still in draft mode.
Was this article helpful to you? Yes No

How can we help?

🏆 2023 Achievements at Logisoft & Upcoming 2024 Plans
This is default text for notification bar