Fetch All Movements For A Batch

Request

GET https://backend.net0.com​/v1​/batches/{batchId}/moving

This endpoint allows to you retrieve a list of all the movement records for a particular batch available on your Net0 account.

curl --location --request GET 'https://backend.net0.com/v1/batches/3/moving' \
--header 'x-api-key: API_KEY'

Parameters

AttributeTypeDescriptionIn
batchIdStringThis is the id of the batch for which all movements would be fetched.path

Response

The response contains all the movements for a particular batch.

{
    "data": [
        {
            "id": "733af8ae-0512-495d-bdf6-aa8a10d6fd2f",
            "emissionKindId": "37f3ed79-349b-4cac-9dcd-96c29c01015e",
            "name": "Test Novement",
            "referenceNumber": null,
            "comment": null,
            "vendorId": "8df19e8c-5acf-4d3c-92af-6b1870a8a7ed",
            "transportType": "AIR",
            "transportWeightTon": 30,
            "distance": 15628,
            "totalEmission": 498,
            "startPoint": "lat",
            "endPoint": "lng",
            "startAddress": "c26 A & B, Yah Wahab Estate, Ilese, Lagos",
            "endAddress": "New providence gardens, Lekki",
            "startDate": "2021-11-28T02:03:30.512Z",
            "endDate": "2021-11-29T02:03:30.512Z",
            "createdAt": "2021-11-27T14:58:01.628Z",
            "updatedAt": "2021-11-27T14:58:01.628Z",
            "companyId": 2,
            "isReturnMoving": true,
            "batches": [
                {
                    "id": 3
                }
            ],
            "vendor": {
                "id": "8df19e8c-5acf-4d3c-92af-6b1870a8a7ed",
                "companyId": 2,
                "countryId": 81,
                "name": "Test Vendor",
                "totalEmission": 498,
                "logoImageUrl": null,
                "vendorType": "fuel",
                "createdAt": "2021-11-22T14:42:30.631Z",
                "updatedAt": "2021-11-27T14:58:01.688Z"
            }
        }
    ],
    "count": 1,
    "total": 1,
    "page": 1,
    "pageCount": 1
}