Endpoints
Document create
This endpoint add a new document for a Transport order.
Definition
- uri:
/v5/documents
- method:
PUT
- authentication:
Bearer
-token for company-based authentication
Parameters
All parameters that should be given with te put
request can be found here.
Responses
Besides the default responses, the following responses are specific for this endpoint.
201: Created
The endpoint add a document and returns the created TransportOrders
object.
The returned object is an instance of transport order.
{
"id": "45ff6a86-3a25-4fdd-b00a-2341bcd04903",
"externalAttributes": [],
"consignments": [
{
"entity": {
"name": "Assignment #A0026",
"status": "draft",
"externalAttributes": [],
"goods": [
{
"entity": {
"productType": "Puin",
"packagingMaterial": "3m3",
"type": "items"
},
"associationType": "inline"
}
],
"documents": [
{
"entity": {
"id": "88830022-e7ff-4d48-89f0-208670a227ca",
"name": "location #A0026",
"externalAttributes": {
"documentType": "location"
},
"content": {
"url": "app.viatygo.comdocuments/88830022-e7ff-4d48-89f0-208670a227ca/public/open?expires=1667314366&signature=a346c8e5d8ce405df82d8b5bf5744ac73d289460c9018625287fcb2d8a3f78da",
"contentType": "link"
},
"filename": "location_a.png",
"mimeType": "image/png",
"owner": {
"uuid": "9ee0017e-47ed-462a-99a8-a27098dedfc7",
"entityType": "actor",
"associationType": "reference"
}
},
"associationType": "inline"
}
],
"actions": [
{
"entity": {
"actionType": "unload",
"constraint": {
"entity": {
"value": {
"type": "timeWindowConstraint",
"startTime": "2022-10-30T09:00:00Z",
"endTime": "2022-10-30T14:00:00Z"
}
},
"associationType": "inline"
}
},
"associationType": "inline"
}
]
},
"associationType": "inline"
}
],
"actors": [
{
"entity": {
"id": "9ee0017e-47ed-462a-99a8-a27098dedfc7",
"name": "viaTYGO",
"contactDetails": [
{
"value": 54554,
"remark": "Chamber of Commerce number",
"type": "other"
}
]
},
"roles": "Consignor",
"associationType": "inline"
}
],
"constraint": {
"associationType": "inline",
"entity": {
"value": {
"type": "routeConstraint",
"route": {
"type": "addressGeoReference",
"street": "Raamdwarsstraat",
"houseNumber": "7",
"houseNumberAddition": "H",
"postalCode": "1016XN",
"city": "Amsterdam",
"country": "NL"
}
}
}
}
}