Request
POST https://backend.net0.com/v1/batches/{id}/movements
This endpoint allows you to add a movement for a specified batch of products from one location to another.
Field Parameters
Attribute | Type | Description | Required | |
---|---|---|---|---|
id | String | The id of the batch to add movement for. | true | path |
emissionKindId | string | This describes the id of the emission associated with the movement | true | body |
name | String | This is the name of the movement | true | body |
referenceNumber | Number | The refence number of the movement | false | body |
vendorId | String | The id of the vendor | true | body |
fromAddress | String | An object containing the startAddress & startPoint of the originating address of the movement. | true | body |
toAddress | String | An object containing the endAddress & endPoint of the destination address of the movement. | true | body |
weight | number | Total weight of the movement, including all products and transport. By default this value is empty and will be taken from Batch details. | false | body |
isReturnMoving | Boolean | Specifies if the movement is going to be a return movement. | false | body |
startDate | String | This is the start date of the movement. | true | body |
endDate | String | This is the end date of the movement. | true | body |
transportType | String | This specifies the type of transport. It can be either be a [Truck, Ship, Air, or Rail] transport type. | true | body |
transportWeightTon | Number | The weight of the transport type. | false | body |
comment | String | A comment on the movement. | false | body |
Response
The response contains all the information about the movement data.
{
"distance": 15628,
"totalEmission": 498,
"transportWeightTon": 30,
"transportType": "AIR",
"vendorId": "8df19e8c-5acf-4d3c-92af-6b1870a8a7ed",
"comment": null,
"emission": {
"co2e": 498,
"companyId": 2,
"unitId": 2,
"co2": null,
"ch4": null,
"n2o": null,
"id": "4f426789-9758-48d0-8055-3b1063547559",
"createdAt": "2021-11-27T14:58:01.628Z",
"updatedAt": "2021-11-27T14:58:01.628Z"
},
"startAddress": "c26 A & B, Yah Wahab Estate, Ilese, Lagos",
"startPoint": "lat",
"endAddress": "New providence gardens, Lekki",
"endPoint": "lng",
"name": "Test Novement",
"isReturnMoving": true,
"startDate": "2021-11-28T02:03:30.512Z",
"endDate": "2021-11-29T02:03:30.512Z",
"emissionKindId": "37f3ed79-349b-4cac-9dcd-96c29c01015e",
"companyId": 2,
"referenceNumber": null,
"id": "733af8ae-0512-495d-bdf6-aa8a10d6fd2f",
"createdAt": "2021-11-27T14:58:01.628Z",
"updatedAt": "2021-11-27T14:58:01.628Z"
}