Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Auth management
POST api/login
Example request:
curl --request POST \
"https://api.demasled.com/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"user\": \"test@test.com\",
\"password\": \"password\",
\"database\": \"illo\"
}"
const url = new URL(
"https://api.demasled.com/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"user": "test@test.com",
"password": "password",
"database": "illo"
};
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/logout
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/logout" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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/me
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/me" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/me"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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 Refresh token
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/refresh" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/refresh"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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.
Deposit Management
GET api/deposit
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/deposit" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/deposit"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 46
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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/sistemas/user
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/sistemas/user" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/sistemas/user"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
{
"success": true,
"data": [
{
"id": 1,
"nombre": "dsysar",
"baseurl": "https://www.dsysar.com.ar/",
"baseurl_web": "https://www.demasled.com.ar/",
"activo": 1,
"basedatos": "dsysar",
"compras": "0",
"codigo_pais": "ar",
"imagen": null
},
{
"id": 2,
"nombre": "dsyscl",
"baseurl": "https://www.dsyscl.com.ar/",
"baseurl_web": "https://www.demasled.cl/",
"activo": 1,
"basedatos": "dsyscl",
"compras": "0",
"codigo_pais": "cl",
"imagen": null
},
{
"id": 3,
"nombre": "dsyses",
"baseurl": "https://www.dsyses.com.ar/",
"baseurl_web": "https://www.demasled.es/",
"activo": 1,
"basedatos": "dsyses",
"compras": "0",
"codigo_pais": "es",
"imagen": null
}
],
"message": null
}
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/sistemas
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/sistemas" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/sistemas"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
[
{
"id": 1,
"nombre": "dsysar",
"baseurl": "https://www.dsysar.com.ar/",
"baseurl_web": "https://www.demasled.com.ar/",
"activo": 1,
"basedatos": "dsysar",
"compras": "0",
"codigo_pais": "ar",
"imagen": null
},
{
"id": 2,
"nombre": "dsyscl",
"baseurl": "https://www.dsyscl.com.ar/",
"baseurl_web": "https://www.demasled.cl/",
"activo": 1,
"basedatos": "dsyscl",
"compras": "0",
"codigo_pais": "cl",
"imagen": null
},
{
"id": 3,
"nombre": "dsyses",
"baseurl": "https://www.dsyses.com.ar/",
"baseurl_web": "https://www.demasled.es/",
"activo": 1,
"basedatos": "dsyses",
"compras": "0",
"codigo_pais": "es",
"imagen": null
},
{
"id": 4,
"nombre": "dsyshk",
"baseurl": "https://www.dsyshk.com.ar/",
"baseurl_web": "https://www.demasled.com/",
"activo": 1,
"basedatos": "dsyshk",
"compras": "1",
"codigo_pais": "hk",
"imagen": null
},
{
"id": 6,
"nombre": "dsysus",
"baseurl": "https://www.dsysus.com.ar/",
"baseurl_web": "https://www.demasled.us/",
"activo": 1,
"basedatos": "dsysus",
"compras": "0",
"codigo_pais": "us",
"imagen": null
}
]
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/stock/transit/{id}
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/stock/transit/quidem" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/stock/transit/quidem"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 51
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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/stock/reserved/{id}
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/stock/reserved/quasi" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/stock/reserved/quasi"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 50
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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/stock/deposit/product/{id}
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/stock/deposit/product/in" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/stock/deposit/product/in"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 49
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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/stock/location/product/{id}
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/stock/location/product/minus" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/stock/location/product/minus"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 48
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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/stock/reposition/product/{id}
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/stock/reposition/product/eum" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/stock/reposition/product/eum"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 47
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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.
Stock Management
GET api/stock
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/stock" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/stock"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 54
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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/stock/detail/{id}
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/stock/detail/rerum" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/stock/detail/rerum"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 53
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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/stock/reserva/aspen/{codigo}
requires authentication
Example request:
curl --request GET \
--get "https://api.demasled.com/api/stock/reserva/aspen/distinctio" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.demasled.com/api/stock/reserva/aspen/distinctio"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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
x-ratelimit-limit: 60
x-ratelimit-remaining: 52
access-control-allow-origin: *
{
"success": false,
"data": null,
"message": "Token inválido"
}
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.