MENU navbar-image

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\": \"debitis\"
}"
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": "debitis"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

user   string   

string required Email. Example: test@test.com

password   string   

string required Codigo de Juego. Must be at least 6 characters. Example: password

database   string   

Example: debitis

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"
}
 

Request      

GET api/logout

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

GET api/me

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

GET api/refresh

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

GET api/deposit

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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
}
 

Request      

GET api/sistemas/user

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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
    }
]
 

Request      

GET api/sistemas

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/stock/transit/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.demasled.com/api/stock/transit/recusandae" \
    --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/recusandae"
);

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"
}
 

Request      

GET api/stock/transit/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the transit. Example: recusandae

GET api/stock/reserved/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.demasled.com/api/stock/reserved/aut" \
    --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/aut"
);

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"
}
 

Request      

GET api/stock/reserved/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the reserved. Example: aut

GET api/stock/deposit/product/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.demasled.com/api/stock/deposit/product/ipsam" \
    --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/ipsam"
);

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"
}
 

Request      

GET api/stock/deposit/product/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product. Example: ipsam

GET api/stock/location/product/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.demasled.com/api/stock/location/product/expedita" \
    --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/expedita"
);

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"
}
 

Request      

GET api/stock/location/product/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product. Example: expedita

GET api/stock/reposition/product/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.demasled.com/api/stock/reposition/product/sequi" \
    --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/sequi"
);

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"
}
 

Request      

GET api/stock/reposition/product/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product. Example: sequi

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"
}
 

Request      

GET api/stock

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

GET api/stock/detail/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the detail. Example: rerum

GET api/stock/reserva/aspen/{codigo}

requires authentication

Example request:
curl --request GET \
    --get "https://api.demasled.com/api/stock/reserva/aspen/sunt" \
    --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/sunt"
);

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"
}
 

Request      

GET api/stock/reserva/aspen/{codigo}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

codigo   string   

Example: sunt