Create opening balance
Set initial stock levels for multiple products in a warehouse.
X-Api-Key<token>
Business API key, e.g. vuz_ab12cdef... Created via Settings → Integrations → API Keys. Unlike partner keys, a public API key's STRING does not encode its environment — isolation instead comes from a completely separate sandbox database: a key minted on the Sandbox server (above) only ever reads/writes sandbox data and can never see or affect production, regardless of what the key looks like.
In: header
Header Parameters
x-business-id*string
Business ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/inventory/movements/opening-balance" \ -H "x-business-id: string" \ -H "Content-Type: application/json" \ -d '{ "warehouseId": "string", "balanceDate": "2019-08-24T14:15:22Z", "items": [ { "productId": "string", "quantity": 100 } ] }'[ { "id": "string", "sequentialNumber": 0, "movementType": "purchase", "quantity": 0, "unit": "string", "unitCost": 0, "totalCost": 0, "balanceBefore": 0, "balanceAfter": 0, "warehouseId": "string", "warehouseName": "string", "productId": "string", "productName": "string", "productSku": "string", "referenceNumber": "string", "referenceDocumentType": "string", "documentId": "string", "linkedMovementId": "string", "notes": "string", "reason": "string", "adjustmentReason": "damage", "createdBy": "string", "createdByName": "string", "createdAt": "2019-08-24T14:15:22Z", "originType": "manual", "originMeta": {}, "batchReference": "string", "scannedImageUrl": "string" }]
