NAV
bash javascript php python

Overview

Welcome to the BIG SMART API documentation a series of notes and instructions that outline the BIG SMART API and let you tap into BIG SMART platform features as you integrate them with your resources.

The BIG SMART API exposes business functionalities to help developers build integrations with BIG SMART. It provides a simple, predictable, standardised, resource-oriented, RESTful interface with JSON-formatted responses that make it easy to search, filter and use our data.

In order to help developers consume our services we develop language bindings in Shell, Javascript, Php, and Python. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

BIG SMART API base url currently is https://api.bigsmart.mx/ for all resources.

Authentication

APIs for user authentication

Login

Once you have had registered your account, you will be able to get YOUR_AUTH_TOKEN doing a login request through the platform.

Example request:

curl -X POST \
    "https://api.bigsmart.mx/api/auth/login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"email":"[email protected]","password":"YXyu2T~,-N(dtS~T"}'
const url = new URL(
    "https://api.bigsmart.mx/api/auth/login"
);

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

let body = {
    "email": "[email protected]",
    "password": "YXyu2T~,-N(dtS~T"
}

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://api.bigsmart.mx/api/auth/login',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
            'password' => 'YXyu2T~,-N(dtS~T',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.bigsmart.mx/api/auth/login'
payload = {
    "email": "[email protected]",
    "password": "YXyu2T~,-N(dtS~T"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjJlODhmMjQ5MDlmMzYwM2E5NzI4ZWQ4YzhjN2MyZGY1OWZmZmYwNjAyMjc4MzcyNDRjMjg3YjBlYWYzN2M1MjkwMjUxYWI5Y2FiZTI1MGM5In0.eyJhdWQiOiIxIiwianRpIjoiMmU4OGYyNDkwOWYzNjAzYTk3MjhlZDhjOGM3YzJkZjU5ZmZmZjA2MDIyNzgzNzI0NGMyODdiMGVhZjM3YzUyOTAyNTFhYjljYWJlMjUwYzkiLCJpYXQiOjE1ODAyMzk4MDIsIm5iZiI6MTU4MDIzOTgwMiwiZXhwIjoxNjExODYyMjAyLCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.rFVY03HHi9kpqByHILCLUWiJAjn6kw8xzNKvKpTaOOiI67LTNBfgoDbUMfsND_nF7dJHlMTkszZcubz6dGCabexCkBtnEBMqaFxrWZDK1sqC8tJTA6Guqk_Eownh3iEyZTeLH4ZZCaW7DD2Adn5guqBcA98Wx1i2H184hOAU4HJFk47JPq8-4UtWjw6ioyY9qrACmMMM8xoll1PhouR0mpG9JYJh7FtGuWDkcEA9j5sAHGeDM5HnyQUEnArnXE-Xo2DwX7rDVSBkZYuNBj3tpFcOXSOuzwOEluMX1JYkLgSOYnEHYYdC29qJOXqtE5gUstfy7isk82bsOu8TFkoum6xcb0a9jI6oHWSQ8WDn_DZZwteDbmh8tXQUesSEPsBZzisXdLknRe_b5WOZcARMKDz9PDP-jzl5KqpmZXKXbubDITJ7Yt3DWzYrHHYp41GlDpFfrQW_4_MN6ZVhvAvbnawuAY-CsSwogrVUEmXpL_fZwBCTOeAOVDSQ_X4F_7EgQVaiDhjV1wcV_vPu4TDeQthUVP-7aJ25efyBy-fyZKA965axuuPmmGnOjZfq4qoP85YblKJar7EUFbd5xvlT-LjszbbGxPNImbqe-SLnaWWb7pgcleqI14mQRK_3p-MjvU9REX5cEeBd1V1b1i47EOKF3gY81onHhVqkW0VHsbY",
    "token_type": "Bearer",
    "expires_at": "2021-01-28 13:30:02"
}

HTTP Request

POST api/auth/login

Body Parameters

Parameter Type Status Description
email string required Account's email
password string required Account's password

Order management

APIs for managing orders

Create an order


Requires authentication

Example request:

curl -X POST \
    "https://api.bigsmart.mx/api/orders-external" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    -d '{"carrier":"BIG","primary_client":"Palacio de Hierro","shipping_method":"car","shipping_option":"next_day","customer_first_name":"Adam","customer_last_name":"Quest","customer_mobile_number":"+525512345678","customer_email":"[email protected]","customer_street":"Orizaba","customer_settlement":"Napoles","customer_external_number":"4155","customer_postcode":"48548","customer_delivery_start_date":"2020-01-10","customer_delivery_end_date":"2020-01-11","purchase_order_number":"8348454192","cod_amount":845,"weight":3.45,"volumetric_dimension":27.12,"cargo_manifest":"CDMX-CLU1"}'
const url = new URL(
    "https://api.bigsmart.mx/api/orders-external"
);

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

let body = {
    "carrier": "BIG",
    "primary_client": "Palacio de Hierro",
    "shipping_method": "car",
    "shipping_option": "next_day",
    "customer_first_name": "Adam",
    "customer_last_name": "Quest",
    "customer_mobile_number": "+525512345678",
    "customer_email": "[email protected]",
    "customer_street": "Orizaba",
    "customer_settlement": "Napoles",
    "customer_external_number": "4155",
    "customer_postcode": "48548",
    "customer_delivery_start_date": "2020-01-10",
    "customer_delivery_end_date": "2020-01-11",
    "purchase_order_number": "8348454192",
    "cod_amount": 845,
    "weight": 3.45,
    "volumetric_dimension": 27.12,
    "cargo_manifest": "CDMX-CLU1"
}

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://api.bigsmart.mx/api/orders-external',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        ],
        'json' => [
            'carrier' => 'BIG',
            'primary_client' => 'Palacio de Hierro',
            'shipping_method' => 'car',
            'shipping_option' => 'next_day',
            'customer_first_name' => 'Adam',
            'customer_last_name' => 'Quest',
            'customer_mobile_number' => '+525512345678',
            'customer_email' => '[email protected]',
            'customer_street' => 'Orizaba',
            'customer_settlement' => 'Napoles',
            'customer_external_number' => '4155',
            'customer_postcode' => '48548',
            'customer_delivery_start_date' => '2020-01-10',
            'customer_delivery_end_date' => '2020-01-11',
            'purchase_order_number' => '8348454192',
            'cod_amount' => 845,
            'weight' => 3.45,
            'volumetric_dimension' => 27.12,
            'cargo_manifest' => 'CDMX-CLU1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.bigsmart.mx/api/orders-external'
payload = {
    "carrier": "BIG",
    "primary_client": "Palacio de Hierro",
    "shipping_method": "car",
    "shipping_option": "next_day",
    "customer_first_name": "Adam",
    "customer_last_name": "Quest",
    "customer_mobile_number": "+525512345678",
    "customer_email": "[email protected]",
    "customer_street": "Orizaba",
    "customer_settlement": "Napoles",
    "customer_external_number": "4155",
    "customer_postcode": "48548",
    "customer_delivery_start_date": "2020-01-10",
    "customer_delivery_end_date": "2020-01-11",
    "purchase_order_number": "8348454192",
    "cod_amount": 845,
    "weight": 3.45,
    "volumetric_dimension": 27.12,
    "cargo_manifest": "CDMX-CLU1"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {YOUR_AUTH_TOKEN}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "data": {
        "id": null,
        "carrier_id": 1,
        "primary_client_id": 1,
        "shipping_method_id": 6,
        "shipping_option_id": 7,
        "current_facility_id": null,
        "current_status_code_id": null,
        "last_mile_facility_id": null,
        "last_mile_cluster_id": null,
        "customer_first_name": "Cletus",
        "customer_last_name": "Olson",
        "customer_phone_number": null,
        "customer_mobile_number": "+14145484817",
        "customer_email": "[email protected]",
        "customer_street": "Magnolia Park",
        "customer_settlement": "Constantin Motorway",
        "customer_external_number": "211",
        "customer_internal_number": null,
        "customer_postcode_id": null,
        "customer_postcode": null,
        "customer_municipality": "stad",
        "customer_city": "Anibalchester",
        "customer_country": "Bosnia and Herzegovina",
        "customer_state": "South Carolina",
        "customer_address_reference": null,
        "latitude": -66.035719,
        "longitude": -152.791704,
        "tracking_number": "bcac71e5-8445-3582-b9a2-b9b821dfc06a",
        "alternative_tracking_number": null,
        "purchase_order_number": 1,
        "cod_amount": null,
        "weight": 44.67,
        "volumetric_dimension": 15.87,
        "estimated_delivery_date": "2011-01-04",
        "delivery_deadline_date": null,
        "customer_delivery_start_date": null,
        "customer_delivery_end_date": null,
        "cargo_manifest_id": null,
        "delivery_range": null,
        "created_at": null,
        "updated_at": null,
        "deleted_at": null,
        "created_by": null,
        "updated_by": null,
        "deleted_by": null
    }
}

HTTP Request

POST api/orders-external

Body Parameters

Parameter Type Status Description
carrier string required Enity name who will deliver the order
primary_client string required Entity name who register the order
shipping_method string required Method name which will be used to deliver the order
shipping_option string required Option name which will be used to identify the period of time that deliver will long
customer_first_name string required Customer first name
customer_last_name string required Customer last name
customer_mobile_number string required Customer mobile number
customer_email string required Customer email
customer_street string required Customer street name location
customer_settlement string optional Customer settlement name location
customer_external_number string required Customer external number location
customer_postcode string required Customer postcode location
customer_delivery_start_date datetime required Customer delivery start date which will be estimated according to the time period of the shipping option
customer_delivery_end_date datetime optional Customer delivery end date which will be estimated according to the time period of the shipping option
purchase_order_number string required Purchase order number/sequence
cod_amount integer optional Amount of money package recipient have to deliver
weight float optional Package weight
volumetric_dimension float optional Package volumetric dimensions
cargo_manifest string optional Cargo manifest name in case the order is part of one