NAV

bash javascript

Introduction

All API URLs listed in this documentation are relative to https://app.snapstics.com/. For example, the /products/ resource is reachable at https://app.snapstics.com/api/v1/snapstics/products/.

Request & Response Data

Request data is passed to API by POSTing JSON objects with appropriate key/value-pairs to the respective resource. The documentation for each API resource contains more details on the values accepted by a given resource.

Response data also formatted as JSON object.

The API is built around REST principles. Use POST requests to create objects, GET requests to retrieve objects, PUT requests to update objects, and DELETE requests to delete objects.

Errors

Occasionally you might encounter errors when accessing the REST API. There are four possible types:

Error Code Error Type
400 Bad Request Invalid request, e.g. using an unsupported HTTP method
401 Unauthorized Authentication or permission error, e.g. incorrect API Token
404 Not Found Requests to resources that don’t exist or are missing
415 Unsupported Media Type Payload format is in an unsupported format.
500 Internal Server Error Server error

Authentication

The API requires Snapstics's token HTTP Authentication with your private token. Please put Authorization: <API_TOKEN> in your header. You can generate your token from snapstics's profile page after login.

Products

Create Product/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/products" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d [
    {
        "name": "Iphone 7 32gb Rose Gold",
        "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
        "sku": "01901980681",
        "product_type": "Each",
        "length": "5.44",
        "width": "2.64",
        "height": "0.28",
        "weight": "0.30",
        "is_fragile": "0",
        "is_liquid": "0",
        "is_battery": "1",
        "track_expire_date": "0"
    },
    {
        "name": "Samsung Galaxy S8 64GB Midnight Black",
        "description": "",
        "sku": "57890080",
        "product_type": "Each",
        "length": "5.86",
        "width": "2.68",
        "height": "0.31",
        "weight": "0.34",
        "is_fragile": "0",
        "is_liquid": "0",
        "is_battery": "1",
        "track_expire_date": "0"
    },
    {
        "name": "Pepsi",
        "description": "Carbonated Water, High Fructose Corn Syrup, Caramel Color, Sugar.",
        "sku": "012000005",
        "product_type": "Pallet",
        "length": "48",
        "width": "48",
        "height": "48",
        "weight": "48",
        "is_fragile": "0",
        "is_liquid": "1",
        "is_battery": "0",
        "track_expire_date": "1"
    }
]
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/products",
    "method": "POST",
    "data": [{
        "name": "Iphone 7 32gb Rose Gold",
        "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
        "sku": "01901980681",
        "product_type": "Each",
        "length": "5.44",
        "width": "2.64",
        "height": "0.28",
        "weight": "0.30",
        "is_fragile": "0",
        "is_liquid": "0",
        "is_battery": "1",
        "track_expire_date": "0"
    },
    {
        "name": "Samsung Galaxy S8 64GB Midnight Black",
        "description": "",
        "sku": "57890080",
        "product_type": "Each",
        "length": "5.86",
        "width": "2.68",
        "height": "0.31",
        "weight": "0.34",
        "is_fragile": "0",
        "is_liquid": "0",
        "is_battery": "1",
        "track_expire_date": "0"
    },
    {
        "name": "Pepsi",
        "description": "Carbonated Water, High Fructose Corn Syrup, Caramel Color, Sugar.",
        "sku": "012000005",
        "product_type": "Pallet",
        "length": "48",
        "width": "48",
        "height": "48",
        "weight": "48",
        "is_fragile": "0",
        "is_liquid": "1",
        "is_battery": "0",
        "track_expire_date": "1"
    }],
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "id": 82,
        "name": "Iphone 7 32gb Rose Gold",
        "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
        "sku": "01901980681",
        "product_type": "Each",
        "length": "5.44",
        "width": "2.64",
        "height": "0.28",
        "weight": "0.30",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:44:51",
        "updated_at": "2017-09-08 08:44:51"
    },
    {
        "id": 83,
        "name": "Samsung Galaxy S8 64GB Midnight Black",
        "description": "",
        "sku": "57890080",
        "product_type": "Each",
        "length": "5.86",
        "width": "2.68",
        "height": "0.31",
        "weight": "0.34",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:51:16",
        "updated_at": "2017-09-08 08:51:16"
    },
    {
        "id": 84,
        "name": "Pepsi",
        "description": "Carbonated Water, High Fructose Corn Syrup, Caramel Color, Sugar.",
        "sku": "012000005",
        "product_type": "Pallet",
        "length": "48.00",
        "width": "48.00",
        "height": "48.00",
        "weight": "48.00",
        "is_fragile": 0,
        "is_liquid": 1,
        "is_battery": 0,
        "track_expire_date": 1,
        "created_at": "2017-09-08 08:51:16",
        "updated_at": "2017-09-08 08:51:16"
    }
]

HTTP Request

POST api/v1/snapstics/products

Parameters

Parameter Type Status Description
name string required Maximum: 255
description string optional Maximum: 255
sku numeric required Maximum: 13
product_type string required Pallet or Each
length numeric required Minimum: 0.01 Maximum: 99999999.99
width numeric required Minimum: 0.01 Maximum: 99999999.99
height numeric required Minimum: 0.01 Maximum: 99999999.99
weight numeric required Minimum: 0.01 Maximum: 99999999.99
is_fragile boolean optional 0 or 1(By default it is 0)
is_liquid boolean optional 0 or 1(By default it is 0)
is_battery boolean optional 0 or 1(By default it is 0)
track_expire_date boolean optional 0 or 1(By default it is 0)

Notes :

1. For boolean parameters system is considering 1 as YES and 0 as NO.

2. We are accepting length, width and height in inches, and weight in Pounds.

