Create ride

POST {{AppUrl}}/api/v1/agency/ride

Introduction

Create a new ride for a customer. The customer should have an active contract with the same transport type. For WMO contracts an active card is required for the customer.

Structure

ItemTypePluralityOptionsRequiredDescriptionValidation
customer_idinteger1yesCustomer ID.The customer the ID belongs to needs to be active.
The customer the ID belongs to needs a card if the transport type is wmo.
rbs_numbervarchar(255)1yesRBS number (agency ride ID).The RBS number of a ride should always be unique.
transport_typevarchar(255)1llv
omd
wmo
yesThe transport type that is applicable for this ride.The customer needs an active budget for the transport type on the ideal pick-up or drop-off date.
A plot should exist for the municipality the customer belongs to and the selected transport type.
distance_kmdecimal(8,2)1yesDistance in kilometers.
distance_zonesinteger1yesDistance in zones.
locationsarray2yesExactly two locations must be supplied, one with the action 'pickup' and the other with the action 'dropoff'.
actionvarchar(255)1pickup
dropoff
yesThe action of the location.
idealDateTime1yes*Ideal time to arrive. Is required once for action 'pickup' or 'dropoff', not both.ISO date.
typevarchar(255)1coordinate
address
noIndicates whether the location is a coordinate or address.
coordinateobject1yes*The coordinates of the location. Coordinate or address is required.*Only required if the type is 'coordinate'.
latitudedecimal(8,6)1yesLatitudinal coordinate.Should be greater than or equal to -180.
Should be less than or equal to 180.
longitudedecimal(9,6)1yesLongitudinal coordinate.Should be greater than or equal to -90.
Should be less than or equal to 90.
addressobject1yes*The address of the location.*Only required if the location type is 'address'.
streetvarchar(255)1yesThe street name.
numbervarchar(255)1yesThe street number.
additionvarchar(255)1noThe street number addition.
postcodevarchar(255)1yesThe postal code.
placevarchar(255)1yesThe place.
descriptionvarchar(255)1noOptional description that can be supplied by the agency.
passengersarrayNyesAn inventory of passengers for the ride.
typevarchar(255)1customer
assistance
guide-dog
companion
yesThe passenger type.
tariffvarchar(255)1normal
reduced
free
yesThe applicable tariff for the passenger.
quantityinteger1yesThe number of passengers of this type.
descriptionvarchar(255)1noAn optional description that can be provided by the agency.
indicationsarrayNnoA list of indications that is applicable for the ride.
typevarchar(255)1assistance
scootmobile
guide-dog
solo
rollator
sit-in-front
room
low-entrance
family
push-wheelchair
foldable-wheelchair
electric-wheelchair
assistance
extra-high-wheelchair
extra-wide-wheelchair
leg-support
extra-large-entrance
extra-large-seat
sms-service
call-service
type-1
type-2
type-3
child
pet
free-counselor
social-counselor
yesThe indication type.
quantityinteger1yesThe number of times this indication is required / requested.
contributionsarrayNyesContribution the customer will pay for the ride.
typevarchar(255)1personal-contribution
social-mentor
inner-zones
outer-zones
late-booking
yesEigen bijdrage
Eigen bijdrage sociaal begeleider
Eigen bijdrage onder 25 km of 1-5 zone
Eigen bijdragen boven 25 km of 5e zone
Laatboek toeslag
amountinteger1yesThe amount of contribution the customer will pay in cents.Should be greater than or equal to 0.
remarkvarchar(255)1noAn optional remark the agency can provide for the ride.
callcentre_employeevarchar(255)1yesThe call centre employee who booked the ride.
callback_numbervarchar(255)1noThe phonenumber to use for a callback.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring
Content-Typestring

RESPONSES

status: Created

{"data":{"id":392,"transport_type":"wmo","distance_km":15.23,"distance_zones":2,"rbs_number":"1234567890","remark":"Et suscipit rem totam modi.","callcentre_employee":"Jet Hussain","callback_number":"+3120 5852978","customer":{"id":7,"first_name":"Aiden","initials":"A","infix":"","last_name":"Willemsen","gender":"m","phone":"+3120 5852978","mobile":"+31(0)6-43813624","municipality_name":"Rheden","bankaccount":"NL27YBGI2209095944","bankaccount_name":"D Blewanus","restrictions":["auditory"],"indications":["extra-large-entrance","foldable-wheelchair","scootmobile","social-counselor"],"card_number":973052009},"locations":[{"type":"address","action":"pickup","description":"Repellat impedit ducimus hic molestiae.","ideal":"2018-08-09T17:00:10+02:00","address":{"street":"van den Boschweg","number":"2732","addition":"bis","zipcode":"6092 UY","place":"Enschede"}},{"type":"coordinate","action":"dropoff","description":"Repellat impedit ducimus hic molestiae.","ideal":null,"coordinate":{"latitude":"-99.999999","longitude":"40.593000"}}],"passengers":[{"type":"customer","tariff":"reduced","description":"Repellat impedit ducimus hic molestiae.","quantity":1},{"type":"guide-dog","tariff":"free","description":"Repellat impedit ducimus hic molestiae.","quantity":1}],"indications":[{"type":"leg-support","quantity":1},{"type":"sit-in-front","quantity":1}],"contributions":[{"type":"personal-contribution","amount":200},{"type":"social-mentor","amount":300}],"statuses":[],"created_at":"2019-01-24T14:13:59+01:00","updated_at":"2019-01-24T14:13:59+01:00","deleted_at":null}}