Skip to content

Quantities ​

Part of the Inventory API. Base URL https://your-domain.com/admin/api/v1 — replace the host with your own installation and the token placeholder with a real Bearer token (see Authentication).

List quantities ​

GET /admin/api/v1/inventories/quantities

Retrieve a paginated list of quantities with filtering and sorting

🔒 Requires a valid Bearer token.

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: product, location, storageCategory, lot, package, partner, user, company, creatorproduct,location
filter[id]stringNoComma-separated list of IDs to filter byarchitecto
filter[product_id]stringNoFilter by product IDsarchitecto
filter[location_id]stringNoFilter by location IDsarchitecto
filter[lot_id]stringNoFilter by lot IDsarchitecto
filter[package_id]stringNoFilter by package IDsarchitecto
filter[inventory_quantity_set]stringNoFilter by inventory quantity set (0 or 1)1
sortstringNoSort field-updated_at
bash
curl -X GET "https://your-domain.com/admin/api/v1/inventories/quantities?include=product%2Clocation&filter%5Bid%5D=architecto&filter%5Bproduct_id%5D=architecto&filter%5Blocation_id%5D=architecto&filter%5Blot_id%5D=architecto&filter%5Bpackage_id%5D=architecto&filter%5Binventory_quantity_set%5D=1&sort=-updated_at" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/quantities?include=product%2Clocation&filter%5Bid%5D=architecto&filter%5Bproduct_id%5D=architecto&filter%5Blocation_id%5D=architecto&filter%5Blot_id%5D=architecto&filter%5Bpackage_id%5D=architecto&filter%5Binventory_quantity_set%5D=1&sort=-updated_at", {
  method: "GET",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/inventories/quantities?include=product%2Clocation&filter%5Bid%5D=architecto&filter%5Bproduct_id%5D=architecto&filter%5Blocation_id%5D=architecto&filter%5Blot_id%5D=architecto&filter%5Bpackage_id%5D=architecto&filter%5Binventory_quantity_set%5D=1&sort=-updated_at', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/inventories/quantities?include=product%2Clocation&filter%5Bid%5D=architecto&filter%5Bproduct_id%5D=architecto&filter%5Blocation_id%5D=architecto&filter%5Blot_id%5D=architecto&filter%5Bpackage_id%5D=architecto&filter%5Binventory_quantity_set%5D=1&sort=-updated_at"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": [
    {
      "id": null,
      "quantity": 100,
      "reserved_quantity": 0,
      "counted_quantity": null,
      "difference_quantity": 0,
      "inventory_diff_quantity": 0,
      "available_quantity": 100,
      "inventory_quantity_set": false,
      "scheduled_at": null,
      "incoming_at": "2026-10-12T10:50:01.000000Z",
      "created_at": null,
      "updated_at": null
    },
    {
      "id": null,
      "quantity": 100,
      "reserved_quantity": 0,
      "counted_quantity": null,
      "difference_quantity": 0,
      "inventory_diff_quantity": 0,
      "available_quantity": 100,
      "inventory_quantity_set": false,
      "scheduled_at": null,
      "incoming_at": "2026-10-12T10:50:01.000000Z",
      "created_at": null,
      "updated_at": null
    }
  ],
  "links": {
    "first": "/?page=1",
    "last": "/?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "/?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "page": null,
        "active": false
      }
    ],
    "path": "/",
    "per_page": 10,
    "to": 2,
    "total": 2
  }
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Create quantity ​

POST /admin/api/v1/inventories/quantities

Create a new product quantity count

🔒 Requires a valid Bearer token.

Body parameters

ParameterTypeRequiredDescription
location_idintegerYesInventory location ID. Must match an existing stored value.
product_idintegerYesProduct ID. Configurable products are not allowed; pass a variant product ID instead. Must match an existing stored value.
storage_category_idintegerNoStorage category ID. Must match an existing stored value.
lot_idintegerNoLot ID. Required for lot/serial tracked products and must belong to the selected product. Must match an existing stored value.
package_idintegerNoPackage ID. Must belong to the selected location. Must match an existing stored value.
partner_idintegerNoOwner partner ID. Must match an existing stored value.
user_idintegerNoResponsible user ID. Must match an existing stored value.
company_idintegerNoCompany ID. Must match an existing stored value.
counted_quantitynumberYesCounted quantity entered during inventory adjustment. For serial-tracked products, this must be 0 or 1. Must be at least 0. Must not be greater than 99999999999.
scheduled_atstringNoScheduled inventory date. Must be a valid date.
bash
curl -X POST "https://your-domain.com/admin/api/v1/inventories/quantities" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "location_id": 1,
  "product_id": 1,
  "storage_category_id": 1,
  "lot_id": 1,
  "package_id": 1,
  "partner_id": 1,
  "user_id": 1,
  "company_id": 1,
  "counted_quantity": 25,
  "scheduled_at": "2026-02-25"
}'
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/quantities", {
  method: "POST",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "location_id": 1,
  "product_id": 1,
  "storage_category_id": 1,
  "lot_id": 1,
  "package_id": 1,
  "partner_id": 1,
  "user_id": 1,
  "company_id": 1,
  "counted_quantity": 25,
  "scheduled_at": "2026-02-25"
}),
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/inventories/quantities', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
    'location_id' => 1,
    'product_id' => 1,
    'storage_category_id' => 1,
    'lot_id' => 1,
    'package_id' => 1,
    'partner_id' => 1,
    'user_id' => 1,
    'company_id' => 1,
    'counted_quantity' => 25,
    'scheduled_at' => '2026-02-25',
  ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/inventories/quantities"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = {
    "location_id": 1,
    "product_id": 1,
    "storage_category_id": 1,
    "lot_id": 1,
    "package_id": 1,
    "partner_id": 1,
    "user_id": 1,
    "company_id": 1,
    "counted_quantity": 25,
    "scheduled_at": "2026-02-25",
}

