Openapi
Update an inventory stock record for a product.
sb-auth-token<token>Supabase browser session cookie. Supabase may split larger session values into chunked cookies like sb-auth-token.0.
organizationId*stringuuidstockRecordId*stringuuidThe inventory stock record payload.
application/jsonbinLocation?|length <= 240currency?|nullexpiresOn?|datelastCountedOn?|datelocationId?|nulllocationName?|length <= 240lotNumber?|length <= 240notes?|length <= 4000onHandQuantity*number0 <= valueproductId*productIdSchemauuidserialNumber?|length <= 240status?string"available""quarantined""expired""archived"unitCost?|0 <= valuevariantId?stringuuidReturns the updated stock record.
application/jsonallocatedQuantity*number0 <= valueavailableQuantity*number0 <= valuebinLocation*string|nullcreatedAt*stringdate-timecreatedBy*|uuidcurrency*string|nullexpiresOn*|dateid*inventoryStockRecordIdSchemauuidlastCountedOn*|datelocation*|nulllocationId*|nulllotNumber*string|nullnotes*string|nullonHandQuantity*number0 <= valueorganizationId*organizationIdSchemauuidproduct*|nullproductId*productIdSchemauuidserialNumber*string|nullstatus*inventoryStatusSchema"available""quarantined""expired""archived"unitCost*number|nullupdatedAt*stringdate-timeupdatedBy*|uuidvariantId*stringuuidcurl -X PATCH 'https://app.localhost/api/v1/organizations/123/inventory/stock-records/123' \ -H 'Content-Type: application/json' \ -d '{ "onHandQuantity": 0, "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113"}'{ "allocatedQuantity": 0, "availableQuantity": 0, "binLocation": "string", "createdAt": "2019-08-24T14:15:22Z", "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e", "currency": "string", "expiresOn": "2019-08-24", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "lastCountedOn": "2019-08-24", "location": { "createdAt": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "updatedAt": "2019-08-24T14:15:22Z" }, "locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54", "lotNumber": "string", "notes": "string", "onHandQuantity": 0, "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "product": { "brand": { "createdAt": "2019-08-24T14:15:22Z", "description": "string", "id": "centrakit", "logoUrl": "http://example.com", "name": "string", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "slug": "string", "updatedAt": "2019-08-24T14:15:22Z", "website": "string" }, "categories": [ { "createdAt": "2019-08-24T14:15:22Z", "description": "string", "icon": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43", "position": 0, "slug": "string", "updatedAt": "2019-08-24T14:15:22Z" } ], "categoryIds": [ "7a99018c-b68f-4d32-be08-29a0cbea434a" ], "currency": "string", "defaultSellingPrice": 0, "ean": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "images": [ { "altText": "string", "createdAt": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "position": 0, "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113", "updatedAt": "2019-08-24T14:15:22Z", "url": "http://example.com" } ], "manufacturer": "string", "manufacturerPartNumber": "string", "name": "string", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "sku": "string", "slug": "string", "status": "active", "suppliers": [ { "createdAt": "2019-08-24T14:15:22Z", "currency": "string", "externalId": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "isActive": true, "isPreferred": true, "leadTimeDays": 0, "minOrderQuantity": 0, "orderCode": "string", "orderMultiple": 0, "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113", "supplier": { "accountNumber": "string", "addressCity": "string", "addressCountry": "string", "addressLine1": "string", "addressLine2": "string", "addressPostalCode": "string", "addressState": "string", "billingEmail": "string", "btw": "string", "code": "string", "createdAt": "2019-08-24T14:15:22Z", "currency": "string", "defaultInventoryLocationId": "39ba1a59-f7f9-4e8f-a32f-270329b3f772", "defaultLeadTimeDays": 0, "email": "string", "externalId": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kvk": "string", "name": "string", "notes": "string", "orderingEmail": "string", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "paymentTermsDays": 0, "phone": "string", "source": "string", "status": "active", "updatedAt": "2019-08-24T14:15:22Z", "website": "string" }, "supplierId": "e01eb4c4-8eb9-4fb7-b625-61f58c6148db", "supplierSku": "string", "unitCost": 0, "updatedAt": "2019-08-24T14:15:22Z" } ], "tags": [ { "color": "string", "createdAt": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "task", "name": "string", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "position": 0, "slug": "string", "updatedAt": "2019-08-24T14:15:22Z" } ], "unitOfMeasure": "string", "updatedAt": "2019-08-24T14:15:22Z", "vatPercentage": 0, "stockStatus": "not_tracked" }, "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113", "serialNumber": "string", "status": "available", "unitCost": 0, "updatedAt": "2019-08-24T14:15:22Z", "updatedBy": "b0efe45f-0520-4e21-90f0-7e35f137732e", "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf"}