List All Products

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/products" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/products",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "id": 82,
        "name": "Iphone 7 32gb Rose Gold",
        "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
        "sku": "01901980681",
        "product_type": "Each",
        "length": "5.44",
        "width": "2.64",
        "height": "0.28",
        "weight": "0.30",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:44:51",
        "updated_at": "2017-09-08 08:44:51"
    },
    {
        "id": 83,
        "name": "Samsung Galaxy S8 64GB Midnight Black",
        "description": "",
        "sku": "57890080",
        "product_type": "Each",
        "length": "5.86",
        "width": "2.68",
        "height": "0.31",
        "weight": "0.34",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:51:16",
        "updated_at": "2017-09-08 08:51:16"
    },
    {
        "id": 84,
        "name": "Pepsi",
        "description": "Carbonated Water, High Fructose Corn Syrup, Caramel Color, Sugar.",
        "sku": "012000005",
        "product_type": "Pallet",
        "length": "48.00",
        "width": "48.00",
        "height": "48.00",
        "weight": "48.00",
        "is_fragile": 0,
        "is_liquid": 1,
        "is_battery": 0,
        "track_expire_date": 1,
        "created_at": "2017-09-08 08:51:16",
        "updated_at": "2017-09-08 08:51:16"
    },
    {
        "id": 85,
        "name": "Lays Potato Chips - American Style Cream and Onion",
        "description": "",
        "sku": "16450052",
        "product_type": "Pallet",
        "length": "50.00",
        "width": "50.00",
        "height": "50.00",
        "weight": "50.00",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 0,
        "track_expire_date": 1,
        "created_at": "2017-09-08 08:53:25",
        "updated_at": "2017-09-08 08:53:25"
    }
]

HTTP Request

GET api/v1/snapstics/products

List Specific Product/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/products/ids=82,83" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/products/ids=82,83",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "id": 82,
        "name": "Iphone 7 32gb Rose Gold",
        "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
        "sku": "01901980681",
        "product_type": "Each",
        "length": "5.44",
        "width": "2.64",
        "height": "0.28",
        "weight": "0.30",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:44:51",
        "updated_at": "2017-09-08 08:44:51"
    },
    {
        "id": 83,
        "name": "Samsung Galaxy S8 64GB Midnight Black",
        "description": "",
        "sku": "57890080",
        "product_type": "Each",
        "length": "5.86",
        "width": "2.68",
        "height": "0.31",
        "weight": "0.34",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:51:16",
        "updated_at": "2017-09-08 08:51:16"
    }
]

HTTP Request

GET api/v1/snapstics/products/{ids?}

Notes :

1. {ids?} is a product_id and you can also pass multiple product_id with comma-separated.

Update Product

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/products/82" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d {
        "name": "Iphone 7 32gb Silver",
        "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
        "sku": "01901980681",
        "length": "5.44",
        "width": "2.64",
        "height": "0.28",
        "weight": "0.30",
        "is_fragile": "0",
        "is_liquid": "0",
        "is_battery": "1",
        "track_expire_date": "0"
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/products/82",
    "method": "PUT",
    "data": {
        "name": "Iphone 7 32gb Silver",
        "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
        "sku": "01901980681",
        "length": "5.44",
        "width": "2.64",
        "height": "0.28",
        "weight": "0.30",
        "is_fragile": "0",
        "is_liquid": "0",
        "is_battery": "1",
        "track_expire_date": "0"
    },
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "id": 82,
    "name": "Iphone 7 32gb Silver",
    "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
    "sku": "01901980681",
    "product_type": "Each",
    "length": "5.44",
    "width": "2.64",
    "height": "0.28",
    "weight": "0.30",
    "is_fragile": 0,
    "is_liquid": 0,
    "is_battery": 1,
    "track_expire_date": 0,
    "created_at": "2017-09-08 08:44:51",
    "updated_at": "2017-09-08 08:59:32"
}

HTTP Request

PUT api/v1/snapstics/products/{id}

Notes :

1. {id} is a product_id.

Parameters

Parameter Type Status Description
name string optional Maximum: 255
description string optional Maximum: 255
sku numeric optional Maximum: 13
length numeric optional Minimum: 0.01 Maximum: 99999999.99
width numeric optional Minimum: 0.01 Maximum: 99999999.99
height numeric optional Minimum: 0.01 Maximum: 99999999.99
weight numeric optional Minimum: 0.01 Maximum: 99999999.99
is_fragile boolean optional 0 or 1(By default it is 0)
is_liquid boolean optional 0 or 1(By default it is 0)
is_battery boolean optional 0 or 1(By default it is 0)
track_expire_date boolean optional 0 or 1(By default it is 0)

Notes :

1. For boolean parameters system is considering 1 as YES and 0 as NO.

2. We are accepting length, width and height in inches, and weight in Pounds.

Deactivate Product/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/products/ids=82,83,84" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/products/ids=82,83,84",
    "method": "DELETE",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "Success": {
        "message": "Products are successfully deactivated.",
        "code": 200
    }
}

HTTP Request

DELETE api/v1/snapstics/products/{ids?}

Notes :

1. {ids?} is a product_id and you can also pass multiple product_id with comma-separated.

List All Deactivated Products

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/products/deactivate-list" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/products/deactivate-list",
    "method": "POST",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "id": 82,
        "name": "Iphone 7 32gb Silver",
        "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
        "sku": "01901980681",
        "product_type": "Each",
        "length": "5.44",
        "width": "2.64",
        "height": "0.28",
        "weight": "0.30",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:44:51",
        "updated_at": "2017-09-08 09:02:31"
    },
    {
        "id": 83,
        "name": "Samsung Galaxy S8 64GB Midnight Black",
        "description": "",
        "sku": "57890080",
        "product_type": "Each",
        "length": "5.86",
        "width": "2.68",
        "height": "0.31",
        "weight": "0.34",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:51:16",
        "updated_at": "2017-09-08 09:02:06"
    },
    {
        "id": 84,
        "name": "Pepsi",
        "description": "Carbonated Water, High Fructose Corn Syrup, Caramel Color, Sugar.",
        "sku": "012000005",
        "product_type": "Pallet",
        "length": "48.00",
        "width": "48.00",
        "height": "48.00",
        "weight": "48.00",
        "is_fragile": 0,
        "is_liquid": 1,
        "is_battery": 0,
        "track_expire_date": 1,
        "created_at": "2017-09-08 08:51:16",
        "updated_at": "2017-09-08 09:02:23"
    }
]

