POST https://api.sengerio.com/v1/booking
Parameters
Name | Type | Required | Notes |
---|
dto_node_name | string | Yes | Value = Hire.Booking |
data | json | Yes | Booking 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_basis | string | Yes | Value = unit or total |
compute_cost_row_on_basis | string | Yes | Value = 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
}
]
}
}
]