• Log in
  • Request invite
Sengerio Sengerio Sengerio Sengerio
  • Products
    • Charters
    • Lines
    • Scheduler
    • Fleet
    • HR
    • Invoices
    • Driver App
    • Booking App
    • Operator App
  • Who it’s for
    • Transport company
    • Buyer
  • About us
  • Blog
    • Most recent
    • Business journey
    • Green journey
    • Case studies
    • Leadership
    • Product
  • Help
    • Knowledge base
    • Video Tutorials
    • Contact us
    • Remote support
    • Request a demo
    • Sengerio API
  • English
    • Italian
Sengerio Sengerio
  • Products
    • Charters
    • Lines
    • Scheduler
    • Fleet
    • HR
    • Invoices
    • Driver App
    • Booking App
    • Operator App
  • Who it’s for
    • Transport company
    • Buyer
  • About us
  • Blog
    • Most recent
    • Business journey
    • Green journey
    • Case studies
    • Leadership
    • Product
  • Help
    • Knowledge base
    • Video Tutorials
    • Contact us
    • Remote support
    • Request a demo
    • Sengerio API
  • English
    • Italian

Hire

Request bookings

GET https://api.sengerio.com/v1/bookings

Parameters

NameTypeRequiredDefaultNotes
filterjsonYesSet of properties to filter in an AND clause. For each property select the operator (gt: greather than; lt: less than; eq: equals; in: is in array) and the value to filter.

Datetime and number values must be written in the standard format (yyyy-mm-dd for dates and 10.30 for numbers).

[
  {
    "property":"status",
    "operator":"in",
    "value":["Open"]
  },
  {
    "property":"cancelled",
    "operator":"eq",
    "value":false
  }
]
sortjsonNoProperty name and sort direction (ASC or DESC) on which sort the result.

[
  {
    "property":"created_at",
    "direction":"DESC"
  }  
]
startintegerNo1Initial row
limitintegerNo25Number of rows per page.


Example response

{
    "success": true,
    "total": 9,
    "rows": [ 
      {
        "id": 7219308,
        "number": "181",
        "passengers": 5,
        "status": "Open",
        "reference": "AT91312",
        "seats": 8,
        "vehicle_type": "Minivan",
        "customer": "Blue Travel Group",
        "route": "Brooklyn; JFK",
        "gross_total_price": "165.00",
        "created_at": "2018-04-15 17:35:00",
        "start_date": "2018-06-28 09:45:00",
        "finish_date": "2018-06-28 11:45:00",
        ...
     },
     {
        "id": 7219127,
        "number": "180",
        ...
     } 
   ]
}

Read booking

GET https://api.sengerio.com/v1/booking

You must use at least one parameter from the following. The params ‘number’ and ‘serie_period’ must be used together.

Parameters

NameTypeRequiredDefaultNotes
idintegerNoBooking Id
numberstringNo (Yes if used with ‘serie_period’)Booking Number
serie_periodstringNo (Yes if used with ‘number’)Year of the booking serie

 

Example response

{
    "success": true,
    "data": {
        "id": 562459,
        "operator_id": 47202,
        "serie_name": "B2017",
        "serie_period": "2018",
        "number": "106B",
        "prefix_part": null,
        "suffix_part": "B",
        "number_part": 106,
        "passengers": 11,
        "updated_at": 1501843214,
        "business_partner_id": 62276,
        ...
        "pricing": {
           "id": 632434,
           "total_vehicle_price": "150.00",
           "total_vat": "15.00",
           "gross_total_price": "165.00",
           ...
           "priceRows": [
             {
                "id": 632405,
                "quantity": 1,
                "unit_price": "150.00",
                "vat_percentage": "10.00",
                "vat_amount": "15.00",
                "gross_total_price": "165.00",
                ...
             }
           ]
        },
        "route": {
           "id": 633934,
           "route": "Brooklyn; JFK",
           "departures": "Brooklyn;",
           "arrivale": "JFK",
           ...
        },
        "working": {
           "id": 612110,
           ...
           "vehicleHireDuties": [
              {
                 "id": 1169730,
                 "duty_code": "1.1",
                 "resource_type": "Vehicle",
                 "distance_start": 150000,
                 "distance_finish": 155000,
                 "actual_distance": 5000,
                 ...
              },
              {
                 "id": 1171270,
                 "duty_code": "1.1 A",
                 "resource_type": "Driver",
                 "presence_start": "2018-06-21 09:30:00",
                 "presence_finish":"2018-06-21 11:40:00",
                 "driving_times_in_hours": 2,
                 "driving_times_in_minutes": 10,
                 ...
              }
           ]
        },       
        ...
   ]
}