HTTP Request

POST api/v1/snapstics/products/deactivate-list

List Specific Deactivated Product/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/products/deactivate-list/ids=82,83" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/products/deactivate-list/ids=82,83",
    "method": "POST",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "id": 82,
        "name": "Iphone 7 32gb Silver",
        "description": "The Apple iPhone 7 is powered by quad-core Apple A10 Fusion processor and it comes with 2GB of RAM.",
        "sku": "01901980681",
        "product_type": "Each",
        "length": "5.44",
        "width": "2.64",
        "height": "0.28",
        "weight": "0.30",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:44:51",
        "updated_at": "2017-09-08 09:02:31"
    },
    {
        "id": 83,
        "name": "Samsung Galaxy S8 64GB Midnight Black",
        "description": "",
        "sku": "57890080",
        "product_type": "Each",
        "length": "5.86",
        "width": "2.68",
        "height": "0.31",
        "weight": "0.34",
        "is_fragile": 0,
        "is_liquid": 0,
        "is_battery": 1,
        "track_expire_date": 0,
        "created_at": "2017-09-08 08:51:16",
        "updated_at": "2017-09-08 09:02:06"
    }
]

HTTP Request

POST api/v1/snapstics/products/deactivate-list/{ids?}

Notes :

1. {ids?} is a product_id and you can also pass multiple product_id with comma-separated.

Activate Product/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/products/activate/ids=82,83,84" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/products/activate/ids=82,83,84",
    "method": "POST",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "Success": {
        "message": "Products are successfully activated.",
        "code": 200
    }
}

HTTP Request

POST api/v1/snapstics/products/activate/{ids?}

Notes :

1. {ids?} is a product_id and you can also pass multiple product_id with comma-separated.

ASN

Create ASN Without Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d {
  "expected_arrival_date": "09/07/2017",
  "carrier_name": "Advance Ship Notice Report by Bill of Lading No. Showing Label #290",
  "incoming_quantity_type": "Box",
  "incoming_quantity": "2",
  "lines": []
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns",
    "method": "POST",
    "data": {
        "expected_arrival_date": "09/07/2017",
        "carrier_name": "Advance Ship Notice Report by Bill of Lading No. Showing Label #290",
        "incoming_quantity_type": "Box",
        "incoming_quantity": "2",
        "lines": []
    },
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "id": 15,
    "expected_arrival_date": "09/07/2017",
    "carrier_name": "Advance Ship Notice Report by Bill of Lading No. Showing Label #290",
    "incoming_quantity_type": "Box",
    "incoming_quantity": 2,
    "created_at": "2017-09-07 09:25:11",
    "updated_at": "2017-09-07 09:25:11",
    "lines": []
}

HTTP Request

POST api/v1/snapstics/asns

Parameters

Parameter Type Status Description
carrier_name string required Minimum: 1 Maximum: 255
incoming_quantity integer required Between: 1 and 1000
incoming_quantity_type string required Pallet or Box
expected_arrival_date date required Date format: m/d/Y
lines array required Blank array.

Create ASN With Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d {
    "expected_arrival_date": "09/07/2017",
    "carrier_name": "PPP LET #111227",
    "incoming_quantity_type": "Pallet",
    "incoming_quantity": "2",
    "lines": [
      {
        "product_id": "13",
        "quantity": "2"
      },
      {
        "product_id": "14",
        "quantity": "2",
        "quantity_in_master": "3"
      }
    ]
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns",
    "method": "POST",
    "data": {
        "expected_arrival_date": "09/07/2017",
        "carrier_name": "PPP LET #111227",
        "incoming_quantity_type": "Pallet",
        "incoming_quantity": "2",
        "lines": [{
            "product_id": "13",
            "quantity": "2"
        }, {
            "product_id": "14",
            "quantity": "2",
            "quantity_in_master": "3"
        }]
    },
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "id": 16,
    "expected_arrival_date": "09/07/2017",
    "carrier_name": "PPP LET #111227",
    "incoming_quantity_type": "Pallet",
    "incoming_quantity": 2,
    "created_at": "2017-09-07 09:39:38",
    "updated_at": "2017-09-07 09:39:38",
    "lines": [
        {
            "id": 80,
            "asn_id": 16,
            "product_id": 13,
            "quantity": 1,
            "quantity_in_master": 0,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        },
        {
            "id": 81,
            "asn_id": 16,
            "product_id": 13,
            "quantity": 1,
            "quantity_in_master": 0,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        },
        {
            "id": 82,
            "asn_id": 16,
            "product_id": 14,
            "quantity": 1,
            "quantity_in_master": 3,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        },
        {
            "id": 83,
            "asn_id": 16,
            "product_id": 14,
            "quantity": 1,
            "quantity_in_master": 3,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        }
    ]
}

HTTP Request

POST api/v1/snapstics/asns

Parameters

Parameter Type Status Description
carrier_name string required Minimum: 1 Maximum: 255
incoming_quantity integer required Between: 1 and 1000
incoming_quantity_type string required Pallet or Box
expected_arrival_date date required Date format: m/d/Y
lines array required Line/s array.

Parameters for line/s array

Parameter Type Status Description
product_id integer required id of product which you want to add in asn
quantity integer required Between: 1 and 1000
quantity_in_master integer required if product type "Each" Between: 1 and 2147483646

