AlphaAlpha Docs
API ReferenceStock inventory

Add inventory to a stock location

Adds inventory items to a stock site

POST
/inventory
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/inventory" \  -H "Content-Type: application/json" \  -d '{    "products": [      {        "batchNumber": "string",        "locationId": "string",        "originalPurchaseOrderId": "string",        "price": 0.1,        "productId": "string",        "quantity": 0.1,        "stockSource": "PURCHASE_ORDER"      }    ],    "stockSiteId": "string",    "subsidiaryId": "string"  }'
[
  {
    "availableQuantity": 0.1,
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "id": "string",
    "inTransitQuantity": 0.1,
    "inTransitStock": [
      {
        "created": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "quantity": 0.1,
        "transferId": "string",
        "updated": "2019-08-24T14:15:22Z",
        "updatedBy": "string"
      }
    ],
    "locations": [
      {
        "batches": [
          {
            "batchNumber": "string",
            "expirationDate": "2019-08-24T14:15:22Z",
            "lastExpiryAlertAt": "2019-08-24T14:15:22Z",
            "lastStockDate": "2019-08-24T14:15:22Z",
            "originalPurchaseOrderId": "string",
            "productionDate": "2019-08-24T14:15:22Z",
            "quantity": 0.1,
            "stockSource": "PURCHASE_ORDER",
            "uomSplit": [
              {
                "productId": "string",
                "quantity": 0.1,
                "unit": "string"
              }
            ]
          }
        ],
        "earliestExpirationDate": "2019-08-24T14:15:22Z",
        "id": "string",
        "lastStockDate": "2019-08-24T14:15:22Z",
        "totalQuantity": 0.1
      }
    ],
    "maximum": 0.1,
    "minimum": 0.1,
    "number": "string",
    "productId": "string",
    "reservations": [
      {
        "created": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "quantity": 0.1,
        "reservationSourceId": "string",
        "reservationType": "ORDER",
        "updated": "2019-08-24T14:15:22Z",
        "updatedBy": "string"
      }
    ],
    "reservedQuantity": 0.1,
    "siteId": "string",
    "status": "IN_STOCK",
    "subsidiaryId": "string",
    "tenantId": "string",
    "totalQuantity": 0.1,
    "unitPrice": 0.1,
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "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"
}