Skip to content

Routes ​

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 routes ​

GET /admin/api/v1/inventories/routes

Retrieve a paginated list of routes with filtering and sorting

🔒 Requires a valid Bearer token.

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: suppliedWarehouse, supplierWarehouse, warehouses, company, creator, rulescompany,warehouses
filter[id]stringNoComma-separated list of IDs to filter byarchitecto
filter[name]stringNoFilter by route nameMTO
filter[company_id]stringNoFilter by company IDsarchitecto
filter[product_selectable]stringNoFilter by product selectable state1
filter[product_category_selectable]stringNoFilter by category selectable state1
filter[warehouse_selectable]stringNoFilter by warehouse selectable state1
filter[packaging_selectable]stringNoFilter by packaging selectable state0
sortstringNoSort field-created_at
bash
curl -X GET "https://your-domain.com/admin/api/v1/inventories/routes?include=company%2Cwarehouses&filter%5Bid%5D=architecto&filter%5Bname%5D=MTO&filter%5Bcompany_id%5D=architecto&filter%5Bproduct_selectable%5D=1&filter%5Bproduct_category_selectable%5D=1&filter%5Bwarehouse_selectable%5D=1&filter%5Bpackaging_selectable%5D=0&sort=-created_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/routes?include=company%2Cwarehouses&filter%5Bid%5D=architecto&filter%5Bname%5D=MTO&filter%5Bcompany_id%5D=architecto&filter%5Bproduct_selectable%5D=1&filter%5Bproduct_category_selectable%5D=1&filter%5Bwarehouse_selectable%5D=1&filter%5Bpackaging_selectable%5D=0&sort=-created_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/routes?include=company%2Cwarehouses&filter%5Bid%5D=architecto&filter%5Bname%5D=MTO&filter%5Bcompany_id%5D=architecto&filter%5Bproduct_selectable%5D=1&filter%5Bproduct_category_selectable%5D=1&filter%5Bwarehouse_selectable%5D=1&filter%5Bpackaging_selectable%5D=0&sort=-created_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/routes?include=company%2Cwarehouses&filter%5Bid%5D=architecto&filter%5Bname%5D=MTO&filter%5Bcompany_id%5D=architecto&filter%5Bproduct_selectable%5D=1&filter%5Bproduct_category_selectable%5D=1&filter%5Bwarehouse_selectable%5D=1&filter%5Bpackaging_selectable%5D=0&sort=-created_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": 2,
      "name": "Your Company: Receive in 1 step (Stock)",
      "sort": 2,
      "product_selectable": false,
      "product_category_selectable": true,
      "warehouse_selectable": true,
      "packaging_selectable": false,
      "created_at": "2026-10-12T09:59:23.000000Z",
      "updated_at": "2026-10-12T09:59:23.000000Z",
      "deleted_at": null
    },
    {
      "id": 2,
      "name": "Your Company: Receive in 1 step (Stock)",
      "sort": 2,
      "product_selectable": false,
      "product_category_selectable": true,
      "warehouse_selectable": true,
      "packaging_selectable": false,
      "created_at": "2026-10-12T09:59:23.000000Z",
      "updated_at": "2026-10-12T09:59:23.000000Z",
      "deleted_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 route ​

POST /admin/api/v1/inventories/routes

Create a new route

🔒 Requires a valid Bearer token.

Body parameters

ParameterTypeRequiredDescription
namestringYesRoute name. Must not be greater than 255 characters.
company_idintegerNoCompany ID. Must match an existing stored value.
product_category_selectablebooleanNoWhether this route can be applied to product categories.
product_selectablebooleanNoWhether this route can be applied to products.
packaging_selectablebooleanNoWhether this route can be applied to packaging.
warehouse_selectablebooleanNoWhether this route can be applied to warehouses.
warehousesinteger[]NoMust match an existing stored value.
bash
curl -X POST "https://your-domain.com/admin/api/v1/inventories/routes" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "MTO: Buy",
  "company_id": 1,
  "product_category_selectable": true,
  "product_selectable": true,
  "packaging_selectable": false,
  "warehouse_selectable": true,
  "warehouses": [
    16
  ]
}'
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/routes", {
  method: "POST",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "name": "MTO: Buy",
  "company_id": 1,
  "product_category_selectable": true,
  "product_selectable": true,
  "packaging_selectable": false,
  "warehouse_selectable": true,
  "warehouses": [
    16
  ]
}),
});

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/routes', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
    'name' => 'MTO: Buy',
    'company_id' => 1,
    'product_category_selectable' => true,
    'product_selectable' => true,
    'packaging_selectable' => false,
    'warehouse_selectable' => true,
    'warehouses' => [
      16,
    ],
  ],
]);

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

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

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

payload = {
    "name": "MTO: Buy",
    "company_id": 1,
    "product_category_selectable": True,
    "product_selectable": True,
    "packaging_selectable": False,
    "warehouse_selectable": True,
    "warehouses": [
        16,
    ],
}

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