List All ASN

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "id": 15,
        "expected_arrival_date": "09/07/2017",
        "carrier_name": "Advance Ship Notice Report by Bill of Lading No. Showing Label #290",
        "incoming_quantity_type": "Box",
        "incoming_quantity": 2,
        "created_at": "2017-09-07 09:25:11",
        "updated_at": "2017-09-07 09:25:11",
        "lines": []
    },
    {
        "id": 16,
        "expected_arrival_date": "09/07/2017",
        "carrier_name": "PPP LET #111227",
        "incoming_quantity_type": "Pallet",
        "incoming_quantity": 2,
        "created_at": "2017-09-07 09:39:38",
        "updated_at": "2017-09-07 09:39:38",
        "lines": [
          {
                "id": 80,
                "asn_id": 16,
                "product_id": 13,
                "quantity": 1,
                "quantity_in_master": 0,
                "created_at": "2017-09-07 09:39:38",
                "updated_at": "2017-09-07 09:39:38"
          },
          {
                "id": 81,
                "asn_id": 16,
                "product_id": 13,
                "quantity": 1,
                "quantity_in_master": 0,
                "created_at": "2017-09-07 09:39:38",
                "updated_at": "2017-09-07 09:39:38"
          },
          {
                "id": 82,
                "asn_id": 16,
                "product_id": 14,
                "quantity": 1,
                "quantity_in_master": 3,
                "created_at": "2017-09-07 09:39:38",
                "updated_at": "2017-09-07 09:39:38"
          },
          {
                "id": 83,
                "asn_id": 16,
                "product_id": 14,
                "quantity": 1,
                "quantity_in_master": 3,
                "created_at": "2017-09-07 09:39:38",
                "updated_at": "2017-09-07 09:39:38"
          }
        ]
    },
    {
        "id": 17,
        "expected_arrival_date": "09/08/2017",
        "carrier_name": "Loacher mocha chocolate bar 10* 300 grams and mix cookies 20*500grams",
        "incoming_quantity_type": "Pallet",
        "incoming_quantity": 2,
        "created_at": "2017-09-07 09:43:14",
        "updated_at": "2017-09-07 09:43:14",
        "lines": [
          {
                "id": 84,
                "asn_id": 17,
                "product_id": 13,
                "quantity": 1,
                "quantity_in_master": 0,
                "created_at": "2017-09-07 09:43:14",
                "updated_at": "2017-09-07 09:43:14"
          },
          {
                "id": 85,
                "asn_id": 17,
                "product_id": 13,
                "quantity": 1,
                "quantity_in_master": 0,
                "created_at": "2017-09-07 09:43:14",
                "updated_at": "2017-09-07 09:43:14"
          }
        ]
    },
    {
        "id": 18,
        "expected_arrival_date": "09/09/2017",
        "carrier_name": "#P00999S",
        "incoming_quantity_type": "Box",
        "incoming_quantity": 2,
        "created_at": "2017-09-07 09:44:07",
        "updated_at": "2017-09-07 09:44:07",
        "lines": [
          {
                "id": 86,
                "asn_id": 18,
                "product_id": 14,
                "quantity": 1,
                "quantity_in_master": 10,
                "created_at": "2017-09-07 09:44:07",
                "updated_at": "2017-09-07 09:44:07"
          },
          {
                "id": 87,
                "asn_id": 18,
                "product_id": 14,
                "quantity": 1,
                "quantity_in_master": 10,
                "created_at": "2017-09-07 09:44:07",
                "updated_at": "2017-09-07 09:44:07"
          }
        ]
    },
    {
        "id": 19,
        "expected_arrival_date": "09/07/2017",
        "carrier_name": "Advance Ship Notice Report by Bill of Lading No. Showing Label #2222",
        "incoming_quantity_type": "Pallet",
        "incoming_quantity": 4,
        "created_at": "2017-09-07 09:57:23",
        "updated_at": "2017-09-07 09:57:23",
        "lines": []
    }
]

HTTP Request

GET api/v1/snapstics/asns

List Specific ASN/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns/ids=15,16" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns/ids=15,16",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "id": 15,
        "expected_arrival_date": "09/07/2017",
        "carrier_name": "Advance Ship Notice Report by Bill of Lading No. Showing Label #290",
        "incoming_quantity_type": "Box",
        "incoming_quantity": 2,
        "created_at": "2017-09-07 09:25:11",
        "updated_at": "2017-09-07 09:25:11",
        "lines": []
    },
    {
        "id": 16,
        "expected_arrival_date": "09/07/2017",
        "carrier_name": "PPP LET #111227",
        "incoming_quantity_type": "Pallet",
        "incoming_quantity": 2,
        "created_at": "2017-09-07 09:39:38",
        "updated_at": "2017-09-07 09:39:38",
        "lines": [
            {
                "id": 80,
                "asn_id": 16,
                "product_id": 13,
                "quantity": 1,
                "quantity_in_master": 0,
                "created_at": "2017-09-07 09:39:38",
                "updated_at": "2017-09-07 09:39:38"
            },
            {
                "id": 81,
                "asn_id": 16,
                "product_id": 13,
                "quantity": 1,
                "quantity_in_master": 0,
                "created_at": "2017-09-07 09:39:38",
                "updated_at": "2017-09-07 09:39:38"
            },
            {
                "id": 82,
                "asn_id": 16,
                "product_id": 14,
                "quantity": 1,
                "quantity_in_master": 3,
                "created_at": "2017-09-07 09:39:38",
                "updated_at": "2017-09-07 09:39:38"
            },
            {
                "id": 83,
                "asn_id": 16,
                "product_id": 14,
                "quantity": 1,
                "quantity_in_master": 3,
                "created_at": "2017-09-07 09:39:38",
                "updated_at": "2017-09-07 09:39:38"
            }
        ]
    }
]