response = requests.post(url, headers=headers, json=payload)

data = response.json()
print(data)

Example response 201

json
{
  "data": {
    "id": null,
    "quantity": 100,
    "reserved_quantity": 0,
    "counted_quantity": null,
    "difference_quantity": 0,
    "inventory_diff_quantity": 0,
    "available_quantity": 100,
    "inventory_quantity_set": false,
    "scheduled_at": null,
    "incoming_at": "2026-10-12T10:50:01.000000Z",
    "created_at": null,
    "updated_at": null
  },
  "message": "Quantity created successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Show quantity ​

GET /admin/api/v1/inventories/quantities/{id}

Retrieve a specific quantity by ID

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe quantity ID

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: product, location, storageCategory, lot, package, partner, user, company, creatorproduct,location
bash
curl -X GET "https://your-domain.com/admin/api/v1/inventories/quantities/{id}?include=product%2Clocation" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/quantities/{id}?include=product%2Clocation", {
  method: "GET",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/inventories/quantities/{id}?include=product%2Clocation', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/inventories/quantities/{id}?include=product%2Clocation"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": null,
    "quantity": 100,
    "reserved_quantity": 0,
    "counted_quantity": null,
    "difference_quantity": 0,
    "inventory_diff_quantity": 0,
    "available_quantity": 100,
    "inventory_quantity_set": false,
    "scheduled_at": null,
    "incoming_at": "2026-10-12T10:50:01.000000Z",
    "created_at": null,
    "updated_at": null
  }
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Update quantity ​

PUT /admin/api/v1/inventories/quantities/{id}

Update a quantity count entry

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe quantity ID

Body parameters

ParameterTypeRequiredDescription
counted_quantitynumberYesCounted quantity entered during inventory adjustment. Must be at least 0. Must not be greater than 99999999999.
bash
curl -X PUT "https://your-domain.com/admin/api/v1/inventories/quantities/{id}" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "counted_quantity": 25
}'
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/quantities/{id}", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "counted_quantity": 25
}),
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://your-domain.com/admin/api/v1/inventories/quantities/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
    'counted_quantity' => 25,
  ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/inventories/quantities/{id}"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = {
    "counted_quantity": 25,
}

response = requests.put(url, headers=headers, json=payload)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": null,
    "quantity": 100,
    "reserved_quantity": 0,
    "counted_quantity": null,
    "difference_quantity": 0,
    "inventory_diff_quantity": 0,
    "available_quantity": 100,
    "inventory_quantity_set": false,
    "scheduled_at": null,
    "incoming_at": "2026-10-12T10:50:01.000000Z",
    "created_at": null,
    "updated_at": null
  },
  "message": "Quantity updated successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Delete quantity ​

DELETE /admin/api/v1/inventories/quantities/{id}

Delete a quantity

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe quantity ID
bash
curl -X DELETE "https://your-domain.com/admin/api/v1/inventories/quantities/{id}" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/quantities/{id}", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://your-domain.com/admin/api/v1/inventories/quantities/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/inventories/quantities/{id}"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.delete(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "message": "Quantity deleted successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Apply quantity ​

POST /admin/api/v1/inventories/quantities/{id}/apply

Apply counted quantity and generate adjustment move

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe quantity ID
bash
curl -X POST "https://your-domain.com/admin/api/v1/inventories/quantities/{id}/apply" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/quantities/{id}/apply", {
  method: "POST",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/inventories/quantities/{id}/apply', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/inventories/quantities/{id}/apply"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.post(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": null,
    "quantity": 100,
    "reserved_quantity": 0,
    "counted_quantity": null,
    "difference_quantity": 0,
    "inventory_diff_quantity": 0,
    "available_quantity": 100,
    "inventory_quantity_set": false,
    "scheduled_at": null,
    "incoming_at": "2026-10-12T10:50:01.000000Z",
    "created_at": null,
    "updated_at": null
  },
  "message": "Quantity applied successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Clear quantity ​

POST /admin/api/v1/inventories/quantities/{id}/clear

Clear pending counted quantity without applying adjustments

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe quantity ID
bash
curl -X POST "https://your-domain.com/admin/api/v1/inventories/quantities/{id}/clear" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/quantities/{id}/clear", {
  method: "POST",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/inventories/quantities/{id}/clear', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/inventories/quantities/{id}/clear"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.post(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": null,
    "quantity": 100,
    "reserved_quantity": 0,
    "counted_quantity": null,
    "difference_quantity": 0,
    "inventory_diff_quantity": 0,
    "available_quantity": 100,
    "inventory_quantity_set": false,
    "scheduled_at": null,
    "incoming_at": "2026-10-12T10:50:01.000000Z",
    "created_at": null,
    "updated_at": null
  },
  "message": "Quantity cleared successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Released under the MIT License.