data = response.json()
print(data)

Example response 201

json
{
  "data": {
    "id": 2,
    "name": "Your Company: Receive in 1 step (Stock)",
    "sort": 2,
    "product_selectable": false,
    "product_category_selectable": true,
    "warehouse_selectable": true,
    "packaging_selectable": false,
    "created_at": "2026-10-12T09:59:23.000000Z",
    "updated_at": "2026-10-12T09:59:23.000000Z",
    "deleted_at": null
  },
  "message": "Route created successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Show route ​

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

Retrieve a specific route by ID

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe route ID

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: suppliedWarehouse, supplierWarehouse, warehouses, company, creator, rulescompany,rules
bash
curl -X GET "https://your-domain.com/admin/api/v1/inventories/routes/{id}?include=company%2Crules" \
  -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/routes/{id}?include=company%2Crules", {
  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/routes/{id}?include=company%2Crules', [
    '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/routes/{id}?include=company%2Crules"

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": 2,
    "name": "Your Company: Receive in 1 step (Stock)",
    "sort": 2,
    "product_selectable": false,
    "product_category_selectable": true,
    "warehouse_selectable": true,
    "packaging_selectable": false,
    "created_at": "2026-10-12T09:59:23.000000Z",
    "updated_at": "2026-10-12T09:59:23.000000Z",
    "deleted_at": null
  }
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Update route ​

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

Update an existing route

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe route ID

Body parameters

ParameterTypeRequiredDescription
namestringNoRoute name. Must not be greater than 255 characters.
company_idintegerNoCompany ID. Must match an existing stored value.
product_category_selectablebooleanNoWhether this route can be applied to product categories.
product_selectablebooleanNoWhether this route can be applied to products.
packaging_selectablebooleanNoWhether this route can be applied to packaging.
warehouse_selectablebooleanNoWhether this route can be applied to warehouses.
warehousesinteger[]NoMust match an existing stored value.
bash
curl -X PUT "https://your-domain.com/admin/api/v1/inventories/routes/{id}" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "MTO: Buy",
  "company_id": 1,
  "product_category_selectable": true,
  "product_selectable": true,
  "packaging_selectable": false,
  "warehouse_selectable": true,
  "warehouses": [
    16
  ]
}'
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/routes/{id}", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "name": "MTO: Buy",
  "company_id": 1,
  "product_category_selectable": true,
  "product_selectable": true,
  "packaging_selectable": false,
  "warehouse_selectable": true,
  "warehouses": [
    16
  ]
}),
});

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/routes/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
    'name' => 'MTO: Buy',
    'company_id' => 1,
    'product_category_selectable' => true,
    'product_selectable' => true,
    'packaging_selectable' => false,
    'warehouse_selectable' => true,
    'warehouses' => [
      16,
    ],
  ],
]);

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

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

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

payload = {
    "name": "MTO: Buy",
    "company_id": 1,
    "product_category_selectable": True,
    "product_selectable": True,
    "packaging_selectable": False,
    "warehouse_selectable": True,
    "warehouses": [
        16,
    ],
}

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

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": 2,
    "name": "Your Company: Receive in 1 step (Stock)",
    "sort": 2,
    "product_selectable": false,
    "product_category_selectable": true,
    "warehouse_selectable": true,
    "packaging_selectable": false,
    "created_at": "2026-10-12T09:59:23.000000Z",
    "updated_at": "2026-10-12T09:59:23.000000Z",
    "deleted_at": null
  },
  "message": "Route updated successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Delete route ​

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

Soft delete a route

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe route ID
bash
curl -X DELETE "https://your-domain.com/admin/api/v1/inventories/routes/{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/routes/{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/routes/{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/routes/{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": "Route deleted successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Restore route ​

POST /admin/api/v1/inventories/routes/{id}/restore

Restore a soft deleted route

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe route ID
bash
curl -X POST "https://your-domain.com/admin/api/v1/inventories/routes/{id}/restore" \
  -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/routes/{id}/restore", {
  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/routes/{id}/restore', [
    '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/routes/{id}/restore"

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": 2,
    "name": "Your Company: Receive in 1 step (Stock)",
    "sort": 2,
    "product_selectable": false,
    "product_category_selectable": true,
    "warehouse_selectable": true,
    "packaging_selectable": false,
    "created_at": "2026-10-12T09:59:23.000000Z",
    "updated_at": "2026-10-12T09:59:23.000000Z",
    "deleted_at": null
  },
  "message": "Route restored successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Force delete route ​

DELETE /admin/api/v1/inventories/routes/{id}/force

Permanently delete a route

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe route ID
bash
curl -X DELETE "https://your-domain.com/admin/api/v1/inventories/routes/{id}/force" \
  -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/routes/{id}/force", {
  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/routes/{id}/force', [
    '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/routes/{id}/force"

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": "Route permanently deleted successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Released under the MIT License.