Request
GET https://backend.net0.com/v1/batches
This endpoint allows to you retrieve a list of all the batches records available on your Net0 account.
curl --location --request GET 'https://backend.net0.com/v1/batches' \
--header 'x-api-key: <API_KEY>'
Response
The response returns an array containing all the available batches.
[
{
"id": 3,
"name": "Opman 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-27T00:50:14.046Z",
"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"
}
}
]
},
{
"id": 2,
"name": "test batch",
"totalEmission": 0,
"totalWeight": 33,
"comment": "test batch",
"companyId": 2,
"manufacturingDate": "2021-11-25T19:00:00.000Z",
"createdAt": "2021-11-26T16:38:18.093Z",
"updatedAt": "2021-11-26T16:38:18.093Z",
"referenceNumber": "123",
"productsBathes": [
{
"productId": 4,
"batchId": 2,
"count": 1,
"createdAt": "2021-11-26T16:38:18.100Z",
"updatedAt": "2021-11-26T16:38:18.100Z",
"product": {
"id": 4,
"name": "testt",
"companyId": 2,
"totalEmission": null,
"weight": 0,
"referenceNumber": "123",
"logoImageUrl": "https://net-0-prod.s3.amazonaws.com/2/4273e3fa-15b3-4cb8-a6a8-3992cf7f5c0f/image/jpeg/1632505663929.jpg",
"emissionKindId": "b3a6bba1-fb25-4797-9e4a-17154a946868",
"createdAt": "2021-11-26T16:35:01.360Z",
"updatedAt": "2021-11-26T16:35:01.360Z"
}
},
{
"productId": 1,
"batchId": 2,
"count": 3,
"createdAt": "2021-11-26T16:38:18.105Z",
"updatedAt": "2021-11-26T16:38:18.105Z",
"product": {
"id": 1,
"name": "Test",
"companyId": 2,
"totalEmission": null,
"weight": 11,
"referenceNumber": "432",
"logoImageUrl": null,
"emissionKindId": "b3a6bba1-fb25-4797-9e4a-17154a946868",
"createdAt": "2021-11-22T12:44:40.436Z",
"updatedAt": "2021-11-22T12:44:40.436Z"
}
}
]
},
{
"id": 1,
"name": "Batch 38232",
"totalEmission": 0,
"totalWeight": 110,
"comment": "",
"companyId": 2,
"manufacturingDate": "2021-11-22T00:00:00.000Z",
"createdAt": "2021-11-22T19:03:18.232Z",
"updatedAt": "2021-11-22T19:03:18.232Z",
"referenceNumber": null,
"productsBathes": [
{
"productId": 1,
"batchId": 1,
"count": 10,
"createdAt": "2021-11-22T19:03:18.240Z",
"updatedAt": "2021-11-22T19:03:18.240Z",
"product": {
"id": 1,
"name": "Test",
"companyId": 2,
"totalEmission": null,
"weight": 11,
"referenceNumber": "432",
"logoImageUrl": null,
"emissionKindId": "b3a6bba1-fb25-4797-9e4a-17154a946868",
"createdAt": "2021-11-22T12:44:40.436Z",
"updatedAt": "2021-11-22T12:44:40.436Z"
}
}
]
}
]