Update A Single Batch

Request

PATCH https://backend.net0.com/v1/batches/{batchId}

This endpoint allows for the partial update of an existing batch available on your Net0 account.

curl --location --request PATCH 'https://backend.net0.com/v1/batches/3' \
--header 'x-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "productsBathes": [
        {
        "productId": 2,
        "count": 2
        }
    ],
    "referenceNumber": "3747cbhd9937-338snd-373839902",
    "name": "Mercedez Batch",
    "manufacturingDate": "2021-12-27T00:37:02.288Z",
    "comment": "Test Batch"
}'

Field Parameters

AttributeTypeDescriptionInRequired
batchIdStringThe id of the batchpathtrue
bodyPatchOperationUpdate operations to be performed on the already existing batch recordbodytrue

Response

{
    "id": 3,
    "name": "Mercedez Batch",
    "totalEmission": 0,
    "totalWeight": 40,
    "comment": "Test Batch",
    "companyId": 2,
    "manufacturingDate": "2021-12-27T00:37:02.288Z",
    "createdAt": "2021-11-27T00:50:14.046Z",
    "updatedAt": "2021-11-27T01:13:40.896Z",
    "referenceNumber": "3747cbhd9937-338snd-373839902",
    "productsBathes": [
        {
            "productId": 2,
            "batchId": 3,
            "count": 2,
            "createdAt": "2021-11-27T00:50:14.087Z",
            "updatedAt": "2021-11-27T00:50:14.087Z",
            "product": {
                "id": 2,
                "name": "Photoelectric Mug",
                "companyId": 2,
                "totalEmission": 0,
                "weight": 20,
                "referenceNumber": "wrwje-wenwfefw-cscsns",
                "logoImageUrl": "https://aws.amazonserveivce.net",
                "emissionKindId": "b3a6bba1-fb25-4797-9e4a-17154a946868",
                "createdAt": "2021-11-24T12:39:37.775Z",
                "updatedAt": "2021-11-26T23:54:57.155Z"
            }
        }
    ],
    "movements": [],
    "offsets": []
}