NAV
bash javascript php

Info

Welcome to the generated API reference. Get Postman Collection

Orders

Esta operación permite crear una orden de envío. En el dominio debes incluir el subdominio de la empresa, por ejemplo, si la empresa es testaccount, el dominio sería https://testaccount.sistrack.net.

api/order/create


Requires authentication

Example request:

curl -X POST \
    "https://testaccount.sistrack.net/api/order/create" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"sender_id":5,"recipient_id":10,"description":"Batch of books","weight":5,"price_per_weight":1000,"declared_value":5000,"observations":"Handle with care"}'
const url = new URL(
    "https://testaccount.sistrack.net/api/order/create"
);

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

let body = {
    "sender_id": 5,
    "recipient_id": 10,
    "description": "Batch of books",
    "weight": 5,
    "price_per_weight": 1000,
    "declared_value": 5000,
    "observations": "Handle with care"
}

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

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://testaccount.sistrack.net/api/order/create',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {token}',
        ],
        'json' => [
            'sender_id' => 5,
            'recipient_id' => 10,
            'description' => 'Batch of books',
            'weight' => 5.0,
            'price_per_weight' => 1000.0,
            'declared_value' => 5000.0,
            'observations' => 'Handle with care',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/order/create

Body Parameters

Parameter Type Status Description
sender_id integer required Sender id.
recipient_id integer required Recipient id.
description string required The description of the shipping.
weight number required How much the shipping weights
price_per_weight number required How much per it cost per weight to transport.
declared_value number required Declared value of the item.
observations string required Additional information.

api/order/{id}


Requires authentication

Example request:

curl -X GET \
    -G "https://testaccount.sistrack.net/api/order/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://testaccount.sistrack.net/api/order/1"
);

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

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://testaccount.sistrack.net/api/order/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "id": "61",
    "order_id": "1232",
    "sender": "Matias Bret",
    "sender_phone": "+56 953476669",
    "recipient": "Marta Bret",
    "recipient_phone": "+34613959577",
    "recipient_address": "Travessera Camacho, 694, 8º A, 73389, Los Paz,85º D,del Mirador,Los Nieto Baja,Palencia",
    "description": "Libros",
    "weight": "10.00 kg",
    "price_per_kg": "500.00",
    "tax": "19",
    "additional_cost": "{Estacionamiento:900,Servicio especial:800}",
    "price": 7650,
    "payment_status": "Paid",
    "payment_type": "TDC",
    "observations": "Handle with care",
    "created_at": "2021-03-09T12:25:56.000000Z",
    "updated_at": "2021-03-09T12:40:10.000000Z"
}

HTTP Request

GET api/order/{id}

Recipients

Endpoint for creating recipients

api/recipient/create


Requires authentication

Example request:

curl -X POST \
    "https://testaccount.sistrack.net/api/recipient/create" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"name":"Luis Mata","telephone":"+56954235443","email":"[email protected]","id_number":"14345432","address_line_1":"La capitania 10","address_line_2":"office 13","suburb":"Las Condes","city":"Santiago","state":"RM","postal_code":"10304","country":"CL"}'
const url = new URL(
    "https://testaccount.sistrack.net/api/recipient/create"
);

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

let body = {
    "name": "Luis Mata",
    "telephone": "+56954235443",
    "email": "[email protected]",
    "id_number": "14345432",
    "address_line_1": "La capitania 10",
    "address_line_2": "office 13",
    "suburb": "Las Condes",
    "city": "Santiago",
    "state": "RM",
    "postal_code": "10304",
    "country": "CL"
}

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

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://testaccount.sistrack.net/api/recipient/create',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {token}',
        ],
        'json' => [
            'name' => 'Luis Mata',
            'telephone' => '+56954235443',
            'email' => '[email protected]',
            'id_number' => '14345432',
            'address_line_1' => 'La capitania 10',
            'address_line_2' => 'office 13',
            'suburb' => 'Las Condes',
            'city' => 'Santiago',
            'state' => 'RM',
            'postal_code' => '10304',
            'country' => 'CL',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/recipient/create

Body Parameters

Parameter Type Status Description
name string required Full name of recipient.
telephone string required Phone with international code.
email email required Phone with international code.
id_number string required Recipient national id.
address_line_1 string required Main shipping address.
address_line_2 string required Second shipping address.
suburb string required Address Suburb.
city string required Address City.
state string required Address State.
postal_code string required Address postal code.
country string required ISO 3166 Country code.

Senders

Endpoint for creating senders

api/sender/create


Requires authentication

Example request:

curl -X POST \
    "https://testaccount.sistrack.net/api/sender/create" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"name":"Luis Mata","telephone":"+56954235443","email":"[email protected]","id_number":"14345432","address_line_1_order":"La capitania 10","address_line_2_order":"office 13","suburb_order":"Las Condes","city_order":"Santiago","state_order":"RM","postal_code_order":"10304","country_order":"CL"}'
const url = new URL(
    "https://testaccount.sistrack.net/api/sender/create"
);

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

let body = {
    "name": "Luis Mata",
    "telephone": "+56954235443",
    "email": "[email protected]",
    "id_number": "14345432",
    "address_line_1_order": "La capitania 10",
    "address_line_2_order": "office 13",
    "suburb_order": "Las Condes",
    "city_order": "Santiago",
    "state_order": "RM",
    "postal_code_order": "10304",
    "country_order": "CL"
}

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

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://testaccount.sistrack.net/api/sender/create',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {token}',
        ],
        'json' => [
            'name' => 'Luis Mata',
            'telephone' => '+56954235443',
            'email' => '[email protected]',
            'id_number' => '14345432',
            'address_line_1_order' => 'La capitania 10',
            'address_line_2_order' => 'office 13',
            'suburb_order' => 'Las Condes',
            'city_order' => 'Santiago',
            'state_order' => 'RM',
            'postal_code_order' => '10304',
            'country_order' => 'CL',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST api/sender/create

Body Parameters

Parameter Type Status Description
name string required Full name of recipient.
telephone string required Phone with international code.
email email required Phone with international code.
id_number string required Recipient national id.
address_line_1_order string required Main shipping address.
address_line_2_order string required Second shipping address.
suburb_order string required Address Suburb.
city_order string required Address City.
state_order string required Address State.
postal_code_order string required Address postal code.
country_order string required ISO 3166 Country code.

general

Handle the incoming request.

Example request:

curl -X PUT \
    "https://testaccount.sistrack.net/api/order/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://testaccount.sistrack.net/api/order/1"
);

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

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://testaccount.sistrack.net/api/order/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT api/order/{id}

api/collect/{id}

Example request:

curl -X PUT \
    "https://testaccount.sistrack.net/api/collect/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://testaccount.sistrack.net/api/collect/1"
);

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

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://testaccount.sistrack.net/api/collect/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT api/collect/{id}

Handle the incoming request.

Example request:

curl -X GET \
    -G "https://testaccount.sistrack.net/api/user/collects/" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://testaccount.sistrack.net/api/user/collects/"
);

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

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://testaccount.sistrack.net/api/user/collects/',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET api/user/collects/{q?}