Delete section
curl --request DELETE \
--url https://api.noyax.com/api/v1/stock/warehouses/{warehouseId}/sections/{sectionId} \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/stock/warehouses/{warehouseId}/sections/{sectionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'DELETE',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/stock/warehouses/{warehouseId}/sections/{sectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/stock/warehouses/{warehouseId}/sections/{sectionId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "4103",
"Message": "The section cannot be deleted because it is used in a record (despatch, warehouse slip, stock count, ...).",
"Errors": [
{
"Code": "4103",
"Message": "The section cannot be deleted because it is used in a record (despatch, warehouse slip, stock count, ...)."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "4000",
"Message": "Warehouse not found.",
"Errors": [
{
"Code": "4000",
"Message": "Warehouse not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Sections
Delete section
Deletes a section.
DELETE
/
api
/
v1
/
stock
/
warehouses
/
{warehouseId}
/
sections
/
{sectionId}
Delete section
curl --request DELETE \
--url https://api.noyax.com/api/v1/stock/warehouses/{warehouseId}/sections/{sectionId} \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/stock/warehouses/{warehouseId}/sections/{sectionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'DELETE',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/stock/warehouses/{warehouseId}/sections/{sectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/stock/warehouses/{warehouseId}/sections/{sectionId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "4103",
"Message": "The section cannot be deleted because it is used in a record (despatch, warehouse slip, stock count, ...).",
"Errors": [
{
"Code": "4103",
"Message": "The section cannot be deleted because it is used in a record (despatch, warehouse slip, stock count, ...)."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "4000",
"Message": "Warehouse not found.",
"Errors": [
{
"Code": "4000",
"Message": "Warehouse not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}A section used in a despatch, warehouse slip or stock count cannot be deleted (
4103).
Error codes
Codes this endpoint can return. The general errors that apply to every endpoint (authentication, permissions, request headers, request limits) are not repeated here.| Code | HTTP | Meaning |
|---|---|---|
4000 | 404 | Warehouse not found |
4100 | 404 | Section not found |
4103 | 400 | The section cannot be deleted because it is used in a record (despatch, warehouse slip, stock count, …) |
Authorizations
Headers
Response
No Content