Add a New Movement

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
AttributeTypeDescriptionRequired
idStringThe id of the batch to add movement for.truepath
emissionKindIdstringThis describes the id of the emission associated with the movementtruebody
nameStringThis is the name of the movementtruebody
referenceNumberNumberThe refence number of the movementfalsebody
vendorIdStringThe id of the vendortruebody
fromAddressStringAn object containing the startAddress & startPoint of the originating address of the movement.truebody
toAddressStringAn object containing the endAddress & endPoint of the destination address of the movement.truebody
weightnumberTotal weight of the movement, including all products and transport. By default this value is empty and will be taken from Batch details.falsebody
isReturnMovingBooleanSpecifies if the movement is going to be a return movement.falsebody
startDateStringThis is the start date of the movement.truebody
endDateStringThis is the end date of the movement.truebody
transportTypeStringThis specifies the type of transport. It can be either be a [Truck, Ship, Air, or Rail] transport type.truebody
transportWeightTonNumberThe weight of the transport type.falsebody
commentStringA comment on the movement.falsebody

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"
}