Write booking

POST https://api.sengerio.com/v1/booking
Parameters

NameTypeRequiredNotes
dto_node_namestringYesValue = Hire.Booking
datajsonYesBooking part with id and updated_at is mandatory. “U” key means Update, “C” key is for Create. Datetime and number values must be written in the standard format (yyyy-mm-dd for dates and 10.30 for numbers).
compute_price_row_on_basisstringYesValue = unit or total
compute_cost_row_on_basisstringYesValue = unit or total


Example request (update presence and distances of booking hire duties)

    "dto_node_name": Hire.Booking,
    "data": [
       {
          "Hire.Booking":{
             "U": [
                 {
                    "id":562459,
                    "updated_at": 1501843214
                 }
             ]
          },
         "Hire.VehicleHireDuty": {
             "U": [
                 {
                    "id": 1171270,
                    "presence_start":"2018-06-21 09:30:00",
                    "presence_finish":"2018-06-21 11:50:00",
                 },
                 {
                    "id": 1169730,
                    "distance_start": 155000,
                    "distance_finish": 156000,
                    "actual_distance": 1000
                 }
             ]
          }
       }
    ]


Example request (update price row)

    "dto_node_name": Hire.Booking,
    "data": [
       {
          "Hire.Booking":{
             "U": [
                 {
                    "id":562459,
                    "updated_at": 1501843214
                    "compute_row_on_basis": "unit"
                 }
             ]
          },
         "Hire.PriceRow": {
             "U": [
                 {
                    "id": 712701,
                    "unit_price":"150.00",
                    "quantity":1
                 }
             ]
          }
       }
    ]


Booking creation example request

    "dto_node_name": Hire.Booking,
    "data": [
       {
          "Hire.Booking":{
             "C": [
                 {
                    "id":-1,
                    "serie_name":"Default",
                    "serie_period":"Undefined",
                    "customer_id": 67540,
                    "passengers": 40,
                    "created_as":"customer_booking",
                    "vehicles_quantity": 1,
                    "seats": 49,
                    "vehicle_type":"Coach",
                    "travel_type":"Transfer",
                    "macro_type":"private_transfer",
                    "pricingId": -1,
                    "costingId": -1,
                    "routeId": -1,
                    "workingId": -1,
                    "compute_price_row_on_basis": "unit",
                    "compute_cost_row_on_basis": "unit",
                    "supplier_id": 17202,
                    "team_id": 150,
                    "team_label": "Default"
                 }
             ]
          },
         "Hire.Pricing": {
             "C": [
                 {
                    "id": -1,
                    "trade_currency": "USD"
                 }
             ]
          },
         "Hire.Costing": { 
             "C": [
                 { 
                    "id": -1,
                    "trade_currency": "USD" 
                 }
             ]
          },
         "Hire.PriceRow": {
             "C": [
                 {
                    "id": -1,
                    "position": 1,
                    "type":"Transport",
                    "hire_duty_code":"All",
                    "description":"Vehicle",
                    "quantity": 1,
                    "unit_price":"580.00",
                    "trade_currency": "USD"
                 }
             ]
          },
         "Hire.CostRow": { 
             "C": [ 
                 { 
                    "id": -1, 
                    "position": 1, 
                    "type":"Transport",
                    "hire_duty_code":"All",
                    "description":"Vehicle",
                    "quantity": 1, 
                    "unit_cost":"300.00",
                    "trade_currency": "USD" 
                 }
             ]
          },
         "Hire.Route": {
             "C": [
                 {
                    "id": -1,
                    "distance": 19,
                    "total_distance": 19
                 }
             ]
          },
         "Hire.RoutePoint": {
             "C": [
                 {
                    "id": -1,
                    "position": 1,
                    "type":"pickup_date",
                    "business_name_or_poi":"Niagara Falls",
                    "city":"Buffalo",
                    "transit_date":"2018-09-01 08:15:00",
                    "routeId": -1
                 },
                 {
                    "id": -2,
                    "position": 2,
                    "type":"dropoff_date",
                    "city":"Buffalo",
                    "transit_date":"2018-09-01 08:50:00",
                    "routeId": -1
                 }
             ]
          },
         "Hire.Working": {
             "C": [
                 {
                    "id": -1
                 }
             ]
          }
       }
    ]

