AlphaAlpha Docs

Bulk-create waste records

Create multiple waste entries in a single call. Each item is processed independently; failures are returned per-row.

POST
/waste-management/batch
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/waste-management/batch" \  -H "Content-Type: application/json" \  -d '{    "items": [      {        "productId": "string",        "quantity": 0.1,        "reason": "string",        "stockSiteId": "string"      }    ]  }'
{
  "created": [
    {
      "approvedBy": "string",
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "deductRawMaterials": true,
      "events": [
        {
          "authorId": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "type": "CREATE"
        }
      ],
      "id": "string",
      "image": {
        "blobId": "string",
        "height": 0,
        "thumbnailBlobId": "string",
        "width": 0
      },
      "number": "string",
      "productId": "string",
      "quantity": 0.1,
      "reason": "string",
      "shiftId": "string",
      "stockSiteId": "string",
      "subsidiaryId": "string",
      "tenantId": "string",
      "unit": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string"
    }
  ],
  "errors": [
    {
      "index": 0,
      "message": "string",
      "productId": "string"
    }
  ]
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}