HTTP Request

GET api/v1/snapstics/asns/{ids?}

Notes :

1. {ids?} is an asn_id and you can also pass multiple asn_id with comma-separated.

Update ASN

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns/18/edit" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d {
  "expected_arrival_date": "09/08/2017",
  "carrier_name": "#P00999S_LPG",
  "incoming_quantity_type": "Pallet",
  "incoming_quantity": "5"
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns/18/edit",
    "method": "PUT",
    "data": {
        "expected_arrival_date": "09/08/2017",
        "carrier_name": "#P00999S_LPG",
        "incoming_quantity_type": "Pallet",
        "incoming_quantity": "5"
    },
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "id": 18,
    "expected_arrival_date": "09/08/2017",
    "carrier_name": "#P00999S_LPG",
    "incoming_quantity_type": "Pallet",
    "incoming_quantity": 5,
    "created_at": "2017-09-07 09:44:07",
    "updated_at": "2017-09-07 09:52:02"
}

HTTP Request

PUT api/v1/snapstics/asns/{id}/edit

Notes :

1. {id} is an asn_id.

Parameters

Parameter Type Status Description
carrier_name string optional Maximum: 255
incoming_quantity integer optional Between: 1 and 1000
incoming_quantity_type string optional Pallet or Box
expected_arrival_date date optional Date format: m/d/Y

Create ASN Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns/19/lines" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d {
  "lines": [
    {
      "product_id": "13",
      "quantity": "2"
    },
    {
      "product_id": "14",
      "quantity": "2",
      "quantity_in_master": "3"
    }
  ]
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns/19/lines",
    "method": "POST",
    "data": {
        "lines": [{
            "product_id": "13",
            "quantity": "2"
        }, {
            "product_id": "14",
            "quantity": "2",
            "quantity_in_master": "3"
        }]
    }
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "lines": [
        {
            "id": 90,
            "asn_id": 19,
            "product_id": 13,
            "quantity": 1,
            "quantity_in_master": 0,
            "created_at": "2017-09-07 09:58:59",
            "updated_at": "2017-09-07 09:58:59"
        },
        {
            "id": 91,
            "asn_id": 19,
            "product_id": 13,
            "quantity": 1,
            "quantity_in_master": 0,
            "created_at": "2017-09-07 09:58:59",
            "updated_at": "2017-09-07 09:58:59"
        },
        {
            "id": 92,
            "asn_id": 19,
            "product_id": 14,
            "quantity": 1,
            "quantity_in_master": 3,
            "created_at": "2017-09-07 09:59:00",
            "updated_at": "2017-09-07 09:59:00"
        },
        {
            "id": 93,
            "asn_id": 19,
            "product_id": 14,
            "quantity": 1,
            "quantity_in_master": 3,
            "created_at": "2017-09-07 09:59:00",
            "updated_at": "2017-09-07 09:59:00"
        }
    ]
}

HTTP Request

POST api/v1/snapstics/asns/{id}/lines

Notes :

1. {id} is an asn_id.

Parameters

Parameter Type Status Description
product_id integer required id of product which you want to add in asn
quantity integer required Between: 1 and 1000
quantity_in_master integer required if product type "Each" Between: 1 and 2147483646

List all ASN Lines

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns/16/lines" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns/16/lines",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "lines": [
        {
            "id": 80,
            "asn_id": 16,
            "product_id": 13,
            "quantity": 1,
            "quantity_in_master": 0,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        },
        {
            "id": 81,
            "asn_id": 16,
            "product_id": 13,
            "quantity": 1,
            "quantity_in_master": 0,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        },
        {
            "id": 82,
            "asn_id": 16,
            "product_id": 14,
            "quantity": 1,
            "quantity_in_master": 3,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        },
        {
            "id": 83,
            "asn_id": 16,
            "product_id": 14,
            "quantity": 1,
            "quantity_in_master": 3,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        }
    ]
}

HTTP Request

GET api/v1/snapstics/asns/{id}/lines

Notes :

1. {id} is an asn_id.

List Specific ASN Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns/16/lines/ids=80,83" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns/16/lines/ids=80,83",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "lines": [
        {
            "id": 80,
            "asn_id": 16,
            "product_id": 13,
            "quantity": 1,
            "quantity_in_master": 0,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        },
        {
            "id": 83,
            "asn_id": 16,
            "product_id": 14,
            "quantity": 1,
            "quantity_in_master": 3,
            "created_at": "2017-09-07 09:39:38",
            "updated_at": "2017-09-07 09:39:38"
        }
    ]
}

HTTP Request

GET api/v1/snapstics/asns/{id}/lines/{ids?}

Notes :

1. {id} is an asn_id.

2. {ids?} is an ASN line/s id and you can also pass multiple ASN line/s id with comma-separated.

Delete All ASN Lines

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns/17/lines" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns/17/lines",
    "method": "DELETE",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "Success": {
        "message": "ASN line successfully deleted.",
        "code": 200
    }
}

HTTP Request

DELETE api/v1/snapstics/asns/{id}/lines

Notes :

1. {id} is an asn_id.

Delete Specific ASN Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/asns/16/lines/ids=80,83" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/asns/16/lines/ids=80,83",
    "method": "DELETE",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "Success": {
        "message": "ASN line successfully deleted.",
        "code": 200
    }
}

HTTP Request

DELETE api/v1/snapstics/asns/{id}/lines/{ids?}

Notes :

1. {id} is an asn_id.

2. {ids?} is an ASN line/s id and you can also pass multiple ASN line/s id with comma-separated.

Orders

