{"openapi":"3.1.0","info":{"title":"RoutiGo Upload REST API","description":"Allows uploading shipments into RoutiGo","contact":{"name":"RoutiGo Team","url":"https://www.routigo.com","email":"team@routigo.com"},"version":"1.0"},"servers":[{"url":"https://api.routigo.com/api"}],"tags":[{"name":"Import","description":"Import shipments"}],"paths":{"/v1/upload":{"put":{"tags":["Import"],"summary":"Upload a new set of shipments to the RoutiGo system","operationId":"processV1Upload","requestBody":{"description":"This API call can be used to register a new set of shipments in the RoutiGo system.","content":{"application/json":{"schema":{"type":"array","additionalProperties":{"default":""},"contains":{"default":""},"items":{"$ref":"#/components/schemas/Shipment","default":""},"unevaluatedItems":{"default":""}}}},"required":true},"responses":{"202":{"description":"The shipments have successfully registered within the system. Use the provided trackingId to track the processing of all items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingId","additionalProperties":{"default":""},"default":""}}}}},"security":[{"apiKey":[]}]}}},"components":{"schemas":{"AddressDetails":{"type":"object","default":null,"description":"The human readable details regarding the location","properties":{"houseNumber":{"type":"string","default":"","description":"Number of the building or house.","example":"8006"},"postcode":{"type":"string","default":"","description":"Postal code of the area. Postal code should be up to 8 characters, containing only letters, numbers, and spaces.","example":"3605 LT","maxLength":8,"pattern":"^[A-Za-z0-9 ]{0,8}$"},"countryCode":{"type":"string","default":"NL","description":"The country code of the location. Default `NL`. Described using: ISO 3166-1 alpha-2, Codes for the representation of countries.","example":"NL","maxLength":2},"name":{"type":["string","null"],"default":"","description":"The company name or name of the person living at the address.","example":"RoutiGo"},"streetName":{"type":["string","null"],"default":"","description":"Name of the street.","example":"Bisonspoor"},"houseNumberAddition":{"type":["string","null"],"default":"","description":"Additional information for the house number, if applicable (e.g., apartment number or building section).","example":"A"},"cityName":{"type":["string","null"],"default":"","description":"Name of the city or locality.","example":"Maarsen"},"geocodeLocation":{"oneOf":[{"$ref":"#/components/schemas/GeocodeLocation"},{"type":"null"}]}},"required":["countryCode","houseNumber","postcode"]},"ContactInformation":{"type":"object","default":null,"description":"All data describing the location to visit. This data is used for sending alerts regarding the expected time of arrival.","properties":{"email":{"type":["string","null"],"default":"","description":"The email-address used to send out emails regarding updates on the visit","example":"no-reply@routigo.com"},"mobilePhone":{"type":["string","null"],"default":"","description":"The phone number used to send out text messages regarding updates on the visit","example":"+31612345678"},"language":{"type":["string","null"],"default":"NL","description":"The customer language used for communication. Default `NL`. Described using: ISO 639-1:2002, Codes for the representation of names of languages","example":"NL"}}},"GeocodeLocation":{"type":"object","default":null,"description":"The lat/lng of a location","properties":{"latitude":{"type":"string","default":"","example":"52.137105"},"longitude":{"type":"string","default":"","example":"5.029677"}},"required":["latitude","longitude"]},"Interactions":{"type":"object","default":null,"description":"Within RoutiGo we have a number of predefined interactions which can easily be enabled by setting the appropriate values on the property.These predefined interactions can trigger predefined actions, such as showing an Nix18 to indicate an alcohol check should be performed and adds an extra question to the delivery/pick-up survey to register if the alcohol check was performed.","properties":{"alcoholCheckRequired":{"type":["boolean","null"],"default":false,"description":"Indicates if a Alcohol check should be performed, ","example":true},"paymentRequired":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired"},{"type":"null"}]},"podOptions":{"type":["array","null"],"default":"","description":"Indicates if proof of delivery (signature and/or PIN code) is required","example":["SIGNATURE","PIN_CODE"],"items":{"type":"string","enum":["SIGNATURE","PIN_CODE"]}}}},"JsonNode":{"type":"object","properties":{"empty":{"type":"boolean"},"array":{"type":"boolean"},"null":{"type":"boolean"},"object":{"type":"boolean"},"float":{"type":"boolean"},"pojo":{"type":"boolean"},"floatingPointNumber":{"type":"boolean"},"short":{"type":"boolean"},"int":{"type":"boolean"},"long":{"type":"boolean"},"double":{"type":"boolean"},"bigDecimal":{"type":"boolean"},"bigInteger":{"type":"boolean"},"textual":{"type":"boolean","deprecated":true},"binary":{"type":"boolean"},"nodeType":{"type":"string","enum":["ARRAY","BINARY","BOOLEAN","MISSING","NULL","NUMBER","OBJECT","POJO","STRING"]},"integralNumber":{"type":"boolean"},"valueNode":{"type":"boolean"},"container":{"type":"boolean"},"missingNode":{"type":"boolean"},"number":{"type":"boolean"},"string":{"type":"boolean"},"boolean":{"type":"boolean"},"embeddedValue":{"type":"boolean"}}},"Location":{"type":"object","default":null,"description":"The location object; representing the address to visit and the tasks to complete there.","properties":{"addressInformation":{"$ref":"#/components/schemas/AddressDetails","default":""},"identifier":{"type":["string","null"],"default":"","description":"An optional identifier for a given location. Identifier should contain between 8 and 80 characters, using only letters, numbers, dashes, and underscores.","example":"ASJHD-ASDJH-71235","maxLength":80,"minLength":8,"pattern":"^[A-Za-z0-9_-]{8,80}$"},"duration":{"type":["string","null"],"format":"PTnHnMnS","default":"","description":"Optionally the expected duration of the stop. If not provided, the configured default value will be used. Written in the ISO 8601 format.","example":"PT6M"},"tasks":{"type":["array","null"],"default":"","description":"Optionally a list of different tasks to perform at the location. These serve as a task list for the driver upon arrival.","example":["Inform the customer of the return policies","Capture a photo of the delivered parcel at the customer's location as proof of delivery"],"items":{"type":"string"}},"remark":{"type":["string","null"],"default":"","deprecated":true,"description":"Deprecated field to provide a remark to the courier about this location. Deprecated in favor of both onRouteInstructions and onSiteInstructions","example":"If nobody is home, please deliver at the neighbours."},"onRouteInstructions":{"type":["string","null"],"default":"","description":"An optional remark field where on route instructions can be placed. These will be shown to the courier while they are driving to this location.","example":"The office is located on the 8th floor above a mall. Parking can be done in the parking garage allocated next to the office building."},"onSiteInstructions":{"type":["string","null"],"default":"","description":"Optionally an instruction to follow after the driving part of the delivery.","example":"If nobody is home, please deliver at the neighbours."},"contactInformation":{"oneOf":[{"$ref":"#/components/schemas/ContactInformation"},{"type":"null"}]},"interactions":{"oneOf":[{"$ref":"#/components/schemas/Interactions"},{"type":"null"}]},"requiredSkills":{"type":["array","null"],"default":"","description":"The skill codes a vehicle must have to serve this location. Only a vehicle that has every listed skill can be assigned: [\"drillingMachine\", \"screwDriver\"] requires both. Each code must exactly match (case-sensitive) a skill that is enabled for your company. If any code is unknown or disabled, the entire upload is rejected with 400 Bad Request, one SKILL_CODE_DOESNT_EXIST reason is returned per invalid code.","example":["drillingMachine","screwDriver"],"items":{"type":"string"}},"visitAfter":{"type":["string","null"],"format":"PTnHnMnS","default":"","description":"The earliest time the driver is allowed to arrive at the location","example":"PT12H30M"},"visitBefore":{"type":["string","null"],"format":"PTnHnMnS","default":"","description":"The latest time the driver is allowed to arrive at the location","example":"PT17H30M"}},"required":["addressInformation"]},"PaymentRequired":{"type":"object","default":null,"description":"Indicates if a payment is required before any further actions can be performed. ","properties":{"currency":{"type":"string","default":"","description":"The currency of the amount that should be retrieved in the ISO 4217 format","example":"EUR"},"amount":{"type":"number","default":"","description":"The amount that should be retrieved. This value will be stored with a maximum of two digits. ","example":1200.87}},"required":["amount","currency"]},"PhysicalTag":{"type":"object","properties":{"identifier":{"type":"string"},"type":{"type":"string"}}},"Route":{"type":"object","default":null,"description":"The route in which the shipment should be placed. If filled we will skip lookup/dynamic planning and put it directly in the given route. NOTE: the route should be present in the system.","properties":{"serviceCentreCode":{"type":"string","default":"","description":"The technical identifier for the SVC under which the route can be found. In case the SVC is not provided and API key has a single SVC access, the shipment will be assigned to this SVC. Otherwise an error will be returned (400 http code) due to ambiguity in SVC selection.","example":"Subco-1"},"identifier":{"type":["string","null"],"default":"","description":"The technical code identifier. Which is not the same as the description. In case the route identifier is not filled in the default route identifier will be assigned. \nIt should follow the pattern RouteName-RouteCode, where:\nRouteName can contain letters and digits, with a maximum length of 100 characters.\nRouteCode can contain letters and digits, with a length of 1 to 2 characters, and should be placed after the \"-\" character.","example":"UT12-C","pattern":"^[a-zA-Z0-9]{1,100}-[a-zA-Z0-9]{1,2}$"}},"required":["serviceCentreCode"]},"Shipment":{"type":"object","default":null,"description":"The shipment object; containing all information required to insert an order into the RoutiGo system.","properties":{"identifier":{"type":"string","default":"","description":"An identifier for a given shipment","example":"ASJHD-ASDJH-71235","maxLength":80},"scheduledDeliveryDate":{"type":["string","null"],"format":"date","default":"","description":"The day at which the shipment initially should take place. Defaults to today (Europe/Amsterdam) when omitted","example":"2020-11-27"},"pickUpLocation":{"oneOf":[{"$ref":"#/components/schemas/Location"},{"type":"null"}]},"deliveryLocation":{"oneOf":[{"$ref":"#/components/schemas/Location"},{"type":"null"}]},"supplier":{"oneOf":[{"$ref":"#/components/schemas/Supplier"},{"type":"null"}]},"route":{"oneOf":[{"$ref":"#/components/schemas/Route"},{"type":"null"}]},"units":{"type":["array","null"],"default":"","items":{"$ref":"#/components/schemas/Unit"}},"physicalTags":{"type":["array","null"],"default":"","items":{"$ref":"#/components/schemas/PhysicalTag"}},"customFields":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"default":"","description":"Arbitrary JSON fields to be stored alongside the shipment. Keys must not exceed 255 characters.","example":{"orderType":"URGENT","priority":1,"isFragile":true}}},"required":["identifier"]},"Supplier":{"type":"object","default":null,"description":"The supplier is a person, company, or organization selling/sending goods, equipment or services to customers. This field can be used to differentiate between various parties (e.g. restaurants, webshops, merchants) that deliver goods to a transport company.","properties":{"identifier":{"type":"string","default":"","description":"The technical code identifier. Usually this is a customer identifier or code. This code should be unique, because later this identifier can be used to retrieve all shipments for a single supplier.","example":"ABS"},"name":{"type":"string","default":"","description":"The human readable description of the supplier, which can be used in communication with the receiver e.g","example":"A Banana Store"}},"required":["identifier","name"]},"Unit":{"type":"object","default":null,"description":" The Unit can be used to specify what to pick-up and/or deliver. These units can be used do dynamically allocate items to a route based upon vehicle capacity OR for simply showing it to the driver.","properties":{"description":{"type":"string","default":"","description":"The description of the unit to pick-up and/or deliver","example":"Box"},"amount":{"type":"number","format":"double","default":"","description":"The amount of items that he or she is expected to pick-up and/or deliver","example":1.2}},"required":["amount","description"]},"TrackingId":{"type":"object","default":null,"description":"A tracking ID, which can be used to track the progress of the import","properties":{"trackingId":{"type":"string","default":"","example":"62c84532-0ed6-4bf9-8dbc-d1efbfda6fcb"}},"required":["trackingId"]}},"securitySchemes":{"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}}}}