Beta version
Basic URL: https://app.goodloading.com/api/external
Endpoint
POST /calculation
Name | Value | Mandatory | Description |
Authorization | Bearer <token> | Yes | Authorisation key |
Field | Type | Mandatory | Value |
loads | array | Yes | Loads board |
load.quantity | integer | Yes | Loads quantity. Must be an integer greater than 0. |
load.name | string | Yes | Load name |
load.length | number | Yes | One load length. Must be greater than 0. |
load.width | number | Yes | One load width. Must be greater than 0. |
load.height | number | Yes | One load height. Must be greater than 0. |
load.weight | number | Yes | One load weight. Must be greater than or equal to 0. |
load.priority | integer | Yes | Load priority. The value must be an integer greater than or equal to 0. Default value: 0. |
load.stacking | boolean / integer | Yes | Load stacking. The false value means that it is nonstackable, the true value means that it is stackable. Indicating an integer greater than 0 means that the load is stackable with a limited number of stacks. Default value: true. |
load.allowToRotate | boolean | Yes | Assumes true or false. Setting the value as true allows for replacing the width with the length while calculating, i.e. it allows for rotating the load relative to the base. Default value true. |
loadingSpaces | array | Yes | Load space board |
loadingSpace. quantity |
integer | Yes | Load space quantity. Must be an integer greater than 0. |
loadingSpace.name | string | Yes | Load space name. |
loadingSpace.type | string | No | Load space type. One of the three values may be set:
– vehicle. The other value is set by default. |
loadingSpace.parts | array | Yes | Load space parts board. E.g. a set will have two parts |
loadingSpace.part. length |
number | Yes | Load space part length. Must be greater than 0. |
loadingSpace.part. width |
number | Yes | Load space part width. Must be greater than 0. |
loadingSpace.part. height |
number | Yes | Load space part height. Must be greater than 0. |
loadingSpace.part. limit |
number | Yes | Load space part load capacity. Must be greater than or equal to 0. |
loadinSpace.part. axis |
array | No | Load space axles board. If indicated, it must include exactly two elements. |
loadingSpace.part. axi.distanceFromSpaceFront |
number | Yes | Axle distance from the beginning of the load space. |
loadingSpace.part. axi.emptySpaceLoad |
number | Yes | Axle load with an empty load space. The value must be a number greater than or equal to 0. |
loadingSpace.part. axi.maxLoad |
number | Yes | The highest permissible axle load. The value must be a number greater than or equal to 0. |
options | json | Yes | Calculation options |
options.allowOverweight | boolean | No | Setting the value as true will result in not distributing the loads in the load space if the weight exceeds the permissible load capacity. Default value: false. |
options.unit | string | No | Units of the indicated dimensions. One of the two values may be set:
– cm Default value: “cm” |
options.keepLoadsTogether | boolean | No | Setting the value as true will result in distributing the loads from a given group together. Default value: false |
{ "loads": [ { "quantity": 10, "name": "test load 1", "length": 120, "width": 80, "height": 100, "weight": 100, "priority": 0, "stacking": true, "allowToRotate": true },{ "quantity": 300, "name": "test load 2", "length": 100, "width": 60, "height": 20, "weight": 100, "priority": 0, "stacking": 2, "allowToRotate": true } ], "loadingSpaces": [ { "quantity": 1, "name": "test truck", "parts": [ { "length": 1300, "width": 200, "height": 200, "limit": 24000, "axis": [ { "distanceFromSpaceFront": -200, "emptySpaceLoad": 800, "maxLoad": 10000 }, { "distanceFromSpaceFront": 1000, "emptySpaceLoad": 800, "maxLoad": 10000 } ] } ], "type": "vehicle" } ], "options": { "allowOverweight": false, "unit": "cm", "keepLoadsTogether": false } }
Http status | Description |
200 | The calculation result is returned |
400 | Input data validation error |
401 | Authorisation error |
429 | Allowed number of inquires has been exceeded |
Name | Type | Value |
loadingSpaces | array | Load space board |
loadingSpace.id | integer | Load space identifier |
loadingSpace.name | string | Load space name. |
loadingSpace.type | string | Load space type. |
loadingSpace.parts | array | Load space parts board. E.g. a set will have two parts. |
loadingSpace.part.length | number | Load space part length. |
loadingSpace.part.width | number | Load space part width. |
loadingSpace.part.height | number | Load space part height. |
loadingSpace.part.limit | number | Load space part load capacity. |
loadinSpace.part.axis | array | Load space axles board. |
loadingSpace.part. axi.distanceFromSpaceFront | number | Axle distance from the beginning of the load space. |
loadingSpace.part. axi.emptySpaceLoad |
number | Axle load with an empty load space. |
loadingSpace.part. axi.maxLoad |
number | The highest permissible axle load. |
loadingSpace.part. axi.addedLoad |
number | Axle load of the distributed loads.
|
loadingSpace.part.loads | array | Loads distributed in a given part of the load space. |
loadingSpace.part.load.id | number | Load identifier |
loadingSpace.part.load.allowToRotate | boolean | Value indicated for the free rotation option. |
loadingSpace.part.load.quantity | integer | Quantity of loads from a given group distributed in a given space part. |
loadingSpace.part.load.name | string | Load name |
loadingSpace.part.load.priority | integer | Load priority |
loadingSpace.part.load.weight | number | One load weight. |
loadingSpace.part.load.length | number | Basic load length. |
loadingSpace.part.load.width | number | Basic load width. |
loadingSpace.part.load.height | number | Basic load height. |
loadingSpace.part.load.stacking | boolean / integer | Value set for stacking the load |
loadingSpace.part.load.placement | array | Board with the distribution of loads in a given load space part. |
loadingSpace.part.load.placement.length | number | Distributed load length. The values of length and width may be replaced in relation to the basic values, if the allowToRotate option is set as true. |
loadingSpace.part.load.placement.width | number | Distributed load width. |
loadingSpace.part.load.placement.height | number | Distributed load height. |
loadingSpace.part.load.placement.position | json | Load position in the load space part. Looking from the beginning of the space, position x: 0, y: 0, z: 0 is the right lower corner of the space.
Assumed axle indication:
|
loadingSpace.part.load.placement.position.x | number | Position on the x axle |
loadingSpace.part.load.placement.position.y | number | Position on the y axle |
loadingSpace.part.load.placement.position.z | number | Position on the z axle |
loadingSpace.part.load.placement.loadsPerAxis | json | Quantity of loads distributed along a given axle |
loadingSpace.part.load.placement.loadsPerAxis.x | integer | Quantity of loads along the x axle. |
loadingSpace.part.load.placement.loadsPerAxis.y | integer | Quantity of loads along the y axle. |
loadingSpace.part.load.placement.loadsPerAxis.z | integer | Quantity of loads along the z axle. |
loadingSpace.part.summary | json | Summary for a given load space part. |
loadingSpace.part.summary.occupiedLdm | number | Occupied Idm |
loadingSpace.part.summary.freeLdm | number | Free ldm |
notFittedLoads | array | Loads which did not fit in any load space |
notFittedLoad.id | number | Loads identifier |
notFittedLoad.length | number | Loads length |
notFittedLoad.width | number | Loads width |
notFittedLoad.height | number | Loads height |
notFittedLoad.weight | number | One load weight |
notFittedLoad.quantity | integer | Loads quantity |
notFittedLoad.priority | integer | Priority |
notFittedLoad.name | string | Loads name |
notFittedLoad.stacking | boolean / integer | Value set for stacking the load |
notFittedLoad.allowToRotate | boolean | Value indicated for the free rotation option |
options | json | Calculation options |
options.allowToOverweight | boolean | Value set for the option allowing for exceeding the maximum load capacity. |
options.unit | string | Unit set |
options.keepLoadsTogether | boolean | Value set for the option keeping the loads from a given group together. |
_links | array | Further possible actions board |
link.rel | string | relation |
link.href | string | address |
{ "loadingSpaces": [ { "id": 1, "name": "test truck", "parts": [ { "height": 200, "length": 1300, "width": 200, "limit": 24000, "loads": [ { "id": 1, "allowToRotate": true, "stacking": true, "name": "test load 1", "priority": 0, "quantity": 10, "width": 120, "length": 80, "height": 100, "weight": 100, "placement": [ { "height": 100, "length": 80, "width": 120, "loadsPerAxis": { "x": 1, "y": 2, "z": 3 }, "position": { "x": 0, "y": 0, "z": 0 } }, { "height": 100, "length": 120, "width": 80, "loadsPerAxis": { "x": 1, "y": 2, "z": 2 }, "position": { "x": 120, "y": 0, "z": 0 } } ] }, { "id": 2, "allowToRotate": true, "stacking": 2, "name": "test load 2", "priority": 0, "quantity": 230, "width": 100, "length": 60, "height": 20, "weight": 100, "placement": [ { "height": 20, "length": 60, "width": 100, "loadsPerAxis": { "x": 2, "y": 2, "z": 17 }, "position": { "x": 0, "y": 0, "z": 240 } }, { "height": 20, "length": 60, "width": 100, "loadsPerAxis": { "x": 2, "y": 2, "z": 17 }, "position": { "x": 0, "y": 40, "z": 240 } }, { "height": 20, "length": 60, "width": 100, "loadsPerAxis": { "x": 2, "y": 2, "z": 17 }, "position": { "x": 0, "y": 80, "z": 240 } }, { "height": 20, "length": 60, "width": 100, "loadsPerAxis": { "x": 2, "y": 2, "z": 6 }, "position": { "x": 0, "y": 120, "z": 240 } }, { "height": 20, "length": 60, "width": 100, "loadsPerAxis": { "x": 1, "y": 2, "z": 1 }, "position": { "x": 0, "y": 160, "z": 240 } } ] } ], "summary": { "freeLdm": 40, "occupiedLdm": 1260 }, "axis": [ { "distanceFromSpaceFront": -200, "emptySpaceLoad": 800, "maxLoad": 10000, "addedLoad": 6265 }, { "distanceFromSpaceFront": 1000, "emptySpaceLoad": 800, "maxLoad": 10000, "addedLoad": 17735 } ] } ], "type": "vehicle" } ], "notFittedLoads": [ { "id": 2, "allowToRotate": true, "stacking": 2, "name": "test load 2", "priority": 0, "quantity": 70, "width": 60, "length": 100, "height": 20, "weight": 100 } ], "options": { "allowOverweight": false, "unit": "cm", "keepLoadsTogether": false }, "_links": [ { "rel": "preview", "href": "https://app.goodloading.com/session?id=f4a2fe64-0882-4cb9-afa1-1f8e4a29799b" } ] }