Create Order Without Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d  {
    "name": "Jhon",
    "email": "jhon@gmail.com",
    "address_line_1": "350 5th Avenue",
    "address_line_2": "",
    "country": "US",
    "state": "New York",
    "city": "New york",
    "zip": "10118",
    "shipping_method": "Freight",
    "lines": []
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders",
    "method": "POST",
    "data": {
        "name": "Jhon",
        "email": "jhon@gmail.com",
        "address_line_1": "350 5th Avenue",
        "address_line_2": "",
        "country": "Us",
        "state": "New York",
        "city": "New york",
        "zip": "10118",
        "shipping_method": "Freight",
        "lines": []
    },
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "id": 7,
    "name": "Jhon",
    "email": "jhon@gmail.com",
    "address_line_1": "350 5th Avenue",
    "address_line_2": "",
    "country": "US",
    "state": "New York",
    "city": "New york",
    "zip": "10118",
    "shipping_method": "Freight",
    "status": "received",
    "carrier_name": null,
    "service_level_name": null,
    "charge": null,
    "tracking_number": null,
    "tracking_url": null,
    "label_url": null,
    "created_at": "2017-09-09 04:59:59",
    "updated_at": "2017-09-09 04:59:59",
    "lines": []
}

HTTP Request

POST api/v1/snapstics/orders

Parameters

Parameter Type Status Description
name string required Maximum: 255
email string required Maximum: 255
address_line_1 string required Maximum: 255
address_line_2 string optional Maximum: 255
country string required US
state string required Valid US state
city string required Maximum: 255
zip string required Valid US zip
shipping_method string required Freight or Parcel
lines array required Blank array.

Create Order With Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d {
    "name": "Jhon",
    "email": "jhon@gmail.com",
    "address_line_1": "350 5th Avenue",
    "address_line_2": "",
    "country": "US",
    "state": "New York",
    "city": "New york",
    "zip": "10118",
    "shipping_method": "Parcel",
    "lines": [
        {
            "product_id": "82",
            "quantity": "2"
        },
        {
            "product_id": "83",
            "quantity": "3"
        }
    ]
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders",
    "method": "POST",
    "data": {
        "name": "Jhon",
        "email": "jhon@gmail.com",
        "address_line_1": "350 5th Avenue",
        "address_line_2": "",
        "country": "US",
        "state": "New York",
        "city": "New york",
        "zip": "10118",
        "shipping_method": "Parcel",
        "lines": [{
            "product_id": "82",
             "quantity": "2"
        }, {
            "product_id": "83",
            "quantity": "3"
        }]
    },
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "id": 9,
    "name": "Jhon",
    "email": "jhon@gmail.com",
    "address_line_1": "350 5th Avenue",
    "address_line_2": "",
    "country": "US",
    "state": "New York",
    "city": "New york",
    "zip": "10118",
    "shipping_method": "Parcel",
    "status": "received",
    "carrier_name": null,
    "service_level_name": null,
    "charge": null,
    "tracking_number": null,
    "tracking_url": null,
    "label_url": null,
    "created_at": "2017-09-09 05:10:11",
    "updated_at": "2017-09-09 05:10:11",
    "lines": [
        {
            "id": 5,
            "order_id": 9,
            "product_id": "82",
            "quantity": "2",
            "created_at": "2017-09-09 05:10:11",
            "updated_at": "2017-09-09 05:10:11"
        },
        {
            "id": 6,
            "order_id": 9,
            "product_id": "83",
            "quantity": "3",
            "created_at": "2017-09-09 05:10:11",
            "updated_at": "2017-09-09 05:10:11"
        }
    ]
}

HTTP Request

POST api/v1/snapstics/orders

Parameters

Parameter Type Status Description
name string required Maximum: 255
email string required Maximum: 255
address_line_1 string required Maximum: 255
address_line_2 string optional Maximum: 255
country string required US
state string required Valid US state
city string required Maximum: 255
zip string required Valid US zip
shipping_method string required Freight or Parcel
lines array required Line/s array.

Parameters for line/s array

Parameter Type Status Description
product_id integer required id of product which you want to add in order.
quantity integer required Between: 1 and 2147483646

List All Orders

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "id": 7,
        "name": "Jhon",
        "email": "jhon@gmail.com",
        "address_line_1": "350 5th Avenue",
        "address_line_2": "",
        "country": "US",
        "state": "New York",
        "city": "New york",
        "zip": "10118",
        "shipping_method": "Freight",
        "status": "received",
        "carrier_name": null,
        "service_level_name": "",
        "charge": null,
        "tracking_number": null,
        "tracking_url": null,
        "label_url": "",
        "created_at": "2017-09-09 04:59:59",
        "updated_at": "2017-09-09 04:59:59",
        "lines": []
    },
    {
        "id": 8,
        "name": "Smith",
        "email": "smith@gmail.com",
        "address_line_1": "123 6th St.",
        "address_line_2": "",
        "country": "US",
        "state": "Florida",
        "city": "Melbourne",
        "zip": "10118",
        "shipping_method": "Parcel",
        "status": "received",
        "carrier_name": null,
        "service_level_name": "",
        "charge": null,
        "tracking_number": null,
        "tracking_url": null,
        "label_url": "",
        "created_at": "2017-09-09 04:59:59",
        "updated_at": "2017-09-09 04:59:59",
        "lines": []
    },
    {
        "id": 9,
        "name": "Jhon",
        "email": "jhon@gmail.com",
        "address_line_1": "350 5th Avenue",
        "address_line_2": "",
        "country": "US",
        "state": "New York",
        "city": "New york",
        "zip": "10118",
        "shipping_method": "Parcel",
        "status": "received",
        "carrier_name": null,
        "service_level_name": "",
        "charge": null,
        "tracking_number": null,
        "tracking_url": null,
        "label_url": "",
        "created_at": "2017-09-09 05:10:11",
        "updated_at": "2017-09-09 05:10:11",
        "lines": [
            {
                "id": 5,
                "order_id": 9,
                "product_id": 82,
                "quantity": 2,
                "created_at": "2017-09-09 05:10:11",
                "updated_at": "2017-09-09 05:10:11"
            },
            {
                "id": 6,
                "order_id": 9,
                "product_id": 83,
                "quantity": 3,
                "created_at": "2017-09-09 05:10:11",
                "updated_at": "2017-09-09 05:10:11"
            }
        ]
    },
    {
        "id": 10,
        "name": "Smith",
        "email": "smith@gmail.com",
        "address_line_1": "123 6th St.",
        "address_line_2": "",
        "country": "US",
        "state": "Florida",
        "city": "Melbourne",
        "zip": "10118",
        "shipping_method": "Freight",
        "status": "received",
        "carrier_name": null,
        "service_level_name": "",
        "charge": null,
        "tracking_number": null,
        "tracking_url": null,
        "label_url": "",
        "created_at": "2017-09-09 05:10:11",
        "updated_at": "2017-09-09 05:10:11",
        "lines": [
            {
                "id": 7,
                "order_id": 10,
                "product_id": 84,
                "quantity": 2,
                "created_at": "2017-09-09 05:10:11",
                "updated_at": "2017-09-09 05:10:11"
            },
            {
                "id": 8,
                "order_id": 10,
                "product_id": 85,
                "quantity": 3,
                "created_at": "2017-09-09 05:10:11",
                "updated_at": "2017-09-09 05:10:11"
            }
        ]
    }
]

