{"openapi":"3.1.0","info":{"title":"RoutiGo Configuration REST API","description":"\nConfigure the vehicles, shifts and skills that RoutiGo plans with. Every call is scoped to the\ncompany provided (either implicitly via API-KEY authentication or explicitly when using the Bearer token authentication),\nand the vehicle and shift calls to the service centre given in the path.\n\n### Authentication\nAll requests must be authenticated. This API supports the following methods:\n- **X-API-KEY** — API key for standard client access, passed as a request header.\n- **Bearer token** — JWT token passed via the `Authorization: Bearer <token>` header.\n\nIn case the Bearer token is used, a second header should be added, namely the `X-COMPANY-CODE` header\nwith the company code as the value. An API-key is always bound to a single company and requires no extra header to be set.\n\nFor more information, see the [Authentication section](https://apidocs.routigo.com/concepts/authentication).\n","contact":{"name":"RoutiGo Team","url":"https://www.routigo.com","email":"team@routigo.com"},"version":"2.0"},"servers":[{"url":"https://api.routigo.com/api"}],"tags":[{"name":"Skills","description":"\nSkills are capabilities a vehicle can have and a shipment can require. Planning only assigns a shipment to a\nvehicle that has every skill the shipment needs, which makes skills the way to express requirements such as\na tail lift, a cooled compartment or a certified driver.\n\nSkills are configured per company: RoutiGo-defined skills are switched on or off, and user-defined skills are\ncreated by the company itself. Only a skill that is enabled for the company can be assigned to a vehicle, so enable\nit here before referencing it in the **Vehicles** calls.\n"},{"name":"Vehicles","description":"\nA vehicle is the resource a service centre plans with: its type, start and end location, skills, its\ncapacity and limits. Vehicles are managed per service centre.\n\n### Relation to shifts\nA vehicle is never planned on its own — it only enters planning through a **shift**. A shift refers to exactly one\nvehicle by its identifier, and the same vehicle can be used by several shifts, for example a morning and an evening\nshift on the same van. In short: a vehicle describes *what* drives, a shift describes *when* it drives.\n\nBecause a shift inherits the locations, skills, capacity and limits of its vehicle:\n\n- changing a vehicle changes every shift that uses it.\n- a vehicle that is still used by a shift cannot be deleted — delete or reassign those shifts first.\n- when a vehicle has no end location, the routes of its shifts end at its start location.\n\nCreate the vehicle first, then the shifts that use it.\n"},{"name":"Shifts","description":"\nA shift defines when a vehicle of a service centre is available for planning: its start time, its end time and\nwhether the vehicle returns to the depot afterwards. A shift is identified by its route name and route code, which\ntogether must be unique within the service centre.\n\n### Relation to vehicles\nEvery shift references exactly one **vehicle**, through the vehicle identifier, and that vehicle must exist in the\nsame service centre. The shift itself only carries the time window: the start and end location, the skills, the\ncapacity and the limits used for planning all come from the vehicle it points at. One vehicle can carry several\nshifts, but a shift can never exist without a vehicle.\n"}],"paths":{"/v2/configuration/serviceCentre/{serviceCentreCode}/shift":{"get":{"tags":["Shifts"],"summary":"Fetch all shifts of a service centre","description":"Returns every shift of the given service centre, or an empty list when it has none. Requires the ADMIN, PLANNER, SUBCO, READONLY or SEARCHONLY role on the service centre.","operationId":"fetchShifts","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Shifts successfully found and returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Shift"}}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]},"post":{"tags":["Shifts"],"summary":"Create a shift","description":"Creates a shift for the given service centre and returns it with its generated identifier. The route name and route code together must be unique within the service centre, the referenced vehicle must exist in the same service centre, and the end time, when given, must lie after the start time. The shift is also registered as a route in RoutiGo. Requires the ADMIN or PLANNER role on the service centre.","operationId":"createShift","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"The shift to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftToCreateDto"},"examples":{"Morning shift":{"summary":"A shift from 09:00 to 17:00 on an existing vehicle","description":"Morning shift","value":{"routeName":"Rit","routeCode":"01","vehicleIdentifier":"23487234-7623476236-B76","startTime":"PT09H","endTime":"PT17H","returnToDepot":true}}}}},"required":true},"responses":{"201":{"description":"Shift is successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]}},"/v2/configuration/serviceCentre/{serviceCentreCode}/shift/{shiftId}":{"get":{"tags":["Shifts"],"summary":"Fetch a single shift by id","description":"Returns one shift of the given service centre. Responds with 404 when no shift with this identifier exists in that service centre. Requires the ADMIN, PLANNER, SUBCO, READONLY or SEARCHONLY role on the service centre.","operationId":"fetchShift","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"shiftId","in":"path","description":"A shift identifier","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Shift successfully found and returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]},"put":{"tags":["Shifts"],"summary":"Update a shift","description":"Replaces the start time, end time, vehicle and return-to-depot flag of an existing shift; the route name and route code cannot be changed. The referenced vehicle must exist in the same service centre. The corresponding route in RoutiGo is updated as well. Requires the ADMIN or PLANNER role on the service centre.","operationId":"updateShift","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"shiftId","in":"path","description":"A shift identifier","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"The shift to update to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftToUpdateDto"},"examples":{"Later start":{"summary":"Move the shift to 10:00 - 18:00 and switch vehicle","description":"Later start","value":{"startTime":"PT10H","endTime":"PT18H","vehicleIdentifier":"23487234-7623476236-B76","returnToDepot":true}}}}},"required":true},"responses":{"200":{"description":"Shift is successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]},"delete":{"tags":["Shifts"],"summary":"Delete a shift","description":"Deletes a shift and removes the corresponding route from RoutiGo. Requires the ADMIN or PLANNER role on the service centre.","operationId":"deleteShift","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"shiftId","in":"path","description":"A shift identifier","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Shift is successfully deleted","content":{}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]}},"/v2/configuration/serviceCentre/{serviceCentreCode}/vehicle":{"get":{"tags":["Vehicles"],"summary":"Fetch all vehicles of a service centre","description":"Returns every vehicle of the given service centre, or an empty list when it has none. Requires the ADMIN, PLANNER, SUBCO, READONLY or SEARCHONLY role on the service centre.","operationId":"fetchVehicles","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Vehicles successfully found and returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Vehicle"}}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]},"post":{"tags":["Vehicles"],"summary":"Create a vehicle","description":"Creates a vehicle for the given service centre and returns it with its generated identifier. Every skill in the list must be enabled for the company, and a capacity amount can only be given when the service centre has a capacity unit configured. When no end location is given, the routes of this vehicle's shifts end at the start location. Locations are matched on their coordinates and reused when the service centre already has them. Requires the ADMIN role on the service centre.","operationId":"createVehicle","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"The vehicle to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleDefinitionToCreateDto"},"examples":{"Delivery van":{"summary":"A van that starts and ends at the depot, with one skill and a capacity","description":"Delivery van","value":{"name":"Sprinter","vehicleType":"SMALL_TRUCK","startLocation":{"id":"depot-maarssen","displayName":"Maarssen","address":"Bisonspoor 3006, Maarssen","latitude":52.364827,"longitude":5.892628},"endLocation":{"id":"depot-maarssen","displayName":"Maarssen","address":"Bisonspoor 3006, Maarssen","latitude":52.364827,"longitude":5.892628},"skills":["forklift"],"maxStops":30,"maxDistance":280.0,"maxDrivingTime":"PT11H30M","speedFactor":0.95,"serviceTimeFactor":0.95,"capacityAmount":35}}}}},"required":true},"responses":{"201":{"description":"Vehicle is successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]}},"/v2/configuration/serviceCentre/{serviceCentreCode}/vehicle/{vehicleId}":{"get":{"tags":["Vehicles"],"summary":"Fetch a single vehicle by id","description":"Returns one vehicle of the given service centre. Responds with 404 when no vehicle with this identifier exists in that service centre. Requires the ADMIN, PLANNER, SUBCO, READONLY or SEARCHONLY role on the service centre.","operationId":"fetchVehicle","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"vehicleId","in":"path","description":"A vehicle identifier","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Vehicle successfully found and returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]},"put":{"tags":["Vehicles"],"summary":"Update a vehicle","description":"Replaces the definition of an existing vehicle; the vehicle type cannot be changed. Every skill in the list must be enabled for the company, except skills the vehicle already has, which it may keep. The RoutiGo routes of the shifts that use this vehicle are synchronised afterwards. Requires the ADMIN role on the service centre.","operationId":"updateVehicle","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"vehicleId","in":"path","description":"A vehicle identifier","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"The vehicle to update to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleDefinitionToUpdateDto"},"examples":{"Open-ended route":{"summary":"Rename the vehicle, drop the end location and raise the stop limit","description":"Open-ended route","value":{"name":"Sprinter 2","startLocation":{"id":"depot-maarssen","displayName":"Maarssen","address":"Bisonspoor 3006, Maarssen","latitude":52.364827,"longitude":5.892628},"skills":["forklift"],"maxStops":40,"maxDistance":280.0,"maxDrivingTime":"PT11H30M","speedFactor":1.0,"serviceTimeFactor":1.0,"capacityAmount":35}}}}},"required":true},"responses":{"200":{"description":"Vehicle is successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]},"delete":{"tags":["Vehicles"],"summary":"Delete a vehicle","description":"Deletes a vehicle. A vehicle that is still used by a shift cannot be deleted; delete or reassign those shifts first. Requires the ADMIN role on the service centre.","operationId":"deleteVehicle","parameters":[{"name":"serviceCentreCode","in":"path","description":"The service centre code","required":true,"schema":{"type":"string"}},{"name":"vehicleId","in":"path","description":"A vehicle identifier","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Vehicle is successfully deleted","content":{}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]}},"/v2/configuration/vrp/skills":{"get":{"tags":["Skills"],"summary":"Fetch all enabled skills, including both user-defined and routigo-defined skills.","description":"Returns the skill codes that are currently enabled for the company set in the X-COMPANY-CODE header, both RoutiGo-defined and user-defined. These are the values a vehicle's skills list may contain. Responds with 204 when no skill is enabled. Requires the ADMIN, PLANNER, SUBCO, READONLY or SEARCHONLY role for the company.","operationId":"validatePermissionsAndFindEnabledSkills","parameters":[{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Enabled skills successfully found and returned.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"204":{"description":"There are no enabled skills to return.","content":{}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]}},"/v2/configuration/vrp/skills/routigoDefinedSkills":{"get":{"tags":["Skills"],"summary":"Retrieve all routigo-defined skills.","description":"Returns the state of the RoutiGo-defined skills of the company set in the X-COMPANY-CODE header. Responds with 204 when the company has no VRP configuration yet. Requires the ADMIN, PLANNER, SUBCO, READONLY or SEARCHONLY role for the company.","operationId":"findRoutigoDefinedSkills","parameters":[{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Routigo-defined skills successfully found and returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutigoDefinedSkills"}}}},"204":{"description":"There are no routigo-defined skills to return.","content":{}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]},"put":{"tags":["Skills"],"summary":"Enable/disable routigo-defined skills.","description":"Enables or disables the RoutiGo-defined skills for the company set in the X-COMPANY-CODE header and returns the new state. Disabling a skill stops it from being accepted on new vehicle definitions, vehicles that already have it keep it. Requires the ADMIN role for the company.","operationId":"updateRoutigoDefinedSkill","parameters":[{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"RoutigoDefinedSkills object is used to represent the states of routigo-defined skills in the system","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutigoDefinedSkills"},"examples":{"Enable zero emission":{"description":"Enable zero emission","value":{"zeroEmission":true}}}}},"required":true},"responses":{"200":{"description":"Routigo-defined skills are successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutigoDefinedSkills"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]}},"/v2/configuration/vrp/skills/userDefinedSkills":{"get":{"tags":["Skills"],"summary":"Fetch all user-defined skills.","description":"Returns every user-defined skill of the company set in the X-COMPANY-CODE header, enabled and disabled alike. Responds with 204 when the company has none. Requires the ADMIN, PLANNER, SUBCO, READONLY or SEARCHONLY role for the company.","operationId":"findUserDefinedSkills","parameters":[{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"User-defined skills successfully found and returned.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserDefinedSkill"}}}}},"204":{"description":"There are no user-defined skills to return.","content":{}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]},"post":{"tags":["Skills"],"summary":"Create a user-defined skill.","description":"Creates a user-defined skill for the company set in the X-COMPANY-CODE header. The skill code must be unique within the company, may only contain letters, digits, underscores and dashes, and is at most 255 characters long. The new skill is enabled immediately. Requires the ADMIN role for the company.","operationId":"createUserDefinedSkill","parameters":[{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"The user-defined skill to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDefinedSkillToCreate"},"examples":{"Drilling machine":{"description":"Drilling machine","value":{"skillCode":"drillingMachine","skillName":"drilling machine"}}}}},"required":true},"responses":{"201":{"description":"The user-defined skill is successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDefinedSkill"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]}},"/v2/configuration/vrp/skills/userDefinedSkills/{userDefinedSkillCode}":{"get":{"tags":["Skills"],"summary":"Fetch a specific user-defined skill using its skill code.","description":"Returns one user-defined skill of the company set in the X-COMPANY-CODE header by its skill code. Responds with 404 when the company has no skill with that code. Requires the ADMIN, PLANNER, SUBCO, READONLY or SEARCHONLY role for the company.","operationId":"findUserDefinedSkillBySkillCode","parameters":[{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The specified user-defined skill successfully found and returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDefinedSkill"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]},"put":{"tags":["Skills"],"summary":"Update a user-defined skill.","description":"Changes the name and the enabled state of an existing user-defined skill; the skill code cannot be changed. Disabling a skill stops it from being accepted on new vehicle definitions, vehicles that already have it keep it. Responds with 400 when the company has no skill with that code. Requires the ADMIN role for the company.","operationId":"updateUserDefinedSkill","parameters":[{"name":"userDefinedSkillCode","in":"path","description":"The user-defined skillCode","required":true,"schema":{"type":"string"}},{"name":"X-COMPANY-CODE","in":"header","description":"The code of the company the request is made for. Every resource is scoped to this company. See the security schemes for when it is needed.","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"The UserDefinedSkillToUpdate object is used to represent the state and the name of a specific user-defined skill in the system","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDefinedSkillToUpdate"},"examples":{"Disable a skill":{"description":"Disable a skill","value":{"skillName":"drilling machine","enabled":false}}}}},"required":true},"responses":{"200":{"description":"The user-defined skill is successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDefinedSkill"}}}},"401":{"description":"Authentication information is missing or invalid. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"Could not find a proper way to authenticate."}}}},"403":{"description":"The user (or API key) does not have enough permissions to execute the request. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"User does not have enough permissions to execute the request."}}}},"404":{"description":"The requested resource does not exist. See the response for more detailed error description.","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"The requested resource does not exist."}}}},"500":{"description":"Unexpected error. Please contact RoutiGo for more details","content":{"text/plain;charset=UTF-8":{"schema":{"type":"string","example":"An error has occurred while processing the request."}}}}},"security":[{"X-API-KEY":[]},{"Token":[]}]}}},"components":{"schemas":{"CapacityDto":{"type":"object","description":"The capacity of a vehicle in amount of units that can be carried by it a given time","properties":{"amount":{"type":"integer","format":"int32","description":"Amount of packages","example":35},"description":{"type":"string","description":"Name of the package, used for visualisation","example":"Kratten"}},"required":["amount","description"]},"PhysicalLocation":{"type":"object","description":"A physical location to drive to or from","properties":{"id":{"type":"string","description":"The identifier of the location. Supplied by the caller and stored as given; the location is matched on its coordinates, not on this value.","example":"depot-maarssen"},"displayName":{"type":"string","description":"A user given name, used for visualisation","example":"Maarssen"},"address":{"type":"string","description":"The address of the location, also used for visualisation","example":"Bisonspoor 3006, Maarssen"},"latitude":{"type":"number","format":"double","description":"The latitude of the location","example":52.364827},"longitude":{"type":"number","format":"double","description":"The longitude of the location","example":5.892628}},"required":["id","displayName","address","latitude","longitude"]},"Shift":{"type":"object","description":"A time period a vehicle is available for usage","properties":{"identifier":{"type":"string","description":"A unique identifier for the shift, generated by the system","example":"23487234-7623476236-B76"},"serviceCentreCode":{"type":"string","description":"The service centre the shift belongs to.","example":"AMS"},"routeName":{"type":"string","description":"The name of the route this shift should relate to, combined with the route code to create a unique identifier","example":"Rit"},"routeCode":{"type":"string","description":"The code of the route this shift should relate to, combined with the route name to create a unique identifier","example":"01"},"vehicle":{"$ref":"#/components/schemas/Vehicle"},"startTime":{"type":"string","description":"The time at which the shift starts","example":"PT09H"},"endTime":{"type":["string","null"],"description":"The time at which the shift ends","example":"PT17H"},"returnToDepot":{"type":"boolean","description":"Boolean flag indicating if the courier should return back to the depot after finishing the shift","example":true}},"required":["identifier","serviceCentreCode","routeName","routeCode","vehicle","startTime"]},"Vehicle":{"type":"object","description":"Either a specific vehicle or a vehicle type, depending on planning preferences","properties":{"identifier":{"type":"string","description":"A unique identifier for the vehicle, generated by the system","example":"23487234-7623476236-B76"},"name":{"type":"string","description":"A readable identifier for the vehicle, provided by the user.","example":"Sprinter"},"vehicleType":{"type":"string","description":"The type of the vehicle, used during planning to assume driving speed and accessible roads","enum":["CAR","SMALL_TRUCK","EV","BIKE","TRUCK"]},"startLocation":{"$ref":"#/components/schemas/PhysicalLocation","description":"The location the vehicle starts its routes from."},"endLocation":{"description":"The location the vehicle ends its routes at. When absent, routes end at the start location.","oneOf":[{"$ref":"#/components/schemas/PhysicalLocation"},{"type":"null"}]},"skills":{"type":["array","null"],"description":"Specifies a list of skills that the vehicle possesses.","example":["forklift"],"items":{"type":"string"}},"capacity":{"description":"The capacity of the vehicle, expressed in the capacity unit configured for the service centre. Absent when the vehicle has no capacity or the service centre has no capacity unit.","oneOf":[{"$ref":"#/components/schemas/CapacityDto"},{"type":"null"}]},"maxStops":{"type":["integer","null"],"format":"int32","description":"The number of maximum amount of stops this vehicle can visit in a route","example":30},"maxDistance":{"type":["number","null"],"format":"double","description":"The maximum amount of kilometers this vehicle can drive in a route. (e.g. before recharging)","example":280.0},"maxDrivingTime":{"type":["string","null"],"description":"The maximum amount of hours this vehicle can spend on the road in a route. e.g. as dictated by law.","example":"PT11H30M"},"speedFactor":{"type":"number","format":"double","description":"The driving speed factor. Used to adjust the speed at which planning assumes this vehicle drives. ","example":0.95},"serviceTimeFactor":{"type":"number","format":"double","description":"The service time speed factor. Used to adjust the speed at which services are performed, this is the duration of a stop.","example":0.95}},"required":["identifier","name","vehicleType","startLocation"]},"ShiftToCreateDto":{"type":"object","description":"The shift to create. The route name and route code together identify the shift within its service centre and cannot be changed afterwards.","properties":{"routeName":{"type":"string","description":"The name of the route this shift should relate to, combined with the route code to create a unique identifier","example":"Rit"},"routeCode":{"type":"string","description":"The code of the route this shift should relate to, combined with the route name to create a unique identifier","example":"01"},"vehicleIdentifier":{"type":"string","description":"The identifier of the vehicle that should be used in this shift.","example":"23487234-7623476236-B76"},"startTime":{"type":"string","description":"The time at which the shift starts","example":"PT09H"},"endTime":{"type":["string","null"],"description":"The time at which the shift ends","example":"PT17H"},"returnToDepot":{"type":"boolean","description":"Boolean flag indicating if the courier should return back to the depot after finishing the shift","example":true}},"required":["routeName","routeCode","vehicleIdentifier","startTime"]},"ShiftToUpdateDto":{"type":"object","description":"The new values of an existing shift. The route name and route code are taken from the existing shift and cannot be changed.","properties":{"startTime":{"type":"string","description":"The time at which the shift starts","example":"PT09H"},"endTime":{"type":["string","null"],"description":"The time at which the shift ends","example":"PT17H"},"vehicleIdentifier":{"type":"string","description":"The identifier of the vehicle that should be used in this shift.","example":"23487234-7623476236-B76"},"returnToDepot":{"type":"boolean","description":"Boolean flag indicating if the courier should return back to the depot after finishing the shift","example":true}},"required":["startTime","vehicleIdentifier"]},"VehicleDefinitionToCreateDto":{"type":"object","description":"The vehicle to create. The identifier is generated by the system and returned in the response.","properties":{"name":{"type":"string","description":"A readable identifier for the vehicle, provided by the user.","example":"Sprinter"},"vehicleType":{"type":"string","description":"The type of the vehicle, used during planning to assume driving speed and accessible roads","enum":["CAR","SMALL_TRUCK","EV","BIKE","TRUCK"]},"startLocation":{"$ref":"#/components/schemas/PhysicalLocation","description":"The location the vehicle starts its routes from. Matched on coordinates and reused when the service centre already has it."},"endLocation":{"description":"The location the vehicle ends its routes at. Omit it to let routes end at the start location.","oneOf":[{"$ref":"#/components/schemas/PhysicalLocation"},{"type":"null"}]},"skills":{"type":["array","null"],"description":"Specifies a list of skills that the vehicle possesses.","example":["forklift"],"items":{"type":"string"}},"maxStops":{"type":["integer","null"],"format":"int32","description":"The number of maximum amount of stops this vehicle can visit in a route","example":30},"maxDistance":{"type":["number","null"],"format":"double","description":"The maximum amount of kilometers this vehicle can drive in a route. (e.g. before recharging)","example":280.0},"maxDrivingTime":{"type":["string","null"],"description":"The maximum amount of hours this vehicle can spend on the road in a route. e.g. as dictated by law.","example":"PT11H30M"},"speedFactor":{"type":"number","format":"double","description":"The driving speed factor. Used to adjust the speed at which planning assumes this vehicle drives. ","example":0.95},"serviceTimeFactor":{"type":"number","format":"double","description":"The service time speed factor. Used to adjust the speed at which services are performed, this is the duration of a stop.","example":0.95},"capacityAmount":{"type":["integer","null"],"format":"int32","description":"Capacity of the vehicle in the configured amount.","example":35}},"required":["name","vehicleType","startLocation"]},"VehicleDefinitionToUpdateDto":{"type":"object","description":"The new values of an existing vehicle. The vehicle type is taken from the existing vehicle and cannot be changed.","properties":{"name":{"type":"string","description":"A readable identifier for the vehicle, provided by the user.","example":"Sprinter"},"startLocation":{"$ref":"#/components/schemas/PhysicalLocation","description":"The location the vehicle starts its routes from. Matched on coordinates and reused when the service centre already has it."},"endLocation":{"description":"The location the vehicle ends its routes at. Omit it to let routes end at the start location.","oneOf":[{"$ref":"#/components/schemas/PhysicalLocation"},{"type":"null"}]},"skills":{"type":["array","null"],"description":"Specifies a list of skills that the vehicle possesses.","example":["forklift"],"items":{"type":"string"}},"maxStops":{"type":["integer","null"],"format":"int32","description":"The number of maximum amount of stops this vehicle can visit in a route","example":30},"maxDistance":{"type":["number","null"],"format":"double","description":"The maximum amount of kilometers this vehicle can drive in a route. (e.g. before recharging)","example":280.0},"maxDrivingTime":{"type":["string","null"],"description":"The maximum amount of hours this vehicle can spend on the road in a route. e.g. as dictated by law.","example":"PT11H30M"},"speedFactor":{"type":"number","format":"double","description":"The driving speed factor. Used to adjust the speed at which planning assumes this vehicle drives. ","example":0.95},"serviceTimeFactor":{"type":"number","format":"double","description":"The service time speed factor. Used to adjust the speed at which services are performed, this is the duration of a stop.","example":0.95},"capacityAmount":{"type":["integer","null"],"format":"int32","description":"Capacity of the vehicle in the configured amount.","example":35}},"required":["name","startLocation"]},"RoutigoDefinedSkills":{"type":"object","description":"Represents a set of skills defined within RoutiGo.","properties":{"zeroEmission":{"type":"boolean","description":"This skill guarantees shipments are delivered in an eco-friendly way by using electric vehicles.","example":true}},"required":["zeroEmission"]},"UserDefinedSkill":{"type":"object","description":"The information about a specific skill that a driver or vehicle must possess to deliver a shipment.","properties":{"skillCode":{"type":"string","description":"A unique identifier for the skill.","example":"drillingMachine"},"skillName":{"type":"string","description":"The human-readable name of the skill. It provides a descriptive label for the skillCode, making it easier to understand the skill's purpose or function.","example":"drilling machine"},"enabled":{"type":"boolean","description":"Indicates whether the skill is currently enabled or disabled.","example":true}},"required":["skillCode","skillName","enabled"]},"UserDefinedSkillToCreate":{"type":"object","description":"A simplified version of the UserDefinedSkill object designed for the creation of a user-defined skill. The newly created skill is enabled by default.","properties":{"skillCode":{"type":"string","description":"A unique identifier for the skill.","example":"drillingMachine"},"skillName":{"type":"string","description":"The human-readable name of the skill. It provides a descriptive label for the skillCode, making it easier to understand the skill's purpose or function.","example":"drilling machine"}},"required":["skillCode","skillName"]},"UserDefinedSkillToUpdate":{"type":"object","description":"A simplified version of the UserDefinedSkill object designed for updating specific attributes of an existing user-defined skill. This class focuses on modifying the skill's name and its active status.","properties":{"skillName":{"type":"string","description":"The human-readable name of the skill.","example":"drilling machine"},"enabled":{"type":"boolean","description":"Indicates whether the skill is currently enabled or disabled.","example":true}},"required":["skillName","enabled"]}},"securitySchemes":{"X-API-KEY":{"type":"apiKey","description":"An API key, issued to one company and sent in the `X-API-KEY` header. The key itself identifies the company, so a request authenticated this way does not need the `X-COMPANY-CODE` header.","name":"X-API-KEY","in":"header"},"Token":{"type":"http","description":"A RoutiGo user token, sent as `Authorization: Bearer <token>`. One token can carry permissions for several companies, so a request authenticated this way must also send the `X-COMPANY-CODE` header naming the company the request is for.","scheme":"bearer","bearerFormat":"JWT"}}}}