Each merchant maintains a completely unique catalog of products managed at ShipStream whether in stock or not. It is preferable that a merchant creates all of their products with accurate names, goods type and barcodes before actually shipping physical inventory to aid in accurate processing of deliveries.

Methods


Entity Properties


product.search(null|object $filters = null, null|array $options = null) Retrieve list of products with basic info (id, sku, type, set, name).

Parameters

filters
null | object
  • null - Retrieve list of all products.
  • object - Retrieve list of products using specified Search Filters. Allowed properties for filtering: “sku”, “vendor_sku”, “status”, “availability”, “visibility”, “created_at”, “updated_at”, “external_id”.
options
null | array
  • null - No options will be applied.
  • object - Apply specified Search Options.

Return Value

An array of objects. Each object will contain Product Properties.

Example Request

Get product information for one product SKU:
Request
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "product.search",
        [
            {
                "sku" : { "eq" : "product2" }
            }
        ]
    ]
}

Example Response

Response
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "error" : null,
    "result" : [
        {
            "sku" : "productsku",
            "name" : "product name",
            "barcode" : "productbarcode",
            "goods_type" : "NORMAL",
            "status" : 1,
            "availability" : 1,
            "visibility" : 2,
            "weight" : 12.75,
            "weight_unit" : "lb",
            "length" : null,
            "width" : null,
            "height" : null,
            "customs_value" : "24.5600",
            "customs_value_currency" : "USD",
            "country_of_manufacture" : "DK",
            "hts_base_code" : 1234.56,
            "hts_country_code" : [
                {
                    "country_id" : "BB",
                    "extension" : "01"
                },
                {
                    "country_id" : "FO",
                    "extension" : "02"
                }
            ],
            "vendor_sku" : "vendorsku",
            "requires_packaging" : 1,
            "can_contain_other_items" : 0,
            "valid_containers" : ["containersku1", "containersku2"],
            "special_supplies" : [ "supplysku1", "supplysku2" ],
            "special_other" : [ "specialsku1", "specialsku2" ],
            "unit_qty" : 5
        }
    ]
}

Error Codes

codemessage
108Invalid filters given. Details in error message.

product.create

product.create (string $sku, object $productData) Create new product.

Parameters

sku
string
Product SKU.
productData
object
Product data.

Return Value

true if product was successfully created.

Example Request

Request
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "product.create",
        [
            "product3",
            {
                "name" : "Product 3",
                "barcode" : "product3",
                "goods_type" : "NORMAL",
                "weight" : 1.75,
                "weight_unit": "lb",
                "length" : 123,
                "width" : 100,
                "height" : 28,
                "dimension_unit" : "in",
                "customs_value" : "24.5600",
                "customs_value_currency" : "USD",
                "country_of_manufacture" : "DK",
                "hts_base_code" : 1234.56,
                "hts_country_code" : "BH:1000|ZW:1001",
                "vendor_sku" : "vendorsku",
                "requires_packaging" : 1,
                "can_contain_other_items" : 1,
                "valid_containers" : [ "containersku1", "containersku2" ],
                "special_supplies" : [ "supplysku1", "supplysku2" ],
                "special_other" : [ "specialsku1", "specialsku2" ],
                "unit_qty" : 5
            }
        ]
    ]
}

Example Response

Response
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "error" : null,
    "result" : true
}

Error Codes

codemessage
102Invalid data given. Details in error message.
104Product type is not in allowed types.
105Product’s attribute set does not exist.
106Product’s attribute set is not a Catalog Product entity type.
107Another product with this SKU already exists.

product.info

product.info (string $sku) Retrieve product info.

Parameters

sku
string
Product SKU.

Return Value

Object with Product Properties.

Example Request

Request
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "product.info",
        [
            "product1"
        ]
    ]
}

Example Response

Response
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "error" : null,
    "result" : {
        "sku" : "productsku",
        "name" : "product name",
        "barcode" : "productbarcode",
        "goods_type" : "NORMAL",
        "status" : 1,
        "availability" : 1,
        "visibility" : 2,
        "weight" : 12.75,
        "weight_unit" : "lb",
        "length" : null,
        "width" : null,
        "height" : null,
        "dimension_unit" : "in",
        "customs_value" : "24.5600",
        "customs_value_currency" : "USD",
        "country_of_manufacture" : "DK",
        "hts_base_code" : 1234.56,
        "hts_country_code" : [
            {
                "country_id" : "BB",
                "extension" : "01"
            },
            {
                "country_id" : "FO",
                "extension" : "02"
            }
        ],
        "vendor_sku" : "vendorsku",
        "requires_packaging" : 1,
        "can_contain_other_items" : 0,
        "valid_containers" : [ "containersku1", "containersku2" ],
        "special_supplies" : [ "supplysku1", "supplysku2" ],
        "special_other" : [ "othersku1", "othersku2" ],
        "unit_qty" : 5
    }
}

Error Codes

codemessage
101Product not exists.

product.update

product.update (string $sku, object $productData) Update product data.

Parameters

sku
string
Product SKU.
productData
object
Product data.

Return Value

true if product was successfully updated.

Example Request

Request
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "product.update",
        [
            "product3",
            {
                "name" : "product name",
                "barcode" : "productbarcode",
                "goods_type" : "NORMAL",
                "status" : 1,
                "availability" : 1,
                "visibility" : 2,
                "weight" : 12.75,
                "weight_unit" : "lb",
                "length" : null,
                "width" : null,
                "height" : null,
                "dimension_unit" : "lb",
                "customs_value" : "24.5600",
                "customs_value_currency" : "USD",
                "country_of_manufacture" : "DK",
                "hts_base_code" : 1234.56,
                "hts_country_code" : [
                    {
                        "country_id" : "BB",
                        "extension" : "01"
                    },
                    {
                        "country_id" : "FO",
                        "extension" : "02"
                    }
                ],
                "vendor_sku" : "vendorsku",
                "requires_packaging" : 1,
                "can_contain_other_items" : 0,
                "valid_containers" : [ "containersku1", "containersku2" ],
                "special_supplies" : [ "supplysku1", "supplysku2" ],
                "special_other" : [ "specialsku1", "specialsku2" ],
                "unit_qty" : 5
            }
        ]
    ]
}

Example Response

Response
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "error" : null,
    "result" : true
}

Error Codes

codemessage
101Product not exists.
102Invalid data given. Details in error message.

Entity Properties

Product Properties