HTTP Request

GET api/v1/snapstics/orders

List Specific Order/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders/ids=7,9" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders/ids=7,9",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "id": 7,
        "name": "Jhon",
        "email": "jhon@gmail.com",
        "address_line_1": "350 5th Avenue",
        "address_line_2": "",
        "country": "US",
        "state": "New York",
        "city": "New york",
        "zip": "10118",
        "shipping_method": "Freight",
        "status": "received",
        "carrier_name": null,
        "service_level_name": "",
        "charge": null,
        "tracking_number": null,
        "tracking_url": null,
        "label_url": "",
        "created_at": "2017-09-09 04:59:59",
        "updated_at": "2017-09-09 04:59:59",
        "lines": []
    },
    {
        "id": 9,
        "name": "Jhon",
        "email": "jhon@gmail.com",
        "address_line_1": "350 5th Avenue",
        "address_line_2": "",
        "country": "US",
        "state": "New York",
        "city": "New york",
        "zip": "10118",
        "shipping_method": "Parcel",
        "status": "received",
        "carrier_name": null,
        "service_level_name": "",
        "charge": null,
        "tracking_number": null,
        "tracking_url": null,
        "label_url": "",
        "created_at": "2017-09-09 05:10:11",
        "updated_at": "2017-09-09 05:10:11",
        "lines": [
            {
                "id": 5,
                "order_id": 9,
                "product_id": 82,
                "quantity": 2,
                "created_at": "2017-09-09 05:10:11",
                "updated_at": "2017-09-09 05:10:11"
            },
            {
                "id": 6,
                "order_id": 9,
                "product_id": 83,
                "quantity": 3,
                "created_at": "2017-09-09 05:10:11",
                "updated_at": "2017-09-09 05:10:11"
            }
        ]
    }
]

HTTP Request

List Specific orders

GET api/v1/snapstics/orders/{ids?}

Notes :

1. {ids?} is an order_id and you can also pass multiple order_id with comma-separated.

Update Order

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders/7/edit" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d {
        "name": "Jhonsan",
        "email": "jhonsan@gmail.com",
        "address_line_1": "215 Clayton St.",
        "address_line_2": "",
        "country": "US",
        "state": "California",
        "city": "San Francisco",
        "zip": "94117",
        "shipping_method": "Freight"
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders/7/edit",
    "method": "PUT",
    "data": {
        "name": "Jhonsan",
        "email": "jhonsan@gmail.com",
        "address_line_1": "215 Clayton St.",
        "address_line_2": "",
        "country": "US",
        "state": "California",
        "city": "San Francisco",
        "zip": "94117",
        "shipping_method": "Freight"

    },
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "id": 7,
    "name": "Jhonsan",
    "email": "jhonsan@gmail.com",
    "address_line_1": "215 Clayton St.",
    "address_line_2": "",
    "country": "US",
    "state": "California",
    "city": "San Francisco",
    "zip": "94117",
    "shipping_method": "Freight",
    "status": "received",
    "carrier_name": null,
    "service_level_name": "",
    "charge": null,
    "tracking_number": null,
    "tracking_url": null,
    "label_url": "",
    "created_at": "2017-09-09 04:59:59",
    "updated_at": "2017-09-09 05:21:51"
}

HTTP Request

PUT api/v1/snapstics/orders/{id}/edit

Notes :

1. {id} is an order_id.

Parameters

Parameter Type Status Description
name string optional Maximum: 255
email string optional Maximum: 255
address_line_1 string optional Maximum: 255
address_line_2 string optional Maximum: 255
country string optional US
state string optional Valid US state
city string optional Maximum: 255
zip string optional Valid US zip
shipping_method string optional Freight or Parcel

Create Order Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders/7/lines" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d {
    "lines": [
        {
            "product_id": "82",
            "quantity": "2"
        },
        {
            "product_id": "83",
            "quantity": "2"
        },
        {
            "product_id": "84",
            "quantity": "2"
        },
        {
            "product_id": "85",
            "quantity": "2"
        }
    ]
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders/7/lines",
    "method": "POST",
    "data": {
        "lines": [{
            "product_id": "82",
            "quantity": "2"
        }, {
            "product_id": "83",
            "quantity": "2"
        }, {
            "product_id": "84",
            "quantity": "2"
        }, {
            "product_id": "85",
            "quantity": "2"
        }]
    },
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "lines": [
        {
            "id": 9,
            "order_id": 7,
            "product_id": 82,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        },
        {
            "id": 10,
            "order_id": 7,
            "product_id": 83,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        },
        {
            "id": 11,
            "order_id": 7,
            "product_id": 84,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        },
        {
            "id": 12,
            "order_id": 7,
            "product_id": 85,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        }
    ]
}

