Feeef Cloud
ApiInventory

Post one balanced inventory operation

POST
/inventory/operations
AuthorizationBearer <token>

Project API key, fc_live_…. Keep keys out of public client code. The trusted Cloud playground accepts credentials temporarily in memory.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/inventory/operations" \  -H "Content-Type: application/json" \  -d '{    "type": "receive",    "legs": [      {        "namespace": "string",        "key": "string",        "quantity": -9007199254740991      }    ]  }'
{  "data": {    "id": 0,    "tenantId": -9007199254740991,    "type": "receive",    "status": "posted",    "note": "string",    "reference": {      "type": "string",      "id": "string"    },    "reversesOperationId": 0,    "movements": [      {        "objectId": 0,        "namespace": "string",        "key": "string",        "batch": "string",        "quantityName": "on_hand",        "delta": 0,        "balanceAfter": 0      }    ],    "derived": {      "outputUnitCost": "string",      "outputBatch": "string",      "declaredLossValue": 0,      "allocation": "ratio",      "outputs": [        {          "key": "string",          "namespace": "string",          "batch": "string",          "quantity": -9007199254740991,          "unitCost": "string",          "valueShare": "string"        }      ]    },    "createdAt": "string"  }}