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
Item | Type | Plurality | Options | Required | Description | Validation | ||
---|---|---|---|---|---|---|---|---|
customer_id | integer | 1 | yes | Customer 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_number | varchar(255) | 1 | yes | RBS number (agency ride ID). | The RBS number of a ride should always be unique. | |||
transport_type | varchar(255) | 1 | llv omd wmo | yes | The 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_km | decimal(8,2) | 1 | yes | Distance in kilometers. | ||||
distance_zones | integer | 1 | yes | Distance in zones. | ||||
locations | array | 2 | yes | Exactly two locations must be supplied, one with the action 'pickup' and the other with the action 'dropoff'. | ||||
action | varchar(255) | 1 | pickup dropoff | yes | The action of the location. | |||
ideal | DateTime | 1 | yes* | Ideal time to arrive. Is required once for action 'pickup' or 'dropoff', not both. | ISO date. | |||
type | varchar(255) | 1 | coordinate address | no | Indicates whether the location is a coordinate or address. | |||
coordinate | object | 1 | yes* | The coordinates of the location. Coordinate or address is required. | *Only required if the type is 'coordinate'. | |||
latitude | decimal(8,6) | 1 | yes | Latitudinal coordinate. | Should be greater than or equal to -180. Should be less than or equal to 180. | |||
longitude | decimal(9,6) | 1 | yes | Longitudinal coordinate. | Should be greater than or equal to -90. Should be less than or equal to 90. | |||
address | object | 1 | yes* | The address of the location. | *Only required if the location type is 'address'. | |||
street | varchar(255) | 1 | yes | The street name. | ||||
number | varchar(255) | 1 | yes | The street number. | ||||
addition | varchar(255) | 1 | no | The street number addition. | ||||
postcode | varchar(255) | 1 | yes | The postal code. | ||||
place | varchar(255) | 1 | yes | The place. | ||||
description | varchar(255) | 1 | no | Optional description that can be supplied by the agency. | ||||
passengers | array | N | yes | An inventory of passengers for the ride. | ||||
type | varchar(255) | 1 | customer assistance guide-dog companion | yes | The passenger type. | |||
tariff | varchar(255) | 1 | normal reduced free | yes | The applicable tariff for the passenger. | |||
quantity | integer | 1 | yes | The number of passengers of this type. | ||||
description | varchar(255) | 1 | no | An optional description that can be provided by the agency. | ||||
indications | array | N | no | A list of indications that is applicable for the ride. | ||||
type | varchar(255) | 1 | assistance 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 | yes | The indication type. | |||
quantity | integer | 1 | yes | The number of times this indication is required / requested. | ||||
contributions | array | N | yes | Contribution the customer will pay for the ride. | ||||
type | varchar(255) | 1 | personal-contribution social-mentor inner-zones outer-zones late-booking | yes | Eigen bijdrage Eigen bijdrage sociaal begeleider Eigen bijdrage onder 25 km of 1-5 zone Eigen bijdragen boven 25 km of 5e zone Laatboek toeslag | |||
amount | integer | 1 | yes | The amount of contribution the customer will pay in cents. | Should be greater than or equal to 0. | |||
remark | varchar(255) | 1 | no | An optional remark the agency can provide for the ride. | ||||
callcentre_employee | varchar(255) | 1 | yes | The call centre employee who booked the ride. | ||||
callback_number | varchar(255) | 1 | no | The phonenumber to use for a callback. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string | ||
Content-Type | string |
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}}