Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
This API is not authenticated.
Acceptances
Goods receiving documents (warehouse inbound). Use these endpoints to list, create, view, update and delete acceptances.
Authentication: Bearer Token (Laravel Sanctum)
Access scope
- Results are automatically scoped to the callerβs
acc_domain_id(their tenant/domain).
List acceptances with advanced filtering
requires authentication
Returns a paginated list of acceptances available to the authenticated user. Supports multiple filters, ranges and sorting.
β
Multiple exact filters are supported via arrays: field[]=1&field[]=2
Examples:
-
Multiple warehouses + only created status:
/api/acceptances?acc_wh_id[]=1&acc_wh_id[]=3&acc_status[]=1 -
Multiple shops + multiple types:
/api/acceptances?acc_shop_id[]=12&acc_shop_id[]=15&acc_type[]=1&acc_type[]=2 -
By IDs list:
/api/acceptances?acc_id[]=101&acc_id[]=102&acc_id[]=150 -
Search by external id (LIKE):
/api/acceptances?acc_ext_id=ACC- -
Date range by document date:
/api/acceptances?acc_date_from=2026-01-01&acc_date_to=2026-01-31 -
Date range by creation date:
/api/acceptances?created_at_from=2026-02-01&created_at_to=2026-02-25 -
Combined:
/api/acceptances?acc_wh_id[]=3&acc_status[]=1&acc_type[]=2&acc_ext_id=ACME&acc_date_from=2026-02-01&acc_date_to=2026-02-25&sort=-acc_date,acc_id&per_page=50&page=1
Example request:
curl --request GET \
--get "https://localhost/api/acceptances?acc_id%5B%5D=101&acc_status%5B%5D=1&acc_wh_id%5B%5D=3&acc_shop_id%5B%5D=12&acc_type%5B%5D=1&acc_ext_id=ACC-101%0A%0A-----------------------------%0A%F0%9F%94%8E+Ranges%0A-----------------------------&acc_date_from=2026-01-01&acc_date_to=2026-01-31&created_at_from=2026-01-01&created_at_to=2026-01-31%0A%0A-----------------------------%0A%F0%9F%94%8E+Sorting%0A-----------------------------&sort=-acc_date%2Cacc_id%0A%0A-----------------------------%0A%F0%9F%94%8E+Pagination%0A-----------------------------&per_page=20&page=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"acc_ext_id\": \"b\",
\"acc_date_from\": \"2026-03-09T09:02:28\",
\"acc_date_to\": \"2026-03-09T09:02:28\",
\"created_at_from\": \"2026-03-09T09:02:28\",
\"created_at_to\": \"2026-03-09T09:02:28\",
\"sort\": \"architecto\",
\"per_page\": 22,
\"page\": 67,
\"acc_id\": [
16
],
\"acc_status\": [
16
],
\"acc_wh_id\": [
16
],
\"acc_shop_id\": [
16
],
\"acc_type\": [
16
]
}"
const url = new URL(
"https://localhost/api/acceptances"
);
const params = {
"acc_id[]": "101",
"acc_status[]": "1",
"acc_wh_id[]": "3",
"acc_shop_id[]": "12",
"acc_type[]": "1",
"acc_ext_id": "ACC-101
-----------------------------
π Ranges
-----------------------------",
"acc_date_from": "2026-01-01",
"acc_date_to": "2026-01-31",
"created_at_from": "2026-01-01",
"created_at_to": "2026-01-31
-----------------------------
π Sorting
-----------------------------",
"sort": "-acc_date,acc_id
-----------------------------
π Pagination
-----------------------------",
"per_page": "20",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"acc_ext_id": "b",
"acc_date_from": "2026-03-09T09:02:28",
"acc_date_to": "2026-03-09T09:02:28",
"created_at_from": "2026-03-09T09:02:28",
"created_at_to": "2026-03-09T09:02:28",
"sort": "architecto",
"per_page": 22,
"page": 67,
"acc_id": [
16
],
"acc_status": [
16
],
"acc_wh_id": [
16
],
"acc_shop_id": [
16
],
"acc_type": [
16
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated.",
"error": "AUTH_REQUIRED"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create acceptance (optionally with lines)
requires authentication
Creates a new acceptance (warehouse inbound) in the callerβs domain.
Server sets initial status to 1 (created) and the acc_date to now.
You may optionally send offers to create/update lines together with the document.
Example request:
curl --request POST \
"https://localhost/api/acceptances" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"acc_wh_id\": 3,
\"acc_shop_id\": 12,
\"acc_type\": 1,
\"acc_ext_id\": 1234,
\"acc_comment\": \"\\\"Inbound from ACME\\\"\",
\"offers\": [
{
\"ao_offer_id\": 77,
\"ao_expected\": 10,
\"ao_price\": 4.99
},
{
\"ao_offer_ext_id\": \"EXT-77\",
\"ao_expected\": 5
}
]
}"
const url = new URL(
"https://localhost/api/acceptances"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"acc_wh_id": 3,
"acc_shop_id": 12,
"acc_type": 1,
"acc_ext_id": 1234,
"acc_comment": "\"Inbound from ACME\"",
"offers": [
{
"ao_offer_id": 77,
"ao_expected": 10,
"ao_price": 4.99
},
{
"ao_offer_ext_id": "EXT-77",
"ao_expected": 5
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get acceptance by ID
requires authentication
Returns a single acceptance with related entities and line items.
Example request:
curl --request GET \
--get "https://localhost/api/acceptances/101" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/acceptances/101"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated.",
"error": "AUTH_REQUIRED"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update acceptance (and upsert/delete lines in the same request)
requires authentication
Updates editable fields of an existing acceptance in the callerβs domain.
Optional:
offersarray: upsert lines (create when ao_id is absent, update when ao_id is present)offers_deletearray: delete lines by ao_id (scoped to this acceptance)
Example request:
curl --request PUT \
"https://localhost/api/acceptances/101" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"acc_date\": \"\\\"2026-02-15\\\"\",
\"acc_ext_id\": 1234,
\"acc_comment\": \"\\\"Adjusted note\\\"\",
\"offers\": [
{
\"ao_id\": 555,
\"ao_expected\": 12
},
{
\"ao_offer_ext_id\": \"EXT-99\",
\"ao_expected\": 3
}
],
\"offers_delete\": [
111,
112
]
}"
const url = new URL(
"https://localhost/api/acceptances/101"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"acc_date": "\"2026-02-15\"",
"acc_ext_id": 1234,
"acc_comment": "\"Adjusted note\"",
"offers": [
{
"ao_id": 555,
"ao_expected": 12
},
{
"ao_offer_ext_id": "EXT-99",
"ao_expected": 3
}
],
"offers_delete": [
111,
112
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete acceptance
requires authentication
Deletes an acceptance in the callerβs domain.
Example request:
curl --request DELETE \
"https://localhost/api/acceptances/101" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/acceptances/101"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Acceptances Β» Lines
Manage line items (offers) inside an acceptance (warehouse inbound document).
Authentication: Bearer Token (Laravel Sanctum)
Access scope
- All operations are restricted to the callerβs domain (
acc_domain_id = user.domain_id). - The acceptance must exist and belong to the callerβs domain.
Barcode note:
- If
ao_barcodeis provided, we also sync it into warehouse items (whc_wh_items.whci_barcode) viaWhCore::saveOffers()(docType=1) without changing accepted quantities (count=0).
List offers (lines) of an acceptance
Example request:
curl --request GET \
--get "https://localhost/api/acceptances/architecto/offers" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"ao_barcode\": \"b\",
\"ao_batch\": \"n\",
\"ao_expiration_from\": \"2026-03-09T09:02:28\",
\"ao_expiration_to\": \"2026-03-09T09:02:28\",
\"sort\": \"architecto\",
\"per_page\": 22,
\"page\": 67,
\"ao_id\": [
66
],
\"ao_offer_id\": [
27
]
}"
const url = new URL(
"https://localhost/api/acceptances/architecto/offers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"ao_barcode": "b",
"ao_batch": "n",
"ao_expiration_from": "2026-03-09T09:02:28",
"ao_expiration_to": "2026-03-09T09:02:28",
"sort": "architecto",
"per_page": 22,
"page": 67,
"ao_id": [
66
],
"ao_offer_id": [
27
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated.",
"error": "AUTH_REQUIRED"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add offers (lines) to an acceptance
Example request:
curl --request POST \
"https://localhost/api/acceptances/architecto/offers" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/acceptances/architecto/offers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a line in an acceptance
Example request:
curl --request PUT \
"https://localhost/api/acceptances/architecto/offers/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"ao_expected\": 27,
\"ao_price\": 4326.41688,
\"ao_batch\": \"m\",
\"ao_expiration_date\": \"2026-03-09T09:02:28\",
\"ao_barcode\": \"i\"
}"
const url = new URL(
"https://localhost/api/acceptances/architecto/offers/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"ao_expected": 27,
"ao_price": 4326.41688,
"ao_batch": "m",
"ao_expiration_date": "2026-03-09T09:02:28",
"ao_barcode": "i"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a line from an acceptance
Example request:
curl --request DELETE \
"https://localhost/api/acceptances/architecto/offers/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/acceptances/architecto/offers/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DataMatrix
Manage DataMatrix codes (rw_datamatrix).
Authentication: This API uses NWMS Sanctum. Send your personal access token in the HTTP header: Authorization: Bearer {token}
Get list of DataMatrix records with advanced filtering
requires authentication
Returns a paginated list of DataMatrix records available to the authenticated user. Supports multiple filters, partial match, sorting and pagination.
β
Multiple exact filters are supported via arrays: field[]=1&field[]=2
Access scope:
- admin: can see records from any domain
- non-admin: forced to own domain (
dmt_domain_id = user.domain_id)
Examples:
-
Latest records:
/api/datamatrix?per_page=50 -
Filter by warehouse and status:
/api/datamatrix?dmt_wh_id[]=2&dmt_status[]=0 -
Filter by acceptance or order:
/api/datamatrix?dmt_acceptance_id[]=538/api/datamatrix?dmt_order_id[]=105 -
Search by barcode (LIKE):
/api/datamatrix?dmt_barcode=460123 -
Search by datamatrix (LIKE):
/api/datamatrix?dmt_datamatrix=0104601234567890 -
Filter by multiple IDs:
/api/datamatrix?dmt_id[]=1&dmt_id[]=10&dmt_id[]=25 -
Combined + sorting + paging:
/api/datamatrix?dmt_wh_id[]=2&dmt_status[]=0&sort=-dmt_id&per_page=100&page=1
Example request:
curl --request GET \
--get "https://localhost/api/datamatrix?dmt_id%5B%5D=1&dmt_domain_id%5B%5D=10&dmt_status%5B%5D=0&dmt_wh_id%5B%5D=2&dmt_acceptance_id%5B%5D=538&dmt_order_id%5B%5D=105&dmt_accept_place%5B%5D=12345&dmt_order_place%5B%5D=999&dmt_barcode=460123&dmt_datamatrix=010460123456789021ABC%0A%0A-----------------------------%0A%F0%9F%94%8E+Sorting%0A-----------------------------&sort=-dmt_id%2Cdmt_status%0AAllowed+fields%3A+dmt_id%2C+dmt_status%2C+dmt_wh_id%2C+dmt_acceptance_id%2C+dmt_order_id%2C+dmt_created_date%2C+dmt_used_date%2C+created_at%0A%0A-----------------------------%0A%F0%9F%94%8E+Pagination%0A-----------------------------&per_page=250&page=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"dmt_barcode\": \"b\",
\"dmt_datamatrix\": \"n\",
\"sort\": \"architecto\",
\"per_page\": 22,
\"page\": 67,
\"dmt_id\": [
66
],
\"dmt_domain_id\": [
27
],
\"dmt_status\": [
\"1\"
],
\"dmt_wh_id\": [
35
],
\"dmt_acceptance_id\": [
43
],
\"dmt_order_id\": [
16
],
\"dmt_accept_place\": [
26
],
\"dmt_order_place\": [
40
]
}"
const url = new URL(
"https://localhost/api/datamatrix"
);
const params = {
"dmt_id[]": "1",
"dmt_domain_id[]": "10",
"dmt_status[]": "0",
"dmt_wh_id[]": "2",
"dmt_acceptance_id[]": "538",
"dmt_order_id[]": "105",
"dmt_accept_place[]": "12345",
"dmt_order_place[]": "999",
"dmt_barcode": "460123",
"dmt_datamatrix": "010460123456789021ABC
-----------------------------
π Sorting
-----------------------------",
"sort": "-dmt_id,dmt_status
Allowed fields: dmt_id, dmt_status, dmt_wh_id, dmt_acceptance_id, dmt_order_id, dmt_created_date, dmt_used_date, created_at
-----------------------------
π Pagination
-----------------------------",
"per_page": "250",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"dmt_barcode": "b",
"dmt_datamatrix": "n",
"sort": "architecto",
"per_page": 22,
"page": 67,
"dmt_id": [
66
],
"dmt_domain_id": [
27
],
"dmt_status": [
"1"
],
"dmt_wh_id": [
35
],
"dmt_acceptance_id": [
43
],
"dmt_order_id": [
16
],
"dmt_accept_place": [
26
],
"dmt_order_place": [
40
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated.",
"error": "AUTH_REQUIRED"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create DataMatrix records (batch)
requires authentication
Creates new DataMatrix records in batch.
Access scope:
- admin: can insert into any domain only if dmt_domain_id is explicitly allowed by your business rules
- non-admin: domain is forced to user.domain_id
Notes:
dmt_domain_idis ALWAYS enforced (non-admin) and should not be sent.dmt_wh_idmust belong to the same domain (prevents inserting into ΡΡΠΆΠΎΠΉ ΡΠΊΠ»Π°Π΄).
Examples:
- Create 2 codes:
POST
/api/datamatrix/batch{ "items": [ {"dmt_wh_id":2,"dmt_barcode":"4601234567890","dmt_short_code":"ABC123","dmt_datamatrix":"010460..."}, {"dmt_wh_id":2,"dmt_status":0,"dmt_acceptance_id":538,"dmt_barcode":"4601234567891","dmt_short_code":"ABC124","dmt_datamatrix":"010460..."} ] }
Example request:
curl --request POST \
"https://localhost/api/datamatrix" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"architecto\"
]
}"
const url = new URL(
"https://localhost/api/datamatrix"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"architecto"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Created):
{
"created": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update status for DataMatrix records (batch)
requires authentication
Updates dmt_status to 0/1/2 for multiple records by IDs.
Examples:
- Mark codes as "used" (status=2):
POST
/api/datamatrix/status-batch{"ids":[101,102,103],"dmt_status":2}
Example request:
curl --request PUT \
"https://localhost/api/datamatrix/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"ids\": [
101,
102,
103
],
\"dmt_status\": 1
}"
const url = new URL(
"https://localhost/api/datamatrix/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"ids": [
101,
102,
103
],
"dmt_status": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Updated):
{
"updated": 3,
"dmt_status": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete DataMatrix records (batch)
requires authentication
Deletes records by IDs, but only those with dmt_status = 0.
Examples:
- Delete draft/imported codes (status=0):
POST
/api/datamatrix/delete-batch{"ids":[101,102,103]}
Example request:
curl --request DELETE \
"https://localhost/api/datamatrix" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"ids\": [
101,
102,
103
]
}"
const url = new URL(
"https://localhost/api/datamatrix"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"ids": [
101,
102,
103
]
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Deleted):
{
"deleted": 2,
"skipped": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delivery Payments
Endpoints for reading order delivery payment rows (rw_order_delivery_payments).
Authorization
All endpoints require Bearer Token (Laravel Sanctum).
Domain scoping
- Non-admin users are automatically scoped to their
domain_id(odp_domain_id).
Notes
- This API is read-only (no create/update/delete).
Get delivery payments list
requires authentication
Returns a paginated list of delivery payment rows with filtering and sorting.
Pagination
per_pageis capped at 250.
Sorting
- Use
sort_bywith allowed columns. - Use
sort_dirasascordesc. Defaults todesc.
Example request:
curl --request GET \
--get "https://localhost/api/order-delivery-payments?page=1&per_page=50&odp_id=1001&odp_order_id=555&odp_track_id=CDEK-123&odp_status_id=1&odp_payment_order_id=987&odp_etalon_order_id=ETL-777&odp_transaction_id=123456&odp_cod_act_id=222&created_from=2026-01-01&created_to=2026-01-31&sort_by=created_at&sort_dir=desc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"per_page\": 1,
\"odp_id\": 16,
\"odp_order_id\": 16,
\"odp_track_id\": \"n\",
\"odp_status_id\": 16,
\"odp_payment_order_id\": 16,
\"odp_etalon_order_id\": \"n\",
\"odp_transaction_id\": 16,
\"odp_cod_act_id\": 16,
\"created_from\": \"2026-03-09\",
\"created_to\": \"2026-03-09\",
\"sort_by\": \"architecto\",
\"sort_dir\": \"architecto\"
}"
const url = new URL(
"https://localhost/api/order-delivery-payments"
);
const params = {
"page": "1",
"per_page": "50",
"odp_id": "1001",
"odp_order_id": "555",
"odp_track_id": "CDEK-123",
"odp_status_id": "1",
"odp_payment_order_id": "987",
"odp_etalon_order_id": "ETL-777",
"odp_transaction_id": "123456",
"odp_cod_act_id": "222",
"created_from": "2026-01-01",
"created_to": "2026-01-31",
"sort_by": "created_at",
"sort_dir": "desc",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"per_page": 1,
"odp_id": 16,
"odp_order_id": 16,
"odp_track_id": "n",
"odp_status_id": 16,
"odp_payment_order_id": 16,
"odp_etalon_order_id": "n",
"odp_transaction_id": 16,
"odp_cod_act_id": 16,
"created_from": "2026-03-09",
"created_to": "2026-03-09",
"sort_by": "architecto",
"sort_dir": "architecto"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Success (paginated list)):
{
"data": [
{
"odp_id": 1001,
"odp_domain_id": 3,
"odp_order_id": 555,
"odp_track_id": "CDEK-123",
"odp_delivery_sum": 12.5,
"odp_delivery_tax": 2.5,
"odp_cod_sum": 100,
"odp_cod_agent_sum": 3,
"odp_status_id": 1,
"odp_payment_order_id": 987,
"odp_etalon_order_id": "ETL-777",
"odp_transaction_id": 123456,
"odp_cod_act_id": 222,
"created_at": "2026-02-05T12:00:00Z",
"updated_at": "2026-02-05T12:30:00Z"
}
],
"links": {
"first": "https://api.example.com/api/order-delivery-payments?page=1",
"last": "https://api.example.com/api/order-delivery-payments?page=3",
"prev": null,
"next": "https://api.example.com/api/order-delivery-payments?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 3,
"path": "https://api.example.com/api/order-delivery-payments",
"per_page": 50,
"to": 50,
"total": 123
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
GET api/user
Example request:
curl --request GET \
--get "https://localhost/api/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated.",
"error": "AUTH_REQUIRED"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/login
Example request:
curl --request POST \
"https://localhost/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/logout
Example request:
curl --request POST \
"https://localhost/api/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/accounts/create
Example request:
curl --request POST \
"https://localhost/api/accounts/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"language\": \"bngz\",
\"company\": \"m\",
\"FName\": \"i\",
\"LName\": \"y\",
\"email\": \"justina.gaylord@example.org\",
\"password\": \"gxwmi\\/#iw\\/\",
\"massage\": \"architecto\",
\"fst\": 4326.41688,
\"mName\": \"architecto\"
}"
const url = new URL(
"https://localhost/api/accounts/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"language": "bngz",
"company": "m",
"FName": "i",
"LName": "y",
"email": "justina.gaylord@example.org",
"password": "gxwmi\/#iw\/",
"massage": "architecto",
"fst": 4326.41688,
"mName": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET /api/products/offer
Π€ΠΎΡΠΌΠ°Ρ ΠΌΠ°ΠΊΡΠΈΠΌΠ°Π»ΡΠ½ΠΎ ΠΏΡΠΈΠ±Π»ΠΈΠΆΠ΅Π½ ΠΊ OrderAdmin.
Example request:
curl --request GET \
--get "https://localhost/api/products/offer" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/products/offer"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated.",
"error": "AUTH_REQUIRED"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Orders
Manage warehouse orders and their associated offers.
Each order represents a customer shipment or acceptance document, depending on the order type. Orders can include:
- delivery information (ds)
- recipient contact (contact)
- internal/external comments (comments)
- product lines (offers)
Authentication: This API uses NWMS Sanctum. Send your personal access token in the HTTP header: Authorization: Bearer {token}
Get list of orders with advanced filtering
Returns a paginated list of orders available to the authenticated user. Supports multiple exact filters, ranges and sorting.
β
Multiple exact filters are supported via arrays: field[]=1&field[]=2
Examples:
-
Multiple warehouses + multiple statuses:
/api/orders?o_wh_id[]=2&o_wh_id[]=3&o_status_id[]=10&o_status_id[]=105 -
Only COD orders for specific shop(s):
/api/orders?o_shop_id[]=1&o_shop_id[]=5&o_is_cod[]=1 -
Multiple types + sources:
/api/orders?o_type_id[]=1&o_type_id[]=2&o_source_id[]=3&o_source_id[]=4 -
Filter by IDs list:
/api/orders?o_id[]=105&o_id[]=106&o_id[]=200 -
Search by external id (LIKE):
/api/orders?o_ext_id=ORD- -
Sum range:
/api/orders?o_sum_from=100&o_sum_to=1000 -
Order date range:
/api/orders?o_date_from=2026-01-01&o_date_to=2026-01-31 -
Send date range:
/api/orders?o_date_send_from=2026-02-01&o_date_send_to=2026-02-15 -
Created-at range:
/api/orders?created_at_from=2026-02-01&created_at_to=2026-02-25 -
Combined (filters + ranges + sorting + paging):
/api/orders?o_wh_id[]=2&o_status_id[]=10&o_type_id[]=2&o_is_cod[]=1&o_sum_from=50&o_sum_to=500&o_date_from=2026-02-01&o_date_to=2026-02-25&sort=-o_date,o_sum&per_page=50&page=1 -
Sorting only:
/api/orders?sort=-o_id -
Sort by send date DESC, then by id ASC:
/api/orders?sort=-o_date_send,o_id
π Exact filters (multiple allowed)
Example request:
curl --request GET \
--get "https://localhost/api/orders?o_id%5B%5D=105&o_status_id%5B%5D=10&o_wh_id%5B%5D=2&o_shop_id%5B%5D=1&o_type_id%5B%5D=2&o_source_id%5B%5D=3&o_customer_type%5B%5D=1&o_company_id%5B%5D=44&o_is_cod%5B%5D=1&o_ext_id=ORD-%0A%0A-----------------------------%0A%F0%9F%94%8E+Ranges%0A-----------------------------&o_sum_from=100&o_sum_to=1000&o_date_from=2026-01-01&o_date_to=2026-01-31&o_date_send_from=2026-02-01&o_date_send_to=2026-02-15&created_at_from=2026-02-01&created_at_to=2026-02-25%0A%0A-----------------------------%0A%F0%9F%94%8E+Sorting%0A-----------------------------&sort=-o_date%2Co_sum%0AAllowed%3A+o_id%2C+o_date%2C+o_date_send%2C+o_sum%2C+created_at%0A%0A-----------------------------%0A%F0%9F%94%8E+Pagination%0A-----------------------------&per_page=50&page=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"o_ext_id\": \"b\",
\"o_sum_from\": 4326.41688,
\"o_sum_to\": 4326.41688,
\"o_date_from\": \"2026-03-09T09:02:28\",
\"o_date_to\": \"2026-03-09T09:02:28\",
\"o_date_send_from\": \"2026-03-09T09:02:28\",
\"o_date_send_to\": \"2026-03-09T09:02:28\",
\"created_at_from\": \"2026-03-09T09:02:28\",
\"created_at_to\": \"2026-03-09T09:02:28\",
\"sort\": \"architecto\",
\"per_page\": 22,
\"page\": 67,
\"o_id\": [
16
],
\"o_status_id\": [
16
],
\"o_wh_id\": [
16
],
\"o_shop_id\": [
16
],
\"o_type_id\": [
16
],
\"o_source_id\": [
16
],
\"o_customer_type\": [
16
],
\"o_company_id\": [
16
],
\"o_is_cod\": [
\"0\"
]
}"
const url = new URL(
"https://localhost/api/orders"
);
const params = {
"o_id[]": "105",
"o_status_id[]": "10",
"o_wh_id[]": "2",
"o_shop_id[]": "1",
"o_type_id[]": "2",
"o_source_id[]": "3",
"o_customer_type[]": "1",
"o_company_id[]": "44",
"o_is_cod[]": "1",
"o_ext_id": "ORD-
-----------------------------
π Ranges
-----------------------------",
"o_sum_from": "100",
"o_sum_to": "1000",
"o_date_from": "2026-01-01",
"o_date_to": "2026-01-31",
"o_date_send_from": "2026-02-01",
"o_date_send_to": "2026-02-15",
"created_at_from": "2026-02-01",
"created_at_to": "2026-02-25
-----------------------------
π Sorting
-----------------------------",
"sort": "-o_date,o_sum
Allowed: o_id, o_date, o_date_send, o_sum, created_at
-----------------------------
π Pagination
-----------------------------",
"per_page": "50",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"o_ext_id": "b",
"o_sum_from": 4326.41688,
"o_sum_to": 4326.41688,
"o_date_from": "2026-03-09T09:02:28",
"o_date_to": "2026-03-09T09:02:28",
"o_date_send_from": "2026-03-09T09:02:28",
"o_date_send_to": "2026-03-09T09:02:28",
"created_at_from": "2026-03-09T09:02:28",
"created_at_to": "2026-03-09T09:02:28",
"sort": "architecto",
"per_page": 22,
"page": 67,
"o_id": [
16
],
"o_status_id": [
16
],
"o_wh_id": [
16
],
"o_shop_id": [
16
],
"o_type_id": [
16
],
"o_source_id": [
16
],
"o_customer_type": [
16
],
"o_company_id": [
16
],
"o_is_cod": [
"0"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Success (paginated list)):
{
"data": [
{
"o_id": 49060,
"o_ext_id": "ORD-49060",
"o_wh_id": 106,
"o_shop_id": 85,
"o_status_id": 10,
"contact": {
"oc_first_name": "John",
"oc_phone": "+15551234567"
},
"ds": {
"ods_ds_id": 1,
"ods_track_number": "TRACK-123"
},
"comments": {
"oc_ds_text": "Fragile",
"oc_inner_text": "Call before delivery"
}
}
],
"meta": {
"current_page": 1,
"per_page": 50,
"total": 312
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new order
requires authentication
Creates a new order in the current user's domain. Computed fields (o_sum, o_cod_sum) are prohibited.
If o_ext_id is provided, the pair (o_ext_id, o_wh_id) must be unique.
β Supports nested objects:
contact(recipient)ds(delivery service fields)comments(texts for ds + internal)
Examples:
1) Minimal:
POST /api/orders
{
"o_type_id": 1,
"o_shop_id": 85,
"o_wh_id": 106
}
2) With contact + ds + comments: { "o_type_id": 1, "o_ext_id": "ORD-49060", "o_shop_id": 85, "o_wh_id": 106, "o_date_send": "2026-03-05", "contact": { "oc_first_name": "John", "oc_phone": "+15551234567", "oc_full_address": "Sofia, Bulgaria" }, "ds": { "ods_ds_id": 1, "ods_order_label": "https://www.aaa.ru" }, "comments": { "oc_ds_text": "Leave at reception", "oc_inner_text": "VIP client" } }
Example request:
curl --request POST \
"https://localhost/api/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"o_type_id\": 16,
\"o_ext_id\": \"n\",
\"o_group_id\": 16,
\"o_shop_id\": 16,
\"o_wh_id\": 16,
\"o_date_send\": \"2026-03-09T09:02:28\",
\"o_source_id\": 16,
\"o_status_id\": 16,
\"o_customer_type\": 16,
\"o_weight\": 16,
\"o_dimension_x\": 16,
\"o_dimension_y\": 16,
\"o_dimension_z\": 16,
\"o_is_cod\": false,
\"o_shipping_price\": 4326.41688,
\"o_shipping_cost\": 4326.41688,
\"o_company_id\": 16,
\"contact\": {
\"oc_first_name\": \"n\",
\"oc_middle_name\": \"g\",
\"oc_last_name\": \"z\",
\"oc_phone\": \"m\",
\"oc_email\": \"gulgowski.asia@example.com\",
\"oc_country_id\": 16,
\"oc_city_id\": 16,
\"oc_postcode\": \"ngzmiyvdljnikhwa\",
\"oc_coord_latitude\": 4326.41688,
\"oc_coord_longitude\": 4326.41688,
\"oc_full_address\": \"m\",
\"oc_ds_text\": \"architecto\",
\"oc_inner_text\": \"architecto\"
},
\"ds\": {
\"ods_ds_id\": 16,
\"ods_status\": 16,
\"ods_track_number\": \"n\",
\"ods_ds_pp_id\": \"g\",
\"ods_source_id\": 16,
\"ods_order_label\": \"n\"
},
\"comments\": {
\"oc_ds_text\": \"architecto\",
\"oc_inner_text\": \"architecto\"
}
}"
const url = new URL(
"https://localhost/api/orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"o_type_id": 16,
"o_ext_id": "n",
"o_group_id": 16,
"o_shop_id": 16,
"o_wh_id": 16,
"o_date_send": "2026-03-09T09:02:28",
"o_source_id": 16,
"o_status_id": 16,
"o_customer_type": 16,
"o_weight": 16,
"o_dimension_x": 16,
"o_dimension_y": 16,
"o_dimension_z": 16,
"o_is_cod": false,
"o_shipping_price": 4326.41688,
"o_shipping_cost": 4326.41688,
"o_company_id": 16,
"contact": {
"oc_first_name": "n",
"oc_middle_name": "g",
"oc_last_name": "z",
"oc_phone": "m",
"oc_email": "gulgowski.asia@example.com",
"oc_country_id": 16,
"oc_city_id": 16,
"oc_postcode": "ngzmiyvdljnikhwa",
"oc_coord_latitude": 4326.41688,
"oc_coord_longitude": 4326.41688,
"oc_full_address": "m",
"oc_ds_text": "architecto",
"oc_inner_text": "architecto"
},
"ds": {
"ods_ds_id": 16,
"ods_status": 16,
"ods_track_number": "n",
"ods_ds_pp_id": "g",
"ods_source_id": 16,
"ods_order_label": "n"
},
"comments": {
"oc_ds_text": "architecto",
"oc_inner_text": "architecto"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Created):
{
"data": {
"o_id": 49060,
"o_ext_id": "ORD-49060",
"o_shop_id": 85,
"o_wh_id": 106,
"contact": {
"oc_first_name": "John"
},
"ds": {
"ods_ds_id": 1
},
"comments": {
"oc_ds_text": "Leave at reception",
"oc_inner_text": "VIP client"
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a single order by ID
requires authentication
Returns detailed information about a specific order including offers, contact, ds and comments.
Example:
/api/orders/49060
Example request:
curl --request GET \
--get "https://localhost/api/orders/49060" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/orders/49060"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Found):
{
"data": {
"o_id": 49060,
"o_ext_id": "49054",
"o_shop_id": 85,
"o_wh_id": 106,
"contact": {
"oc_first_name": "John",
"oc_phone": "+15551234567"
},
"ds": {
"ods_ds_id": 1,
"ods_order_label": "https://www.aaa.ru"
},
"comments": {
"oc_ds_text": "Fragile",
"oc_inner_text": "Internal note"
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing order
requires authentication
Partially updates editable fields of an existing order (PATCH semantics).
β Supports nested objects:
contact(recipient)ds(delivery service fields)comments(texts for ds + internal)
β
Special DS rule:
If at least one ds.* field is provided AND there is no row in rw_order_ds for this order yet,
then ds.ods_ds_id becomes REQUIRED.
Examples:
1) Update ds + comments:
PATCH /api/orders/49060
{
"ds": { "ods_ds_id": 1, "ods_order_label": "https://www.aaa.ru" },
"comments": { "oc_ds_text": "oc_ds_text - ΡΠ΅ΡΡ!!!", "oc_inner_text": "oc_inner_text - ΡΠ΅ΡΡ!!!" }
}
2) Update only contact phone: { "contact": { "oc_phone": "+359888123456" } }
Example request:
curl --request PUT \
"https://localhost/api/orders/49060" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
const url = new URL(
"https://localhost/api/orders/49060"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Example response (200, Updated (includes nested objects)):
{
"data": {
"o_id": 49060,
"ds": {
"ods_ds_id": 1,
"ods_order_label": "https://www.aaa.ru"
},
"comments": {
"oc_ds_text": "oc_ds_text - ΡΠ΅ΡΡ!!!",
"oc_inner_text": "oc_inner_text - ΡΠ΅ΡΡ!!!"
}
}
}
Example response (422, DS validation (no ds row yet)):
{
"message": "The given data was invalid.",
"errors": {
"ds.ods_ds_id": [
"The ds.ods_ds_id field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete an order
requires authentication
Deletes a specific order.
Example request:
curl --request DELETE \
"https://localhost/api/orders/105" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/orders/105"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Deleted"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add offers (products) to an order
requires authentication
Adds one or more product lines to an existing order.
Example:
POST /api/orders/49060/offers
[
{"oo_offer_id":77,"oo_qty":2,"oo_price":39.95},
{"oo_offer_id":88,"oo_qty":1,"oo_price":9.99}
]
Example request:
curl --request POST \
"https://localhost/api/orders/49060/offers" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"*\": [
\"architecto\"
]
}"
const url = new URL(
"https://localhost/api/orders/49060/offers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"*": [
"architecto"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Added):
[
{
"oo_offer_id": 77,
"oo_qty": 2,
"oo_price": 39.95
},
{
"oo_offer_id": 88,
"oo_qty": 1,
"oo_price": 9.99
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an offer within an order
requires authentication
Updates quantity or price for a specific offer line.
Example:
PATCH /api/orders/49060/offers/123
{ "oo_qty": 5, "oo_price": 45.00 }
Example request:
curl --request PUT \
"https://localhost/api/orders/49060/offers/123" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"oo_qty\": 5,
\"oo_oc_price\": 4326.41688,
\"oo_price\": 45,
\"oo_expiration_date\": \"2026-03-09T09:02:28\",
\"oo_batch\": \"i\",
\"oo_operation_user_id\": 16
}"
const url = new URL(
"https://localhost/api/orders/49060/offers/123"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"oo_qty": 5,
"oo_oc_price": 4326.41688,
"oo_price": 45,
"oo_expiration_date": "2026-03-09T09:02:28",
"oo_batch": "i",
"oo_operation_user_id": 16
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Updated):
{
"oo_id": 123,
"oo_offer_id": 77,
"oo_qty": 5,
"oo_price": 45
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete an offer from an order
requires authentication
Removes a specific offer line from an existing order.
Example:
DELETE /api/orders/49060/offers/123
Example request:
curl --request DELETE \
"https://localhost/api/orders/49060/offers/123" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/orders/49060/offers/123"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Offer removed from order"
}
Example response (404):
{
"error": "Offer not found in this order"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Products
Endpoints for managing the product catalog ("offers").
Authorization
All endpoints require Bearer Token (Laravel Sanctum).
Domain & Access Scoping
- Non-admin users are automatically scoped to their
of_domain_id(same as the user'sdomain_id). - Additionally, if a user is not a
warehouse_manager, they can only access products belonging to shops wheresh_user_idβ { current_user.id, current_user.parent_id } (within the same domain).
Barcodes (rw_barcodes)
You can provide barcodes on create/update:
- Each barcode is stored in
rw_barcodeswith fields:br_offer_id,br_shop_id,br_main,br_barcode - If
barcodesis provided and not empty β exactly one item must havebr_main=1. - Barcodes are unique per shop: the same
br_barcodecannot belong to another offer in the samebr_shop_id.
Get product list
requires authentication
Example request:
curl --request GET \
--get "https://localhost/api/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated.",
"error": "AUTH_REQUIRED"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bulk create products
requires authentication
Creates multiple products in one request.
β Payload is a JSON array (not wrapped in "products"). Example: [ { "of_shop_id": 12, "of_name": "Cotton T-shirt", "of_ext_id": "EXT-1001", "barcodes": [ {"br_barcode":"4601234567890","br_main":1}, {"br_barcode":"4601234567891","br_main":0} ] } ]
Example request:
curl --request POST \
"https://localhost/api/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "[
{
\"of_shop_id\": 12,
\"of_name\": \"Cotton T-shirt\",
\"of_ext_id\": \"EXT-1001\",
\"barcodes\": [
{
\"br_barcode\": \"4601234567890\",
\"br_main\": 1
},
{
\"br_barcode\": \"4601234567891\",
\"br_main\": 0
}
]
}
]"
const url = new URL(
"https://localhost/api/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = [
{
"of_shop_id": 12,
"of_name": "Cotton T-shirt",
"of_ext_id": "EXT-1001",
"barcodes": [
{
"br_barcode": "4601234567890",
"br_main": 1
},
{
"br_barcode": "4601234567891",
"br_main": 0
}
]
}
];
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Created):
[
{
"data": {
"of_id": 1,
"of_name": "Cotton T-shirt"
}
}
]
Example response (422, Barcode validation error):
{
"message": "Validation error",
"errors": {
"0.barcodes": [
"Exactly one barcode must be marked as main (br_main=1)."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bulk update products
requires authentication
Updates multiple products in one request.
β Payload is a JSON array.
Identification rules:
- each item must contain either
of_id - or (
of_ext_id+of_shop_id)
Examples:
-
Update by ID: [ {"of_id": 10, "of_name":"Updated name", "barcodes":[{"br_barcode":"4601","br_main":1}]}, {"of_id": 11, "of_price": 19.99} ]
-
Update by ext_id + shop_id: [ {"of_ext_id":"EXT-1001","of_shop_id":12,"of_name":"Updated by ext id"} ]
Example request:
curl --request PUT \
"https://localhost/api/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "[
{
\"of_id\": 10,
\"of_name\": \"Updated name\",
\"barcodes\": [
{
\"br_barcode\": \"4601\",
\"br_main\": 1
}
]
},
{
\"of_ext_id\": \"EXT-1001\",
\"of_shop_id\": 12,
\"of_price\": 19.99
}
]"
const url = new URL(
"https://localhost/api/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = [
{
"of_id": 10,
"of_name": "Updated name",
"barcodes": [
{
"br_barcode": "4601",
"br_main": 1
}
]
},
{
"of_ext_id": "EXT-1001",
"of_shop_id": 12,
"of_price": 19.99
}
];
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Updated):
[
{
"data": {
"of_id": 10
}
},
{
"data": {
"of_id": 11
}
}
]
Example response (422, Validation error):
{
"message": "Validation error",
"errors": {
"0.of_id": [
"Either of_id or (of_ext_id + of_shop_id) is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/products/{id}
Example request:
curl --request GET \
--get "https://localhost/api/products/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/products/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated.",
"error": "AUTH_REQUIRED"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/products/{id}
Example request:
curl --request DELETE \
"https://localhost/api/products/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/products/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Shops
Manage shops (rw_shops).
Authentication: This API uses NWMS Sanctum. Send your personal access token in the HTTP header: Authorization: Bearer {token}
Get list of shops with advanced filtering
requires authentication
Returns a paginated list of shops available to the authenticated user. Supports multiple filters, partial match, sorting and pagination.
β
Multiple exact filters are supported via arrays: field[]=1&field[]=2
Access scope:
- admin: can see shops from any domain
- non-admin: forced to own domain (
sh_domain_id = user.domain_id) - clients (if role exists): only shops owned by user (and/or parent user)
Examples:
-
All shops (admin only):
/api/shops -
Search by name (LIKE):
/api/shops?sh_name=Ozon -
Filter by owner(s):
/api/shops?sh_user_id[]=55&sh_user_id[]=56 -
Filter by specific IDs:
/api/shops?sh_id[]=1&sh_id[]=10&sh_id[]=25 -
Domain filter (admin only; non-admin is ignored by access scope anyway):
/api/shops?sh_domain_id[]=10 -
Combined (name + owners + sorting + paging):
/api/shops?sh_name=Shop&sh_user_id[]=55&sort=-sh_id,sh_name&per_page=50&page=1 -
Sorting only:
/api/shops?sort=sh_name -
Sort DESC by name:
/api/shops?sort=-sh_name
Example request:
curl --request GET \
--get "https://localhost/api/shops?sh_id%5B%5D=1&sh_domain_id%5B%5D=10&sh_user_id%5B%5D=55&sh_name=%22Ozon%22%0A%0A-----------------------------%0A%F0%9F%94%8E+Sorting%0A-----------------------------&sort=-sh_id%2Csh_name%0A%0AAllowed+fields%3A+sh_id%2C+sh_name%2C+sh_user_id%2C+sh_domain_id%2C+created_at%0A%0A-----------------------------%0A%F0%9F%94%8E+Pagination%0A-----------------------------&per_page=250&page=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sh_name\": \"b\",
\"sort\": \"architecto\",
\"per_page\": 22,
\"page\": 67,
\"sh_id\": [
16
],
\"sh_domain_id\": [
16
],
\"sh_user_id\": [
16
]
}"
const url = new URL(
"https://localhost/api/shops"
);
const params = {
"sh_id[]": "1",
"sh_domain_id[]": "10",
"sh_user_id[]": "55",
"sh_name": ""Ozon"
-----------------------------
π Sorting
-----------------------------",
"sort": "-sh_id,sh_name
Allowed fields: sh_id, sh_name, sh_user_id, sh_domain_id, created_at
-----------------------------
π Pagination
-----------------------------",
"per_page": "250",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sh_name": "b",
"sort": "architecto",
"per_page": 22,
"page": 67,
"sh_id": [
16
],
"sh_domain_id": [
16
],
"sh_user_id": [
16
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Successful):
{
"data": [
{
"sh_id": 1,
"sh_domain_id": 10,
"sh_user_id": 55,
"sh_name": "Shop #1"
}
],
"meta": {
"current_page": 1,
"per_page": 250,
"total": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a single shop by ID
requires authentication
Example request:
curl --request GET \
--get "https://localhost/api/shops/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/shops/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Found):
{
"sh_id": 1,
"sh_domain_id": 10,
"sh_user_id": 55,
"sh_name": "Shop #1"
}
Example response (404, Not found):
{
"message": "No query results for model ..."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new shop
requires authentication
Creates a shop in the current user's domain. sh_domain_id is taken from authenticated user and cannot be overridden (unless admin).
Example request:
curl --request POST \
"https://localhost/api/shops" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sh_name\": \"\\\"Ozon Shop\\\"\",
\"sh_user_id\": 55
}"
const url = new URL(
"https://localhost/api/shops"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sh_name": "\"Ozon Shop\"",
"sh_user_id": 55
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Created):
{
"sh_id": 10,
"sh_domain_id": 10,
"sh_user_id": 55,
"sh_name": "Ozon Shop"
}
Example response (422, Validation error):
{
"message": "The given data was invalid.",
"errors": {
"sh_name": [
"The sh_name field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a shop (no delete)
requires authentication
Updates editable fields of a shop.
Rules:
- sh_domain_id cannot be changed
- non-admin users can update only shops within their domain
- (optional) non-admin can update only shops where sh_user_id is current user (enabled below)
Example request:
curl --request PUT \
"https://localhost/api/shops/10" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sh_name\": \"\\\"Ozon Shop - updated\\\"\",
\"sh_user_id\": 55
}"
const url = new URL(
"https://localhost/api/shops/10"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sh_name": "\"Ozon Shop - updated\"",
"sh_user_id": 55
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Updated):
{
"sh_id": 10,
"sh_name": "Ozon Shop - updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Warehouses
Manage warehouses (rw_warehouses).
Rules:
- Only users with roles: admin or warehouse_manager can access any endpoint in this controller.
- Create: only client warehouses allowed (wh_type = 2)
- wh_ff_id is required for creation and must reference an existing fulfilment warehouse (wh_type = 1) within the same domain (wh_domain_id).
Authentication: This API uses NWMS Sanctum. Send your personal access token in the HTTP header: Authorization: Bearer {token}
Get list of warehouses with advanced filtering
requires authentication
Returns a paginated list of warehouses available to the authenticated user. Only admin or warehouse_manager.
β
Multiple exact filters are supported via arrays: field[]=1&field[]=2
Examples:
-
Multiple warehouse types:
/api/warehouses?wh_type[]=1&wh_type[]=2 -
Multiple fulfilment warehouses + only active:
/api/warehouses?wh_ff_id[]=1&wh_ff_id[]=2&wh_status[]=1 -
Search by name (LIKE) + sort by name:
/api/warehouses?wh_name=Sofia&sort=wh_name -
Search by doc number (LIKE) + sort DESC by id:
/api/warehouses?wh_doc_num=BG-&sort=-wh_id -
Combined:
/api/warehouses?wh_type[]=2&wh_country_id[]=100&wh_company_id[]=44&wh_name=Varna&sort=-wh_id,wh_name&per_page=50
Example request:
curl --request GET \
--get "https://localhost/api/warehouses?wh_id%5B%5D=2&wh_status%5B%5D=1&wh_domain_id%5B%5D=10&wh_user_id%5B%5D=55&wh_country_id%5B%5D=100&wh_ff_id%5B%5D=2&wh_company_id%5B%5D=44&wh_billing_id%5B%5D=7&wh_type%5B%5D=2&wh_currency_id%5B%5D=3&wh_parent_id%5B%5D=1&wh_doc_num=BG-&wh_doc_date=2026-01&wh_name=Sofia%0A%0A-----------------------------%0A%F0%9F%94%8E+Sorting%0A-----------------------------&sort=-wh_id%2Cwh_name%0A%0A-----------------------------%0A%F0%9F%94%8E+Pagination%0A-----------------------------&per_page=250&page=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"wh_doc_num\": \"b\",
\"wh_doc_date\": \"n\",
\"wh_name\": \"g\",
\"sort\": \"architecto\",
\"per_page\": 22,
\"page\": 67,
\"wh_id\": [
16
],
\"wh_status\": [
16
],
\"wh_domain_id\": [
16
],
\"wh_user_id\": [
16
],
\"wh_country_id\": [
16
],
\"wh_ff_id\": [
16
],
\"wh_company_id\": [
16
],
\"wh_billing_id\": [
16
],
\"wh_type\": [
16
],
\"wh_currency_id\": [
16
],
\"wh_parent_id\": [
16
]
}"
const url = new URL(
"https://localhost/api/warehouses"
);
const params = {
"wh_id[]": "2",
"wh_status[]": "1",
"wh_domain_id[]": "10",
"wh_user_id[]": "55",
"wh_country_id[]": "100",
"wh_ff_id[]": "2",
"wh_company_id[]": "44",
"wh_billing_id[]": "7",
"wh_type[]": "2",
"wh_currency_id[]": "3",
"wh_parent_id[]": "1",
"wh_doc_num": "BG-",
"wh_doc_date": "2026-01",
"wh_name": "Sofia
-----------------------------
π Sorting
-----------------------------",
"sort": "-wh_id,wh_name
-----------------------------
π Pagination
-----------------------------",
"per_page": "250",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"wh_doc_num": "b",
"wh_doc_date": "n",
"wh_name": "g",
"sort": "architecto",
"per_page": 22,
"page": 67,
"wh_id": [
16
],
"wh_status": [
16
],
"wh_domain_id": [
16
],
"wh_user_id": [
16
],
"wh_country_id": [
16
],
"wh_ff_id": [
16
],
"wh_company_id": [
16
],
"wh_billing_id": [
16
],
"wh_type": [
16
],
"wh_currency_id": [
16
],
"wh_parent_id": [
16
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Successful):
{
"data": [
{
"wh_id": 2,
"wh_status": 1,
"wh_domain_id": 10,
"wh_user_id": 55,
"wh_type": 2,
"wh_ff_id": 1,
"wh_name": "Client warehouse Sofia",
"wh_currency_id": 3,
"wh_custom_json": "{\"pickup\":true,\"cutoff\":\"18:00\"}"
}
],
"meta": {
"current_page": 1,
"per_page": 50,
"total": 10
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a single warehouse by ID
requires authentication
Only admin or warehouse_manager.
Example request:
curl --request GET \
--get "https://localhost/api/warehouses/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/warehouses/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Found):
{
"wh_id": 2,
"wh_status": 1,
"wh_domain_id": 10,
"wh_user_id": 55,
"wh_type": 2,
"wh_ff_id": 1,
"wh_name": "Client warehouse Sofia",
"wh_custom_json": "{\"pickup\":true,\"cutoff\":\"18:00\"}"
}
Example response (404, Not found):
{
"message": "No query results for model ..."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new client warehouse (wh_type = 2)
requires authentication
Only admin or warehouse_manager.
Constraints:
- wh_type is forced to 2 (client)
- wh_ff_id is required and must reference a fulfilment warehouse (wh_type = 1) with the same wh_domain_id.
Example request:
curl --request POST \
"https://localhost/api/warehouses" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"wh_name\": \"\\\"Client warehouse Sofia\\\"\",
\"wh_ff_id\": 1,
\"wh_status\": 1,
\"wh_country_id\": 100,
\"wh_company_id\": 44,
\"wh_billing_id\": 7,
\"wh_doc_num\": \"\\\"BG-001\\\"\",
\"wh_doc_date\": \"\\\"2026-01-14\\\"\",
\"wh_currency_id\": 3,
\"wh_parent_id\": 1,
\"wh_type\": 16,
\"wh_set_expiration_date\": 1,
\"wh_set_batch\": 1,
\"wh_set_production_date\": 0,
\"wh_custom_json\": {
\"pickup\": true,
\"cutoff\": \"18:00\"
}
}"
const url = new URL(
"https://localhost/api/warehouses"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"wh_name": "\"Client warehouse Sofia\"",
"wh_ff_id": 1,
"wh_status": 1,
"wh_country_id": 100,
"wh_company_id": 44,
"wh_billing_id": 7,
"wh_doc_num": "\"BG-001\"",
"wh_doc_date": "\"2026-01-14\"",
"wh_currency_id": 3,
"wh_parent_id": 1,
"wh_type": 16,
"wh_set_expiration_date": 1,
"wh_set_batch": 1,
"wh_set_production_date": 0,
"wh_custom_json": {
"pickup": true,
"cutoff": "18:00"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Created):
{
"wh_id": 10,
"wh_domain_id": 10,
"wh_type": 2,
"wh_ff_id": 1,
"wh_name": "Client warehouse Sofia",
"wh_custom_json": "{\"pickup\":true,\"cutoff\":\"18:00\"}"
}
Example response (422, Validation error):
{
"message": "The given data was invalid.",
"errors": {
"wh_ff_id": [
"The selected wh_ff_id is invalid."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update warehouse (no delete)
requires authentication
Only admin or warehouse_manager.
Notes:
- wh_type cannot be changed (forced to remain as stored).
- wh_domain_id / wh_user_id cannot be changed via API.
- If wh_ff_id is provided, it must reference fulfilment warehouse (wh_type=1) in the same domain.
Example request:
curl --request PUT \
"https://localhost/api/warehouses/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"wh_name\": \"\\\"Client warehouse Sofia - updated\\\"\",
\"wh_status\": 1,
\"wh_country_id\": 100,
\"wh_company_id\": 44,
\"wh_billing_id\": 7,
\"wh_doc_num\": \"\\\"BG-001\\\"\",
\"wh_doc_date\": \"\\\"2026-01-14\\\"\",
\"wh_currency_id\": 3,
\"wh_parent_id\": 1,
\"wh_ff_id\": 1,
\"wh_set_expiration_date\": 1,
\"wh_set_batch\": 1,
\"wh_set_production_date\": 0,
\"wh_custom_json\": {
\"pickup\": true,
\"cutoff\": \"18:00\"
}
}"
const url = new URL(
"https://localhost/api/warehouses/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"wh_name": "\"Client warehouse Sofia - updated\"",
"wh_status": 1,
"wh_country_id": 100,
"wh_company_id": 44,
"wh_billing_id": 7,
"wh_doc_num": "\"BG-001\"",
"wh_doc_date": "\"2026-01-14\"",
"wh_currency_id": 3,
"wh_parent_id": 1,
"wh_ff_id": 1,
"wh_set_expiration_date": 1,
"wh_set_batch": 1,
"wh_set_production_date": 0,
"wh_custom_json": {
"pickup": true,
"cutoff": "18:00"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Updated):
{
"wh_id": 2,
"wh_name": "Client warehouse Sofia - updated",
"wh_custom_json": "{\"pickup\":false}"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get fulfilment warehouse data
requires authentication
Returns the fulfilment warehouse (wh_type = 1) by its ID.
Authentication (Sanctum):
- Requires a valid Sanctum personal access token.
- Send token in header: Authorization: Bearer {token}
Authorization:
- Roles allowed: admin, warehouse_manager
- Domain restriction:
- admin: any domain
- warehouse_manager: only own domain (warehouse.wh_domain_id must match user.domain_id)
Example request:
curl --request GET \
--get "https://localhost/api/warehouses/fulfillment/warehouses/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/warehouses/fulfillment/warehouses/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Found):
{
"data": {
"id": 1,
"name": "Fulfilment warehouse Varna",
"domain_id": 10,
"address": null,
"phone": null
}
}
Example response (403, Forbidden):
{
"message": "Forbidden: only admin or warehouse_manager"
}
Example response (403, Domain mismatch):
{
"message": "Forbidden: domain mismatch"
}
Example response (404, Not found):
{
"message": "No query results for model ..."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get client warehouses of a fulfilment warehouse
requires authentication
Returns client warehouses (wh_type = 2) linked to the given fulfilment warehouse. Link is done via wh_ff_id (client warehouse points to fulfilment warehouse).
Authentication (Sanctum):
- Requires a valid Sanctum personal access token.
- Send token in header: Authorization: Bearer {token}
Authorization:
- Roles allowed: admin, warehouse_manager
- Domain restriction is validated against the fulfilment warehouse:
- admin: any domain
- warehouse_manager: fulfilment warehouse must be in user's domain
Example request:
curl --request GET \
--get "https://localhost/api/warehouses/fulfillment/warehouses/1/client-warehouses" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://localhost/api/warehouses/fulfillment/warehouses/1/client-warehouses"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Successful):
{
"data": [
{
"id": 10,
"name": "Client warehouse Sofia",
"domain_id": 10
}
]
}
Example response (403, Forbidden):
{
"message": "Forbidden: only admin or warehouse_manager"
}
Example response (403, Domain mismatch):
{
"message": "Forbidden: domain mismatch"
}
Example response (404, Not found):
{
"message": "No query results for model ..."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.