HTTP Request

POST api/v1/snapstics/orders/{id}/lines

Notes :

1. {id} is an order_id.

Parameters

Parameter Type Status Description
product_id integer required id of product which you want to add in order
quantity integer required Between: 1 and 2147483646

List All Order Lines

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders/7/lines" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders/7/lines",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "lines": [
        {
            "id": 9,
            "order_id": 7,
            "product_id": 82,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        },
        {
            "id": 10,
            "order_id": 7,
            "product_id": 83,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        },
        {
            "id": 11,
            "order_id": 7,
            "product_id": 84,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        },
        {
            "id": 12,
            "order_id": 7,
            "product_id": 85,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        }
    ]
}

HTTP Request

GET api/v1/snapstics/orders/{id}/lines

Notes :

1. {id} is an order_id.

List Specific Order Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders/7/lines/ids=9,10" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders/7/lines/ids=9,10",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "lines": [
        {
            "id": 9,
            "order_id": 7,
            "product_id": 82,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        },
        {
            "id": 10,
            "order_id": 7,
            "product_id": 83,
            "quantity": 2,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:25:09"
        }
    ]
}

HTTP Request

GET api/v1/snapstics/orders/{id}/lines/{ids?}

Notes :

1. {id} is an order_id.

2. {ids?} is an order line/s id and you can also pass multiple order line/s id with comma-separated.

Update Order Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders/7/lines/edit" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
-d {
    "lines": [
        {
            "id": "9",
            "product_id": "82",
            "quantity": "3"
        },
        {
            "id": "10",
            "product_id": "83",
            "quantity": "3"
        }
    ]
}
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders/7/lines/edit",
    "method": "PUT",
    "data": {
        "lines": [{
            "id": "9",
            "product_id": "82",
            "quantity": "3"
        }, {
            "id": "10",
            "product_id": "83",
            "quantity": "3"
        }]
    },
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "lines": [
        {
            "id": 9,
            "order_id": 7,
            "product_id": 82,
            "quantity": 3,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:28:47"
        },
        {
            "id": 10,
            "order_id": 7,
            "product_id": 83,
            "quantity": 3,
            "created_at": "2017-09-09 05:25:09",
            "updated_at": "2017-09-09 05:28:47"
        }
    ]
}

HTTP Request

PUT api/v1/snapstics/orders/{id}/lines/edit

Notes :

1. {id} is an order_id.

Parameters

Parameter Type Status Description
id integer required id of order line
product_id integer required id of product
quantity integer required Between: 1 and 2147483646

Delete All Order Lines

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders/9/lines" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders/9/lines",
    "method": "DELETE",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "Success": {
        "message": "All Lines of order is successfully deleted.",
        "code": 200
    }
}

HTTP Request

DELETE api/v1/snapstics/orders/{id}/lines

Notes :

1. {id} is an order_id.

Delete Specific Order Line/s

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/orders/7/lines/ids=9,10" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/orders/7/lines/ids=9,10",
    "method": "DELETE",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "Success": {
        "message": "Order Lines are successfully deleted.",
        "code": 200
    }
}

HTTP Request

DELETE api/v1/snapstics/orders/262/lines/{ids?}

Notes :

1. {id} is an order_id.

2. {ids?} is an order line/s id and you can also pass multiple order line/s id with comma-separated.

Inventory

List All Products Inventory

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/inventory" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/inventory",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "product_id": 82,
        "name": "Iphone 7 32gb Silver",
        "product_type": "Each",
        "sku": "01901980681",
        "instock": "15",
        "company": "Lotus Market"
    },
    {
        "product_id": 83,
        "name": "Samsung Galaxy S8 64GB Midnight Black",
        "product_type": "Each",
        "sku": "57890080",
        "instock": "14",
        "company": "Lotus Market"
    },
    {
        "product_id": 84,
        "name": "Pepsi",
        "product_type": "Pallet",
        "sku": "012000005",
        "instock": "16",
        "company": "Lotus Market"
    },
    {
        "product_id": 85,
        "name": "Lays Potato Chips - American Style Cream and Onion",
        "product_type": "Pallet",
        "sku": "16450052",
        "instock": "15",
        "company": "Lotus Market"
    }
]

HTTP Request

GET api/v1/snapstics/inventory

List Specific Product/s Inventory

Example request:

curl "https://app.snapstics.com/api/v1/snapstics/inventory/ids=82,83,84" \
-H "Content-Type: application/json" \
-H "Authorization: API_TOKEN" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://app.snapstics.com/api/v1/snapstics/inventory/ids=82,83,84",
    "method": "GET",
    "headers": {
        "Content-Type": "application/json",
        "Authorization: API_TOKEN"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

[
    {
        "product_id": 82,
        "name": "Iphone 7 32gb Silver",
        "product_type": "Each",
        "sku": "01901980681",
        "instock": "15",
        "company": "Lotus Market"
    },
    {
        "product_id": 83,
        "name": "Samsung Galaxy S8 64GB Midnight Black",
        "product_type": "Each",
        "sku": "57890080",
        "instock": "14",
        "company": "Lotus Market"
    },
    {
        "product_id": 84,
        "name": "Pepsi",
        "product_type": "Pallet",
        "sku": "012000005",
        "instock": "16",
        "company": "Lotus Market"
    }
]

HTTP Request

GET api/v1/snapstics/inventory/{ids?}

Notes :

1. {ids?} is a product_id and you can also pass multiple product_id with comma-separated.