Cancel booking

PUT https://api.sengerio.com/v1/booking/:id/cancel
Example response

{
    success: true
}

Read geographical points

GET https://api.sengerio.com/v1/geographical-points

Parameters

NameTypeRequiredDefaultNotes
filterjsonYesSet of properties to filter in an AND clause. For each property select the operator (gt: greather than; lt: less than; eq: equals; in: is in array) and the value to filter.

[
  {
    "property":"name",
    "operator":"eq",
    "value":"Brooklyn"
  }
]
sortjsonNoProperty name and sort direction (ASC or DESC) on which sort the result.

[
  {
    "property":"name",
    "direction":"ASC"
  }  
]
startintegerNo1Initial row
limitintegerNo25Number of rows per page.


Example response

{
    "success": true,
    "total": 3,
    "rows": [ 
      {
        "id": 7219308,
        "business_name_or_poi": "Brooklin Hospital",
        "address": "Clarkson Ave",
        "city": "Brooklin",
        "code": "BR23",
        "coordinates": [
          {
             "lat": "40.6560529",
             "lng": "-73.9395549"
          }
        ],
        ...
     },
     {
        "id": 7219127,
        "code": "BR45",
        ...
     } 
   ]
}

Create a quote request

POST https://api.sengerio.com/v1/quote-request

Parameters

NameTypeRequiredNotes
dto_node_namestringYesValue = Hire.GetQuote
datajsonYesDatetime and number values must be written in the standard format (yyyy-mm-dd for dates and 10.30 for numbers).


Quote request creation example request

    "dto_node_name": Hire.GetQuote,
    "data": [
       {
          "Hire.GetQuote":{
             "C": [
                 {
                    "id":-1,
                    "routeId":-1,
                    "name":"Jhon Smith",
                    "email":"jhonsmith@example.com",
                    "telephone":"+39333456789",
                    "passengers": 30,
                    "travel_type":"Private transfer",
                    "seats": 22,
                    "vehicle_type": "Minibus",
                    "vehicles_quantity": 2,
                    "note":"simple text..."
                 }
             ]
          },
         "Hire.Route": {
             "C": [
                 {
                    "id": -1
                 }
             ]
          },
         "Hire.RoutePoint": {
             "C": [
                 {
                    "id": -1,
                    "routeId": -1,
                    "transit_date":"2018-09-01 08:15:00",
                    "business_name_or_poi":"Niagara Falls",
                    "city":"Buffalo",
                    "tag":"Other point of interest"
                 },
                 {
                    "id": -2,
                    "routeId": -1,
                    "transit_date":"2018-09-01 08:50:00",
                    "free_text":"Toronto station"
                 }
             ]
          }
       }
    ]

In the route points the values of the fields ‘business_name_or_poi’, ‘city’, ‘state’, ‘postal_code’, ‘country’, ‘tel’ and ‘tag’ come from the data inserted in the ‘Places’ inside Sengerio.
If a route point is inserted from other sources it must be used the ‘free_text’ field, as in the example above.
The value put in the ‘free_text’ field will be copied in the ‘instruction’ field of the Route Point.

API Documentation

  • Getting started
    • Authentication
    • Language
    • Endpoints
    • Formats
  • Accounting
    • Invoices
    • Read invoice
    • Create and update Invoices
    • Open invoice
    • Close invoice
    • Freeze invoice
    • Payments
  • Hire
    • Bookings
    • Read booking
    • Write booking
    • Cancel booking
    • Read geographical points
    • Create quote request
  • Vehicles
    • Request vehicles
    • Read vehicle
  • Human resources
    • Read human resource
    • Write human resource
    • Drivers activities
    • Absences
  • Business partners
    • Request business partners
    • Read business partner
    • Write business partner
    • Active block
    • Active
    • Inactive
More Questions?

We're happy to help! Get in touch

Company

  • About us
  • Contact us
  • Request a demo
  • Blog

Products

  • Charters
  • Lines
  • Scheduler
  • Fleet
  • HR
  • Invoices
  • Driver App
  • Booking App
  • Operator App

Who it’s for

  • Transport company
  • Buyer

Helpful links

  • Login
  • Knowledge base
  • Video tutorials
  • Remote support
  • Sengerio API

Policies

  • Terms of service
  • Privacy & Cookies
Made with by ALLBUS IT01064440520 credits