NAV Navbar
shell

Introduction

Welcome to the Bright Sites API!

Authentication

To authorize, use this code:

# You can just pass your token as the parameter
GET https://subdomain.mybrightsites.com/api/v2.1.0/orders?token=your_api_token

Make sure to replace subdomain with your real subdomain and your_api_token with your API token.

Bright Sites uses tokens to allow access to the API. You can manage your API tokens in the website admin area(/admin/api_keys).

Bright Sites API expects for the API token to be included in all API requests to the server as a parameter that looks like the following:

token=your_api_token

Account addresses

List of Addresses for User

List the account level address book for a specific user based on the user ID (not username) you supply. Keep in mind, the response will return up to 500 records on a single page and you will need to use "per_page" and "page" URL parameters to see all the records.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/users/494/addresses?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "addresses": [
    {
      "id": 1006,
      "nickname": "order #13 shipping address",
      "first_name": "John",
      "last_name": "Doe",
      "company": "Testco LLC",
      "first_address": "Florida",
      "second_address": "",
      "state": "Alabama",
      "city": "City",
      "country": "United States",
      "zip": "222222",
      "email": "john@example.com",
      "phone": "+1234567890",
      "default_billing": false,
      "default_shipping": false
    }
  ],
  "meta": {
    "total": 6,
    "offset": 0,
    "limit": 50
  }
}

HTTP Request

GET /api/v2.1.0/users/:user_id/addresses

Query Parameters

Parameter Description
user_id
required
User ID
Must be a number

JSON Payload Parameters

Parameter Description
page
optional
Pagination page number
Must be a number
per_page
optional
Pagination per page number
Must be a number

Show Address

Show address information (Address 1, Address 2, City, etc) for one address in the user’s address book based on the address ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/users/494/addresses/1006?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 1006,
  "nickname": "order #13 shipping address",
  "first_name": "John",
  "last_name": "Doe",
  "company": "Testco LLC",
  "first_address": "Florida",
  "second_address": "",
  "state": "Alabama",
  "city": "City",
  "country": "United States",
  "zip": "222222",
  "email": "john@example.com",
  "phone": "+1234567890",
  "default_billing": false,
  "default_shipping": false
}

HTTP Request

GET /api/v2.1.0/users/:user_id/addresses/:id

Query Parameters

Parameter Description
user_id
required
User ID
Must be a number
id
required
Address ID
Must be a number

Create Address

Create an address for a specific user in their account level address book.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/users/494/addresses?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "address": {
    "nickname": "Work",
    "first_name": "John",
    "last_name": "Doe",
    "company": "Testco LLC",
    "first_address": "301",
    "second_address": "W 6th Ave",
    "state": "Colorado",
    "city": "Denver",
    "country": "United States",
    "zip": "80204",
    "email": "john@example.com",
    "phone": "+1234567890",
    "default_shipping": true
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 1556,
  "nickname": "Work",
  "first_name": "John",
  "last_name": "Doe",
  "company": "Testco LLC",
  "first_address": "301",
  "second_address": "W 6th Ave",
  "state": "Colorado",
  "city": "Denver",
  "country": "United States",
  "zip": "80204",
  "email": "john@example.com",
  "phone": "+1234567890",
  "default_billing": false,
  "default_shipping": true
}

HTTP Request

POST /api/v2.1.0/users/:user_id/addresses

Query Parameters

Parameter Description
user_id
required
User ID
Must be a number

JSON Payload Parameters

Parameter Description
address
required
Must be a Hash
address[nickname]
required
Name of address
Must be a String
address[first_name]
optional , nil allowed
First name
Must be a String
address[last_name]
optional , nil allowed
Last name
Must be a String
address[company]
optional , nil allowed
Company
Must be a String
address[first_address]
required
First address
Must be a String
address[second_address]
optional , nil allowed
Second address
Must be a String
address[state]
required
State
Must be a String
address[city]
required
City
Must be a String
address[country]
required
Country
Must be a String
address[zip]
required
Zip Code
Must be a String
address[email]
optional , nil allowed
E-mail
Must be a String
address[phone]
optional , nil allowed
Phone
Must be a String

Update address

Update an address in a user’s account level address book based on the address ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/users/494/addresses/1556?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "address": {
    "nickname": "Work",
    "first_name": "John",
    "last_name": "Doe",
    "company": "Testco LLC",
    "first_address": "301",
    "second_address": "W 6th Ave",
    "state": "Colorado",
    "city": "Denver",
    "country": "United States",
    "zip": "80204",
    "email": "john@example.com",
    "phone": "+1234567890",
    "default_billing": false,
    "default_shipping": true
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 1556,
  "nickname": "Work",
  "first_name": "John",
  "last_name": "Doe",
  "company": "Testco LLC",
  "first_address": "301",
  "second_address": "W 6th Ave",
  "state": "Colorado",
  "city": "Denver",
  "country": "United States",
  "zip": "80204",
  "email": "john@example.com",
  "phone": "+1234567890",
  "default_billing": false,
  "default_shipping": true
}

HTTP Request

PUT /api/v2.1.0/users/:user_id/addresses/:id

Query Parameters

Parameter Description
user_id
required
User ID
Must be a number
id
required
Address ID
Must be a number

JSON Payload Parameters

Parameter Description
address
required
Must be a Hash
address[nickname]
optional
Name of address
Must be a String
address[first_name]
optional , nil allowed
First name
Must be a String
address[last_name]
optional , nil allowed
Last name
Must be a String
address[company]
optional , nil allowed
Company
Must be a String
address[first_address]
optional
First address
Must be a String
address[second_address]
optional , nil allowed
Second address
Must be a String
address[state]
optional
State
Must be a String
address[city]
optional
City
Must be a String
address[country]
optional
Country
Must be a String
address[zip]
optional
Zip Code
Must be a String
address[email]
optional , nil allowed
E-mail
Must be a String
address[phone]
optional , nil allowed
Phone
Must be a String

Delete address

Delete an address in the user’s account level address book based on the address ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/users/494/addresses/1556?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 1556,
  "nickname": "Work",
  "first_name": "John",
  "last_name": "Doe",
  "company": "Testco LLC",
  "first_address": "301",
  "second_address": "W 6th Ave",
  "state": "Colorado",
  "city": "Denver",
  "country": "United States",
  "zip": "80204",
  "email": "john@example.com",
  "phone": "+1234567890",
  "default_billing": false,
  "default_shipping": true
}

HTTP Request

DELETE /api/v2.1.0/users/:user_id/addresses/:id

Query Parameters

Parameter Description
user_id
required
User ID
Must be a number
id
required
Address ID
Must be a number

Categories

List categories

List all product categories in the store. Keep in mind, the response will return up to 500 records on a single page and you will need to use "per_page" and "page" URL parameters to see all the records.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/categories?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "categories": [
    {
      "id": 579,
      "name": "Dark Chocolates",
      "price_modifier": "10.0",
      "active": true,
      "parent": {
        "id": 578,
        "name": "Chocolates"
      }
    }
  ],
  "meta": {
    "total": 1,
    "offset": 0,
    "limit": 0
  }
}

HTTP Request

GET /api/v2.1.0/categories

JSON Payload Parameters

Parameter Description
page
optional
Pagination page number
Must be a number
per_page
optional
Pagination per page number
Must be a number

Show category

Show the category information based on the category ID (not name) you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/categories/579?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "Dark Chocolates",
  "position": 2,
  "parent": {
    "id": 578,
    "name": "Chocolates"
  },
  "products_order": "name_asc",
  "price_modifier": "10.0",
  "active": true
}

HTTP Request

GET /api/v2.1.0/categories/:id

Query Parameters

Parameter Description
id
required
Category ID
Must be a number

Create category

Create a category in the store.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/categories?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "category": {
    "name": "Dark Chocolates",
    "position": 2,
    "parent_id": 578,
    "products_order": "name_asc",
    "price_modifier": 10,
    "active": true
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "Dark Chocolates",
  "position": 2,
  "parent": {
    "id": 578,
    "name": "Chocolates"
  },
  "products_order": "name_asc",
  "price_modifier": "10.0",
  "active": true
}

HTTP Request

POST /api/v2.1.0/categories

JSON Payload Parameters

Parameter Description
category
required
Must be a Hash
category[name]
required
Unique name
Must be a String
category[position]
optional , nil allowed
Category position in list
Must be a number
category[parent_id]
optional , nil allowed
Category ID to be used as parent category
Must be a number
category[products_order]
optional , nil allowed
Products ordering in this category
Must be one of: website_products_order, name_asc, name_desc, price_asc, price_desc, rating_asc, rating_desc, most_reviews, custom
category[price_modifier]
optional , nil allowed
Price Modifier
Must be a float
category[active]
optional , nil allowed
Enable / Disable category
Must be one of: true, false, 1, 0

Update category

Update a category in the store based on the category ID (not name) you supply

curl "https://subdomain.mybrightsites.com/api/v2.1.0/categories/579?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "category": {
    "name": "White Chocolates",
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "White Chocolates",
  "position": 2,
  "parent": {
    "id": 578,
    "name": "Chocolates"
  },
  "products_order": "name_asc",
  "price_modifier": "10.0",
  "active": true
}

HTTP Request

PUT /api/v2.1.0/categories/:id

Query Parameters

Parameter Description
id
required
Category ID
Must be a number

JSON Payload Parameters

Parameter Description
category
required
Must be a Hash
category[name]
optional
Unique name
Must be a String
category[position]
optional , nil allowed
Category position in list
Must be a number
category[parent_id]
optional , nil allowed
Category ID to be used as parent category
Must be a number
category[products_order]
optional , nil allowed
Products ordering in this category
Must be one of: website_products_order, name_asc, name_desc, price_asc, price_desc, rating_asc, rating_desc, most_reviews, custom
category[price_modifier]
optional , nil allowed
Price Modifier
Must be a float
category[active]
optional , nil allowed
Enable / Disable category
Must be one of: true, false, 1, 0

Delete Category

Delete a category based on the category ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/categories/579?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "White Chocolates",
  "position": 2,
  "parent": {
    "id": 578,
    "name": "Chocolates"
  },
  "products_order": "name_asc",
  "price_modifier": "10.0",
  "active": true
}

HTTP Request

DELETE /api/v2.1.0/categories/:id

Query Parameters

Parameter Description
id
required
Category ID
Must be a number

Inventories

List of all inventories in the store

This API call request allows you to query for all inventory levels on items in your store. Keep in mind, the response will return up to 500 records on a single page and you will need to use "per_page" and "page" URL parameters to see all the records.

curl "https://subdomain.bsites-staging.com/api/v2.1.0/inventories?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "inventories": [
    {
      "product_id": 44371,
      "product_name": "District Made - Ladies Dip Dye Rounded Deep V-Neck Tee",
      "internal_id": "",
      "sku": "DM4310",
      "final_sku": "DM4310-XXS-Blk",
      "id": 2871,
      "inventory": 999,
      "trigger": 6,
      "track": true,
      "allow_negative": true,
      "sub_option_ids": [
        734290,
        734297
      ],
      "sub_sku": "XXS-Blk"
    },
    {
      "product_id": 44371,
      "product_name": "District Made - Ladies Dip Dye Rounded Deep V-Neck Tee",
      "internal_id": "",
      "sku": "DM4310",
      "final_sku": "DM4310-XXS-Dkb",
      "id": 2872,
      "inventory": 0,
      "trigger": 5,
      "track": true,
      "allow_negative": true,
      "sub_option_ids": [
        734290,
        734298
      ],
      "sub_sku": "XXS-Dkb"
    }
  ],
  "meta": {
      "total": 2,
      "offset": 0,
      "limit": 20
  }
}

HTTP Request

GET /api/v2.1.0/inventories

JSON Payload Parameters

Parameter Description
sku
optional
Filter by product sku
Must be a String
internal_id
optional
Filter by product Internal ID
Must be a String
name
optional
Filter by product name
Must be a String
categories
optional
Filter by product categories
Must be one of: Array, String
vendors
optional
Filter by product vendors
Must be one of: Array, String
created_at_from
optional
Filter by product date created from
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
created_at_to
optional
Filter by product date created to
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
updated_at_from
optional
Filter by product date updated from
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
updated_at_to
optional
Filter by product date updated to
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
page
optional
Pagination page number
Must be a number
per_page
optional
Pagination per page number
Must be a number

Batch update inventories for product

Update the inventory levels based on the product ID you supply. You can provide more than 1 inventory ID for a single product ID.

curl "https://subdomain.bsites-staging.com/api/v2.1.0/inventories/44371/batch_update?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "inventories": [
    {
      "id": 2871,
      "inventory": 100,
      "trigger": 6,
      "track": true,
      "allow_negative": true
    },
    {
      "id": 2872,
      "inventory": 500,
      "trigger": 5,
      "track": true,
      "allow_negative": false
    }
  ]
}
EOF

The above request returns JSON structured like this:

{
  "inventories": [
    {
      "product_id": 44371,
      "product_name": "District Made - Ladies Dip Dye Rounded Deep V-Neck Tee",
      "internal_id": "",
      "sku": "DM4310",
      "final_sku": "DM4310-XXS-Blk",
      "id": 2871,
      "inventory": 100,
      "trigger": 6,
      "track": true,
      "allow_negative": true,
      "sub_option_ids": [
        734290,
        734297
      ],
      "sub_sku": "XXS-Blk"
    },
    {
      "product_id": 44371,
      "product_name": "District Made - Ladies Dip Dye Rounded Deep V-Neck Tee",
      "internal_id": "",
      "sku": "DM4310",
      "final_sku": "DM4310-XXS-Dkb",
      "id": 2872,
      "inventory": 500,
      "trigger": 5,
      "track": true,
      "allow_negative": false,
      "sub_option_ids": [
        734290,
        734298
      ],
      "sub_sku": "XXS-Dkb"
    }
  ]
}

HTTP Request

PUT /api/v2.1.0/inventories/:product_id/batch_update

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

JSON Payload Parameters

Parameter Description
inventories
required
Must be a Hash
inventories[id]
required
Inventory ID
Must be a number
inventories[inventory]
optional
Inventory Units
Must be a number
inventories[trigger]
optional
Inventory Trigger
Must be a number
inventories[track]
optional
Must be one of: true, false, 1, 0
inventories[allow_negative]
optional
Must be one of: true, false, 1, 0

Line items

List line items

List all line items for a specific order ID you supply. Keep in mind, the response will return up to 500 records on a single page and you will need to use "per_page" and "page" URL parameters to see all the records.

HTTP Request

GET /api/v2.1.0/orders/:order_id/line_items

Query Parameters

Parameter Description
order_id
required
Order ID
Must be a number

Show line item

Show the specific line item on an order based on the line item ID you supply.

HTTP Request

GET /api/v2.1.0/orders/:order_id/line_items/:id

Query Parameters

Parameter Description
order_id
required
Order ID
Must be a number
id
required
Line Item ID
Must be a number

Order Shipments

List shipments

List all shipments based on a order ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/orders/1/shipments?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "shipments": [
    {
      "id": 14,
      "tracking_number": "1234123412",
      "ship_date": "2019-10-20",
      "note": "Lorem ipsum",
      "shipping_method": "FedEx 2 Day Freight",
      "line_items": [
        {
          "id": 1234,
          "quantity": 1
        }
      ]
    },
    {
      "id": 15,
      "tracking_number": "3443123441",
      "ship_date": "2019-10-21",
      "note": "Lorem ipsum",
      "shipping_method": "FedEx 2 Day",
      "line_items": [
        {
          "id": 1234,
          "quantity": 1
        },
        {
          "id": 1235,
          "quantity": 2
        }
      ]
    }
  ]
}

HTTP Request

GET /api/v2.1.0/orders/:order_id/shipments

Query Parameters

Parameter Description
order_id
required
Order ID
Must be a number

Show shipment

Show a specific shipment based on the shipment ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/orders/1/shipments/14?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 14,
  "tracking_number": "1234123412",
  "ship_date": "2019-10-20",
  "note": "Lorem ipsum",
  "shipping_method": "FedEx 2 Day Freight",
  "line_items": [
    {
      "id": 1234,
      "quantity": 1
    }
  ]
}

HTTP Request

GET /api/v2.1.0/orders/:order_id/shipments/:id

Query Parameters

Parameter Description
order_id
required
Order ID
Must be a number
id
required
Shipment ID
Must be a number

Create shipment

Create a shipment for a specific order ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/orders/1/shipments?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "shipment": {
    "tracking_number": "123412344123",
    "send_shipping_confirmation": true,
    "ship_date": "2019-10-20",
    "note": "Lorem ipsum",
    "shipping_method": "Ground",
    "line_items": [
      {
        "id": 1234,
        "quantity": 2
      }
    ]
  }
}

EOF

The above request returns JSON structured like this:

{
  "id": 39,
  "tracking_number": "123412344123",
  "ship_date": "2019-10-20",
  "note": "Lorem ipsum",
  "shipping_method": "Ground",
  "line_items": [
    {
      "id": 1234,
      "quantity": 2
    }
  ]
}

HTTP Request

POST /api/v2.1.0/orders/:order_id/shipments

Query Parameters

Parameter Description
order_id
required
Order ID
Must be a number

JSON Payload Parameters

Parameter Description
shipment
required
Must be a Hash
shipment[shipping_method]
optional
Shipping method
Must be a String. Order's shipping method will be used if empty. See shipping methods
shipment[tracking_number]
optional
Tracking number
Must be a String
shipment[ship_date]
optional
Ship Date
Format: YYYY-MM-DD
shipment[note]
optional
Note
Must be a String (max 255 characters)
shipment[send_shipping_confirmation]
optional
Send shipping confirmation
If true, send a shipping confirmation email
shipment[line_items]
required
Line items
Must be an Array of Hashes
shipment[line_items][0][id]
required
Line item ID
Must be a number
shipment[line_items][0][quantity]
required
Line item quantity
Must be a number

Delete shipment

Delete a specific shipment from an order based on the shipment ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/orders/1/shipments/39?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 39,
  "tracking_number": "123412344123",
  "ship_date": "2019-10-20",
  "note": "Lorem ipsum",
  "shipping_method": "Ground",
  "line_items": []
}

HTTP Request

DELETE /api/v2.1.0/orders/:order_id/shipments/:id

Query Parameters

Parameter Description
order_id
required
Order ID
Must be a number
id
required
Shipment ID
Must be a number

Orders

List orders

List all orders placed in your store. Keep in mind, the response will return up to 500 records on a single page and you will need to use "per_page" and "page" URL parameters to see all the records.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/orders?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "orders": [
    {
      "order_id": 1,
      "shipping_method": "Best Way",
      "tracking": "12234tracking2123",
      "created_at": "2015-08-28T08:34:37-06:00",
      "updated_at": "2015-08-28T08:34:37-06:00",
      "status": "new",
      "customer": "test@johndoe.com",
    }
  ],
  "meta": {
    "total": 1,
    "offset": 0,
    "limit": 0
  }
}

HTTP Request

GET /api/v2.1.0/orders

Query Parameters

Parameter Description
status
optional
Filter by order status. Available statuses: new, billed, paid, in_progress, split, shipped, completed, back_ordered, canceled, moas_pending
customer
optional
Filter by customer
Must be one of: Array, String
created_at_from
optional
Filter by date created from
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
created_at_to
optional
Filter by date created to
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
updated_at_from
optional
Filter by date updated from
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
updated_at_to
optional
Filter by date updated to
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
page
optional
Pagination page number
Must be a number
per_page
optional
Pagination per page number
Must be a number

Show order

Show you information pertaining to one order based on the order ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/orders/1?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "order_id": 1,
  "created_at": "2015-08-25T05:06:36-06:00",
  "updated_at": "2015-08-25T05:06:36-06:00",
  "status": "new",
  "site_id": 178,
  "site_name": "my website",
  "site_url": "http://mywebsite.mybrightsites.com",
  "custom_store_id": "mycustomstore",
  "organization_name": "Super organization",
  "organization_id": 49,
  "custom_data_collections": [
    {
      "title": "Add a Gift Card To Your Order",
      "attributes": [
        {
          "key": "Please select your Gift Card below:",
          "value": "Forever 21"
        }
      ],
      "price_modifier": {
        "modifier_type": "$",
        "amount": "25.0"
      }
    }
  ],
  "customer_email": "test@johndoe.com",
  "customer_id": null,
  "username": "Guest",
  "item_total": "4703.0",
  "grand_total": "3069.15",
  "shipping_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "test@johndoe.com",
    "phone": "1234123456"
  },
  "shipping_address": {
    "first_address": "2658 East 26th Street",
    "company": "Testco LLC",
    "second_address": "John Doe",
    "city": "Brooklyn",
    "state": "New York",
    "country": "United States",
    "zip": "11235"
  },
  "billing_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "test@johndoe.com",
    "phone": "1234123456"
  },
  "billing_address": {
    "first_address": "2658 East 26th Street",
    "company": "Testco LLC",
    "second_address": "John Doe",
    "city": "Brooklyn",
    "state": "New York",
    "country": "United States",
    "zip": "11235"
  },
  "payment": {
    "id": 4305,
    "authorization": "A70A9B840C12",
    "created_at": "2016-06-23T10:19:22-06:00",
    "amount": "82.0",
    "state": "refunded",
    "details": {
      "method": "credit card",
      "card type": "Visa",
      "card": "**** **** **** 1111",
      "amount": "$82.00"
    }
  },
  "payments": [
    {
      "id": 4305,
      "authorization": "A10AA3EC513B",
      "created_at": "2016-06-23T10:19:22-06:00",
      "amount": "82.0",
      "state": "refunded",
      "details": {
        "method": "credit card",
        "card type": "Visa",
        "card": "**** **** **** 1111",
        "amount": "$82.00"
      }
    },
    {
      "id": 6215,
      "authorization": "A10AA3EC513A",
      "created_at": "2017-03-10T04:29:10-07:00",
      "amount": "-82.0",
      "state": "completed",
      "details": {
        "method": "credit card",
        "card type": "Visa",
        "card": "**** **** **** 1111",
        "type": "Credit",
        "amount": "-$82.00"
      }
    }
  ],
  "shipment": {
    "tracking_number": "12234tracking2123",
    "cost": "0.0",
    "created_at": "2015-08-25T05:06:23-06:00",
    "shipping_method": "Best Way",
    "ship_date": "2016-08-25",
    "in_hands_date": "2018-06-15"
  },
  "line_items": [
    {
      "id": 1234,
      "name": "Product 1",
      "final_sku": "sku",
      "final_internal_id": "431234",
      "tax_code": "12345",
      "quantity": 18,
      "product_price": "150.0",
      "options_price": "5.0",
      "total_price": "2790.0",
      "tax_price": "7.75",
      "unit_price": "155.0",
      "product_id": 10,
      "product_options": [
        {
          "option_id": 25,
          "sub_option_id": 152,
          "option_name": "Size",
          "option_type": "size",
          "sub_option_name": "X-Small"
        }
      ],
      "vendors": [
        {
          "id": 579,
          "name": "The Willy Wonka Company",
          "address1": "2010 Oompa-Loompa drive",
          "address2": "",
          "city": "Sweetstown",
          "state": "Texas",
          "zip_code": "99099",
          "phone": "123123123123",
          "email": "test@test.com",
          "account_number": "account123123",
          "asi_number": "asi123456"
        }
      ],
      "logos": [{
          "name": "fedex",
          "charge": "10.0",
          "image_url": "https://assets.mybrightsites.com/uploads/website/line_item_logo/image/05-01-2018/762/fedex.png",
          "supplier_id": "VENDOR123",
          "location": {
            "id": 4,
            "name": "Top"
          },
          "decoration": {
            "custom_text": "",
            "font": "",
            "size": {
              "name": "Medium",
              "price_modifier": "1.75",
              "setup_charge": "25.0"
            },
            "color": {
              "number": 1,
              "price_modifier": "0.0",
              "setup_charge": "0.0"
            },
            "colors": [
              {
                "color_name": "#00ff00",
                "color_type": "hex",
                "hex_value": "#00ff00"
              }
            ]
          }
        },
        {
          "name": "cop",
          "charge": null,
          "image_url": "https://assets.mybrightsites.com/uploads/website/line_item_logo/image/05-01-2018/763/11.png",
          "supplier_id": null,
          "location": {
            "id": 5,
            "name": "Right Chest"
          },
          "decoration": {
            "custom_text": "",
            "font": "",
            "size": {
              "name": "Medium",
              "price_modifier": "1.75",
              "setup_charge": "25.0"
            },
            "color": {
              "number": 1,
              "price_modifier": "0.0",
              "setup_charge": "0.0"
            },
            "colors": [
              {
                "color_name": "#4e00ff",
                "color_type": "hex",
                "hex_value": "#4e00ff"
              }
            ]
          }
        }
      ],
      "product_personalizations": [
        {
          "title": "Enter Name Here",
          "attributes": [
            {
              "key": "Name",
              "value": ""
            }
          ],
          "price_modifier": {
            "modifier_type": "$",
            "amount": "1.99"
          }
        }
      ],
      "decoration_method": {
        "name": "Embroidery",
        "price_modifier": "2.5"
      },
      "gift_certificate": null,
    },
    {
      "id": 10139,
      "name": "Gift Certificate example",
      "final_sku": "GCE1",
      "quantity": 1,
      "product_price": "0.0",
      "options_price": "0.0",
      "total_price": "10.0",
      "tax_price": null,
      "unit_price": "10.0",
      "pdf_status": "not_available",
      "pdf_file_url": null,
      "product_id": 44422,
      "final_internal_id": null,
      "tax_code": "12345",
      "product_options": [],
      "logos": [],
      "product_personalizations": [],
      "decoration_method": null,
      "gift_certificate": {
        "first_name": "John",
        "last_name": "Doe",
        "message": "Nice work on the job today!",
        "expires_at": "2018-12-04T09:15:50.000-07:00",
        "code": "9FBF1F5B7029432",
        "amount": "10.0"
      }
    }
  ],
  "coupons_adjustments": [],
  "balance_adjustments": [],
  "custom_adjustments": [
    {
      "note": "quantity discount",
      "amount": "-1080.0",
      "modifier_type": "$"
    },
    {
      "note": "quantity discount",
      "amount": "-120.0",
      "modifier_type": "$"
    },
    {
      "note": "quantity discount",
      "amount": "-60.0",
      "modifier_type": "$"
    },
    {
      "note": "quantity discount",
      "amount": "-180.0",
      "modifier_type": "$"
    },
    {
      "note": "quantity discount",
      "amount": "-360.0",
      "modifier_type": "$"
    }
  ],
  "required_adjustments": [
    {
      "note": "Setup Charge for helloworld",
      "amount": "20.0",
      "modifier_type": "$"
    },
    {
      "note": null,
      "amount": "146.15",
      "modifier_type": "$"
    },
    {
      "note": null,
      "amount": "0.0",
      "modifier_type": "$"
    }
  ],
  "notes": [],
  "shipments": [
    {
      "id": 14,
      "tracking_number": "1234123412",
      "ship_date": "2019-10-20",
      "note": "Lorem ipsum",
      "shipping_method": "FedEx 2 Day Freight",
      "line_items": [
        {
          "id": 1234,
          "quantity": 1
        }
      ]
    }
  ]
}

HTTP Request

GET /api/v2.1.0/orders/:id

Query Parameters

Parameter Description
id
required
Order ID
Must be a number

Update order

Update order information based on the order ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/orders/1?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "order": {
    "status": "completed",
    "shipping_method": "Ground",
    "tracking_number": "AA123456789",
    "note": "new note",
    "send_shipping_confirmation": true,
    "shipping_address": {"first_address":"2658 East 26th Street"},
    "shipping_contact":{"first_name":"John"},
    "ship_date": "2016-12-20",
    "in_hands_date": "2018-12-20",
    "billing_contact":{"first_name":"John"},
    "billing_address": {
      "company": "Testco LLC",
      "first_address": "2658 East",
      "second_address": "26th Street",
      "city": "Brooklyn",
      "state": "New York",
      "country": "United States",
      "zip": "11235"
    }
}
EOF

The above request returns JSON structured like this:

{
  "order_id": 9,
  "status": "completed",
  "customer_email": "storetesting16@email.brightstores.com",
  "customer_id": 429,
  "username": "trex",
  "item_total": "75.0",
  "grand_total": "136.11",
  "created_at": "2016-03-29T22:53:03-06:00",
  "updated_at": "2016-03-29T22:53:03-06:00",
  "custom_data_collections": [
    {
      "title": "Add a Gift Card To Your Order",
      "attributes": [
        {
          "key": "Please select your Gift Card below:",
          "value": "Hot Topic"
        }
      ],
      "price_modifier": {
        "modifier_type": "$",
        "amount": "25.0"
      }
    }
  ],
  "shipping_contact": {
    "first_name": "John",
    "last_name": "Rex",
    "email": "storetesting16@email.brightstores.com",
    "phone": "303-555-8989"
  },
  "shipping_address": {
    "company": "Testco LLC",
    "first_address": "2658 East 26th Street",
    "second_address": "",
    "city": "Spokane",
    "state": "Washington",
    "country": "United States",
    "zip": "99208"
  },
  "billing_contact": {
    "first_name": "John",
    "last_name": "Rex",
    "email": "storetesting16@email.brightstores.com",
    "phone": "303-555-8989"
  },
  "billing_address": {
    "company": "Testco LLC",
    "first_address": "2658 East",
    "second_address": "26th Street",
    "city": "Brooklyn",
    "state": "New York",
    "country": "United States",
    "zip": "11235"
  },
  "payment": {
    "id": 4305,
    "authorization": "A70A9B840C12",
    "created_at": "2016-06-23T10:19:22-06:00",
    "amount": "82.0",
    "state": "refunded",
    "details": {
      "method": "credit card",
      "card type": "Visa",
      "card": "**** **** **** 1111",
      "amount": "$82.00"
    }
  },
  "payments": [
    {
      "id": 4305,
      "authorization": "A10AA3EC513B",
      "created_at": "2016-06-23T10:19:22-06:00",
      "amount": "82.0",
      "state": "refunded",
      "details": {
        "method": "credit card",
        "card type": "Visa",
        "card": "**** **** **** 1111",
        "amount": "$82.00"
      }
    },
    {
      "id": 6215,
      "authorization": "A10AA3EC513A",
      "created_at": "2017-03-10T04:29:10-07:00",
      "amount": "-82.0",
      "state": "completed",
      "details": {
        "method": "credit card",
        "card type": "Visa",
        "card": "**** **** **** 1111",
        "type": "Credit",
        "amount": "-$82.00"
      }
    }
  ],
  "shipment": {
    "tracking_number": "AA123456789",
    "cost": "25.55",
    "created_at": "2015-07-07T07:13:27-06:00",
    "shipping_method": "Ground",
    "ship_date": "2016-12-20",
    "in_hands_date": "2018-12-20"
  },
  "line_items": [
    {
      "id": "1234",
      "name": "Shoes",
      "final_sku": "Shoes-1234",
      "final_internal_id": "431234",
      "tax_code": "12345",
      "quantity": 2,
      "product_price": "37.5",
      "options_price": "0.0",
      "total_price": "75.0",
      "tax_price": "3.75",
      "unit_price": "37.5",
      "product_options": [
        {
          "option_name": "Size",
          "sub_option_name": "Small"
        },
        {
          "option_name": "Color",
          "sub_option_name": "White"
        }
      ],
      "logos": [{
          "name": "fedex",
          "charge": "10.0",
          "image_url": "https://assets.mybrightsites.com/uploads/website/line_item_logo/image/05-01-2018/762/fedex.png",
          "location": {
            "id": 4,
            "name": "Top"
          },
          "decoration": null
        },
        {
          "name": "cop",
          "charge": null,
          "image_url": "https://assets.mybrightsites.com/uploads/website/line_item_logo/image/05-01-2018/763/11.png",
          "location": {
            "id": 5,
            "name": "Right Chest"
          },
          "decoration": null
        }
      ],
      "product_personalizations": [
        {
          "title": "Enter Name Here",
          "attributes": [
            {
              "key": "Name",
              "value": ""
            }
          ],
          "price_modifier": {
            "modifier_type": "$",
            "amount": "1.99"
          }
        }
      ],
      "decoration_method": null
    }
  ],
  "coupons_adjustments": [],
  "balance_adjustments": [],
  "custom_adjustments": [],
  "required_adjustments": [
    {
      "note": "add a gift card to your order",
      "amount": "25.0",
      "modifier_type": "$"
    },
    {
      "note": "sales tax",
      "amount": "7.88",
      "modifier_type": "$"
    },
    {
      "note": "shipment",
      "amount": "25.55",
      "modifier_type": "$"
    },
    {
      "note": "shipping sales tax",
      "amount": "2.68",
      "modifier_type": "$"
    }
  ],
  "notes": [
    {
      "username": "API",
      "created_at": "2016-02-08T04:45:18-07:00",
      "note": "new note"
    }
  ]
}

HTTP Request

PUT /api/v2.1.0/orders/:id

Query Parameters

Parameter Description
id
required
Order ID
Must be a number

JSON Payload Parameters

Parameter Description
order
required
Must be a Hash
order[status]
optional
Order status. Available statuses: new, billed, paid, in_progress, split, shipped, completed, back_ordered, canceled, moas_pending
order[shipping_method]
optional
Shipping Method
Must be a String
order[tracking_number]
optional
Tracking Number
Must be a String
order[ship_date]
optional
Ship Date
Invalid date format. Valid format: “YYYY-MM-DD hh:mm:ss” or “YYYY-MM-DD”
order[in_hands_date]
optional
In Hands Date
Invalid date format. Valid format: “YYYY-MM-DD hh:mm:ss” or “YYYY-MM-DD”
order[note]
optional
Create Comment
Must be a String
order[send_shipping_confirmation]
optional
If true, send a shipping confirmation email with updated order data
Must be one of: true, false, 1, 0
order[shipping_address]
optional
Shipping Address
Must be a Hash
order[shipping_address][company]
optional
Company
Must be a String
order[shipping_address][first_address]
optional
Address Line 1
Must be a String
order[shipping_address][second_address]
optional
Address Line 2
Must be a String
order[shipping_address][state]
optional
State
Must be a String
order[shipping_address][city]
optional
City
Must be a String
order[shipping_address][country]
optional
Country
Must be a String
order[shipping_address][zip]
optional
Zip Code
Must be a String
order[shipping_contact]
optional
Shipping Contact
Must be a Hash
order[shipping_contact][first_name]
optional
First Name
Must be a String
order[shipping_contact][last_name]
optional
Last Name
Must be a String
order[shipping_contact][email]
optional
Email
Must be a String
order[shipping_contact][phone]
optional
Phone
Must be a String
order[billing_address]
optional
Billing Address
Must be a Hash
order[billing_address][company]
optional
Company
Must be a String
order[billing_address][first_address]
optional
Address Line 1
Must be a String
order[billing_address][second_address]
optional
Address Line 2
Must be a String
order[billing_address][state]
optional
State
Must be a String
order[billing_address][city]
optional
City
Must be a String
order[billing_address][country]
optional
Country
Must be a String
order[billing_address][zip]
optional
Zip Code
Must be a String
order[billing_contact]
optional
Billing Contact
Must be a Hash
order[billing_contact][first_name]
optional
First Name
Must be a String
order[billing_contact][last_name]
optional
Last Name
Must be a String
order[billing_contact][email]
optional
Email
Must be a String
order[billing_contact][phone]
optional
Phone
Must be a String

Cancel order

Cancel one specific order based on the order ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/orders/1/cancel?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT

The above request returns JSON structured like this:

{
  "success": [
    "Set status to 'Canceled'",
    "Restock inventory",
    "Refund balance for budget 'Sales'",
    "Updated product statistics",
    "Order canceled by System. IP: 127.0.0.1"
  ],
  "errors": [
    "Unable to refund payment"
  ]
}

HTTP Request

PUT /api/v2.1.0/orders/:id/cancel

Query Parameters

Parameter Description
id
required
Order ID
Must be a number

Product decoration methods

List of decoration methods for a product

List whether decorations methods is activated for a product and what the decoration methods are on that product based on the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/decoration_methods?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "enabled": true,
  "decoration_methods": [
    {
      "id": 1,
      "name": "Sublimation",
      "enabled": true
    }
  ]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/decoration_methods

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

Update decoration method

Activate decorations methods under a product based on the decoration methods ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/decoration_methods/1?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "decoration_method": {
    "enabled": true
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 1,
  "name": "Sublimation",
  "enabled": true
}

HTTP Request

PUT /api/v2.1.0/products/:product_id/decoration_methods/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Decoration Method ID
Must be a number

JSON Payload Parameters

Parameter Description
decoration_method
required
Must be a Hash
decoration_method[enabled]
optional
Enable decoration method
Must be one of: true, false, 1, 0

Product images

List of product images

List all product images for the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/images?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "images": [
    {
      "id": 1,
      "thumbnail": false,
      "primary": true,
      "position": 0,
      "src": "https://www.imagestorage.com/image1.jpg"
    },
    {
      "id": 2,
      "thumbnail": true,
      "primary": false,
      "position": 1,
      "src": "https://www.imagestorage.com/image2.jpg"
    }
  ]
}

HTTP Request

GET /api/api/v2.1.0/products/:product_id/images

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

Show product image

Show a specific product image based on the product image ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/579/product_images/1?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 1,
  "primary": true,
  "thumbnail": false,
  "position": 0,
  "src": "https://www.imagestorage.com/image3.jpg"
}

HTTP Request

GET /api/v2.1.0/products/:product_id/images/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Product Image ID
Must be a number

Create product image

Create a product image under a specific item for the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/images?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "image": {
    "position": 0,
    "primary": true,
    "thumbnail": false,
    "image_data": "R0lGODlhbgCMAPf/APbr48VySrxTO7IgKt2qmKQdJeK8lsFjROG5p/nz7Zg3

                   MNmnd7Q1MLNVS9GId71hSJMZIuzTu4UtKbeEeakhKMl8U8WYjfr18YQaIbAf

                   KKwhKdKzqpQtLebFortOOejKrOjZ1Mt7aMNpVbAqLLV7bsNqR+3WwMqEWenN

                   sZYxL/Ddy/Pm2e7ZxLlUQrIjNPXp3bU5MbhENbEtLtqhj5ZQTfHh0bMxL7Ip

                   NsNyUYkZIrZJPcqGdYIUHb5aPKkeJnoUHd2yiJkiLKYiKLRFOsyJXKVDO8up

                   osFaS+TBnK4kKti5sNaYg/z49aqYl5kqLrljUtORfMOlo/36+H4ZH8yDYq0f

                   KKFYTaU9MrY8MrZBNXwXHpgaIdGVYu/byLZNP9SaZLIyOuXCtHkpJst+Wpcm",
    "filename": "image3.jpg"
  }
}
EOF

The above request returns JSON structured like this:

{
    "id": 2,
    "primary": true,
    "thumbnail": false,
    "position": 0,
    "src": "https://www.imagestorage.com/image3.jpg"
}

HTTP Request

POST /api/api/v2.1.0/product/:product_id/images

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

JSON Payload Parameters

Parameter Description
image
required
Must be a Hash
image[primary]
optional
Primary Image switcher
Must be one of: true, false, 1, 0
image[thumbnail]
optional
Thumbnail Image switcher
Must be one of: true, false, 1, 0
image[position]
optional
Image list order
Must be a number
image[image_data]
required
Base64 Image representation
Must be a String
image[filename]
required
Image file name
Must be a String

Update product image

Update a specific product image based on the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/images/2?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "image": {
    "position": 0,
    "primary": true,
    "thumbnail": false,
    "image_data": "R0lGODlhbgCMAPf/APbr48VySrxTO7IgKt2qmKQdJeK8lsFjROG5p/nz7Zg3

                   MNmnd7Q1MLNVS9GId71hSJMZIuzTu4UtKbeEeakhKMl8U8WYjfr18YQaIbAf

                   KKwhKdKzqpQtLebFortOOejKrOjZ1Mt7aMNpVbAqLLV7bsNqR+3WwMqEWenN

                   sZYxL/Ddy/Pm2e7ZxLlUQrIjNPXp3bU5MbhENbEtLtqhj5ZQTfHh0bMxL7Ip

                   NsNyUYkZIrZJPcqGdYIUHb5aPKkeJnoUHd2yiJkiLKYiKLRFOsyJXKVDO8up

                   osFaS+TBnK4kKti5sNaYg/z49aqYl5kqLrljUtORfMOlo/36+H4ZH8yDYq0f

                   KKFYTaU9MrY8MrZBNXwXHpgaIdGVYu/byLZNP9SaZLIyOuXCtHkpJst+Wpcm",
    "filename": "new_image.jpg"
  }
}
EOF

The above request returns JSON structured like this:

{
    "id": 2,
    "primary": true,
    "thumbnail": false,
    "position": 0,
    "src": "https://www.imagestorage.com/new_image.jpg"
}

HTTP Request

PUT /api/api/v2.1.0/product/:product_id/images/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Product Image ID
Must be a number

JSON Payload Parameters

Parameter Description
image
required
Must be a Hash
image[primary]
optional
Primary Image switcher
Must be one of: true, false, 1, 0
image[thumbnail]
optional
Thumbnail Image switcher
Must be one of: true, false, 1, 0
image[position]
optional
Image list order
Must be a number
image[image_data]
required
Base64 Image representation
Must be a String
image[filename]
required
Image file name
Must be a String

Delete product image

Delete a specific product image based on the product image ID you provide.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/images/579?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
    "id": 1,
    "primary": true,
    "thumbnail": false,
    "position": 0,
    "src": "https://www.imagestorage.com/image.jpg"
}

HTTP Request

DELETE /api/v2.1.0/products/:product_id/images/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Product Image ID
Must be a number

Product inventories

List of inventories for product

List all inventory levels and their corresponding IDs based on a product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/inventories?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "enabled": true,
  "inventories": [
    {
      "id": 774,
      "inventory": 23,
      "trigger": 6,
      "track": false,
      "allow_negative": false,
      "sub_sku": "S-Green",
      "sub_option_ids": [
        556255,
        556155
      ]
    }
  ]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/inventories

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

Show inventories

Show the individual inventory level for a specific inventory ID you provide.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/inventories/774?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 774,
  "inventory": 23,
  "trigger": 6,
  "track": false,
  "allow_negative": false,
  "sub_sku": "S-Green",
  "sub_option_ids": [
    556255,
    556155
  ]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/inventories/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Inventory ID
Must be a number

Create inventory

Create inventory levels based on a product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/inventories?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "inventory": {
    "sub_option_ids": [
      556255,
      556156
    ],
    "inventory": 25,
    "trigger": 5,
    "track": false,
    "allow_negative": false
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 773,
  "inventory": 25,
  "trigger": 5,
  "track": false,
  "allow_negative": false,
  "sub_sku": "S-Red",
  "sub_option_ids": [
    556255,
    556156
  ]
}

HTTP Request

POST /api/v2.1.0/products/:product_id/inventories

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

JSON Payload Parameters

Parameter Description
inventory
required
Must be a Hash
inventory[sub_option_ids]
optional
Array of sub_option ids. It can be blank if there are no options for this product
Must be an Array of Integer
inventory[inventory]
required
Available inventories
Must be a number
inventory[trigger]
required
Notify when inventories are low
Must be a number
inventory[track]
required
Enable / Disable inventory tracking
Must be one of: true, false, 1, 0
inventory[allow_negative]
required
Allow negative value of inventories
Must be one of: true, false, 1, 0

Update inventory

Update the inventory levels based on an inventory ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/inventories/774?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "inventory": {
    "inventory": 25
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 774,
  "inventory": 25,
  "trigger": 6,
  "track": false,
  "allow_negative": false,
  "sub_sku": "S-Red",
  "sub_option_ids": [
    556255,
    556156
  ]
}

HTTP Request

PUT /api/v2.1.0/products/:product_id/inventories/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Inventory ID
Must be a number

JSON Payload Parameters

Parameter Description
inventory
required
Must be a Hash
inventory[inventory]
optional
Available inventories
Must be a number
inventory[trigger]
optional
Notify when inventories are low
Must be a number
inventory[track]
optional
Enable / Disable inventory tracking
Must be one of: true, false, 1, 0
inventory[allow_negative]
optional
Allow negative value of inventories
Must be one of: true, false, 1, 0

Delete inventory

Delete the inventory levels based on an inventory ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/inventories/774?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 774,
  "inventory": 25,
  "trigger": 6,
  "track": false,
  "allow_negative": false,
  "sub_sku": "S-Red",
  "sub_option_ids": [
    556255,
    556156
  ]
}

HTTP Request

DELETE /api/v2.1.0/products/:product_id/inventories/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Inventory ID
Must be a number

Product logo locations

List of logo locations for a product

List all logo locations based on a product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/logo_locations?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "enabled": true,
  "logo_locations": [
    {
      "id": 1,
      "name": "Right Chest",
      "enabled": true,
      "required": true,
      "chargable": true
    }
  ]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/logo_locations

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

Update logo location

Update the logo location based on the logo locations ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/logo_locations/1?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "logo_location": {
    "enabled": true,
    "required": true,
    "chargable": false
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 1,
  "name": "Right Chest",
  "enabled": true,
  "required": true,
  "chargable": false
}

HTTP Request

PUT /api/v2.1.0/products/:product_id/logo_locations/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Logo Location ID
Must be a number

JSON Payload Parameters

Parameter Description
logo_location
required
Must be a Hash
logo_location[enabled]
optional
Enable location
Must be one of: true, false, 1, 0
logo_location[required]
optional
Logo is required for this location
Must be one of: true, false, 1, 0
logo_location[charge]
optional
Allow charge for a logo
Must be one of: true, false, 1, 0

Product option groups

List of option groups for product

List all product option groups based on a product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/option_groups?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "enabled": true,
  "option_groups": [
    {
      "id": 4,
      "name": "OptionGroup",
      "wrap_options": true,
      "option_ids": [12, 15]
    }
  ]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/option_groups

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

Show option group

Show a specific product option group based on the option group ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/option_groups/4?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 47204,
  "name": "OptionGroup",
  "wrap_options": true,
  "option_ids": [12, 15]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/option_groups/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Group ID
Must be a number

Create group

Create a product option group for a specific product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/option_groups?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "option_group": {
    "name": "OptionGroup",
    "wrap_options": true,
    "option_ids": [12, 15]
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 5,
  "name": "OptionGroup",
  "wrap_options": true,
  "option_ids": [12, 15]
}

HTTP Request

POST /api/v2.1.0/products/:product_id/option_groups

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

JSON Payload Parameters

Parameter Description
option_group
required
Must be a Hash
option_group[name]
required
Name of option group
Must be a String
option_group[wrap_options]
optional , nil allowed
Wrap options
Must be one of: true, false, 1, 0
option_group[option_ids]
optional , nil allowed
Wrap options
Must be an Array of Integer

Update group

Update a product option group for a specific option group ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/option_groups/5?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "option_group": {
    "name": "OptionGroup2",
    "option_ids": [12]
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 5,
  "name": "OptionGroup2",
  "wrap_options": true,
  "option_ids": [12]
}

HTTP Request

PUT /api/v2.1.0/products/:product_id/option_groups/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Group ID
Must be a number

JSON Payload Parameters

Parameter Description
option_group
required
Must be a Hash
option_group[name]
optional
Name of option group
Must be a String
option_group[wrap_options]
optional , nil allowed
Wrap options
Must be one of: true, false, 1, 0
option_group[option_ids]
optional , nil allowed
Wrap options
Must be an Array of Integer

Delete group

Delete a specific product option group based on the option group ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/option_groups/5?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 5,
  "name": "OptionGroup2",
  "wrap_options": true,
  "option_ids": []
}

HTTP Request

DELETE /api/v2.1.0/products/:product_id/option_groups/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Group ID
Must be a number

Product options

List of options for product

List all product options based on a product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "enabled": true,
  "options": [
    {
      "id": 47204,
      "name": "size",
      "friendly_name": "Size",
      "option_type": "size",
      "price_modifier_type": "$",
      "show_in_inventory": true,
      "show_as_thumbs": false,
      "include_in_images": false,
      "required": false,
      "multiple_quantity": false,
      "position": 1
    }
  ]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/options

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

Show option

Show a specific product option based on the option ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options/47204?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 47204,
  "name": "size",
  "friendly_name": "Size",
  "option_type": "size",
  "price_modifier_type": "$",
  "show_in_inventory": true,
  "show_as_thumbs": false,
  "include_in_images": false,
  "required": false,
  "multiple_quantity": false,
  "position": 1
}

HTTP Request

GET /api/v2.1.0/products/:product_id/options/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Option ID
Must be a number

Create option

Create a product option for a specific product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "option": {
    "name": "size",
    "friendly_name": "Size",
    "option_type": "size",
    "price_modifier_type": "$",
    "show_in_inventory": true,
    "show_as_thumbs": false,
    "include_in_images": false,
    "required": true,
    "multiple_quantity": true,
    "position": 2
  }
}
EOF

The above request returns JSON structured like this:

{
  "option": {
    "id": 47204,
    "name": "size",
    "friendly_name": "Size",
    "option_type": "size",
    "price_modifier_type": "$",
    "show_in_inventory": true,
    "show_as_thumbs": false,
    "include_in_images": false,
    "required": true,
    "multiple_quantity": true,
    "position": 2
  }
}

HTTP Request

POST /api/v2.1.0/products/:product_id/options

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

JSON Payload Parameters

Parameter Description
option
required
Must be a Hash
option[name]
required
Name of option
Must be a String
option[friendly_name]
optional , nil allowed
Friendly name
Must be a String
option[option_type]
optional , nil allowed
Product Option Type (general, size, color)
Must be one of: general, size, color
option[price_modifier_type]
required
Price Modifier Type (“$” or “%”)
Must be one of: %, $
option[show_in_inventory]
optional , nil allowed
Add ability to create an inventory for option
Must be one of: true, false, 1, 0
option[show_as_thumbs]
optional , nil allowed
Display option as thumbnails
Must be one of: true, false, 1, 0
option[include_in_images]
optional , nil allowed
Display sub option images on the storefront
Must be one of: true, false, 1, 0
option[required]
optional , nil allowed
Required
Must be one of: true, false, 1, 0
option[multiple_quantity]
optional , nil allowed
Multiple quantity
Must be one of: true, false, 1, 0
option[position]
optional , nil allowed
Position of order
Must be a number

Update option

Update a specific product option based on the option ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options/47204?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "option": {
    "name": "color",
    "option_type": "color",
    "price_modifier_type": "$",
    "show_in_inventory": true,
    "required": false,
    "multiple_quantity": false,
  }
}
EOF

The above request returns JSON structured like this:

{
  "option": {
    "id": 47204,
    "name": "color",
    "friendly_name": "Size",
    "option_type": "color",
    "price_modifier_type": "$",
    "show_in_inventory": true,
    "show_as_thumbs": true,
    "include_in_images": false,
    "required": false,
    "multiple_quantity": false,
    "position": 2
  }
}

HTTP Request

PUT /api/v2.1.0/products/:product_id/options/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Option ID
Must be a number

JSON Payload Parameters

Parameter Description
option
required
Must be a Hash
option[name]
optional
Name of option
Must be a String
option[friendly_name]
optional , nil allowed
Friendly name
Must be a String
option[option_type]
optional , nil allowed
Product Option Type (general, size, color)
Must be one of: general, size, color
option[price_modifier_type]
optional
Price Modifier Type (“$” or “%”)
Must be one of: %, $
option[show_in_inventory]
optional , nil allowed
Add ability to create an inventory for option
Must be one of: true, false, 1, 0
option[show_as_thumbs]
optional , nil allowed
Display option as thumbnails
Must be one of: true, false, 1, 0
option[include_in_images]
optional , nil allowed
Display sub option images on the storefront
Must be one of: true, false, 1, 0
option[required]
optional , nil allowed
Required
Must be one of: true, false, 1, 0
option[multiple_quantity]
optional , nil allowed
Multiple quantity
Must be one of: true, false, 1, 0
option[position]
optional , nil allowed
Position of order
Must be a number

Delete option

Delete a specific product option from a product based on the option ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options/47204?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "option": {
    "id": 47204,
    "name": "color",
    "friendly_name": "Size",
    "option_type": "color",
    "price_modifier_type": "$",
    "show_in_inventory": true,
    "show_as_thumbs": false,
    "include_in_images": false,
    "required": false,
    "multiple_quantity": false,
    "position": 2
  }
}

HTTP Request

DELETE /api/v2.1.0/products/:product_id/options/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Option ID
Must be a number

Product personalization forms

List personalization forms

List all personalization forms for a specific product based on the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalzation_forms?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "enabled": true,
  "personalization_forms": [
    {
      "id": 579,
      "title": "Additional info",
      "price_modifier_type": "$",
      "price_modifier_value": 0.0,
      "position": "1"
    },
    {
      "id": 580,
      "title": "Custom print",
      "price_modifier_type": "%",
      "price_modifier_value": 10.0,
      "position": "2"
    }
  ]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/personalization_forms

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

Show personalization form

Show a specific product personalization form based on the personalization ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalzation_forms/580?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 580,
  "title": "Custom print",
  "price_modifier_type": "%",
  "price_modifier_value": 10.0,
  "position": "2"
}

HTTP Request

GET /api/v2.1.0/products/:product_id/personalization_forms/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Personalization form ID
Must be a number

Create personalization form

Create a product personalization form for a specific product based on the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalization_forms?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "personalization_form": {
    "title": "Custom print",
    "price_modifier_type": "%",
    "price_modifier_value": 10.0,
    "position": "2"
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 580,
  "title": "Custom print",
  "price_modifier_type": "%",
  "price_modifier_value": 10.0,
  "position": "2"
}

HTTP Request

POST /api/v2.1.0/products/:product_id/personalization_forms

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

JSON Payload Parameters

Parameter Description
personalization_form
required
Must be a Hash
personalization_form[title]
required
Title
Must be a String
personalization_form[price_modifier_type]
required
Price modifier type
Must be one of: $, %
personalization_form[price_modifier_value]
required
Price modifier value
Must be a float
personalization_form[position]
required
Position
Must be a number

Update personalization form

Update a specific product personalization form assigned to a product based on the personalization form ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalzation_forms/580?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "personalization_form": {
    "price_modifier_type": "$",
    "price_modifier_value": 5.0,
    "position": "3"
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 580,
  "title": "Custom print",
  "price_modifier_type": "$",
  "price_modifier_value": 5.0,
  "position": "3"
}

HTTP Request

PUT /api/v2.1.0/products/:product_id/personalization_forms/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Personalization form ID
Must be a number

JSON Payload Parameters

Parameter Description
personalization_form
required
Must be a Hash
personalization_form[title]
required
Title
Must be a String
personalization_form[price_modifier_type]
required
Price modifier type
Must be one of: $, %
personalization_form[price_modifier_value]
required
Price modifier value
Must be a float
personalization_form[position]
required
Position
Must be a number

Delete personalization form

Delete a personalization form from a product based on the personalization form ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalization_forms/580?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 580,
  "title": "Custom print",
  "price_modifier_type": "$",
  "price_modifier_value": 5.0,
  "position": "3"
}

HTTP Request

DELETE /api/v2.1.0/products/:product_id/personalization_forms/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Personalization form ID
Must be a number

Product personalization inputs

List personalization inputs

List all personalization inputs for a specific personalization form ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalization_forms/101/personalization_inputs?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "personalization_inputs": [
    {
      "id": 579,
      "label": "Front print",
      "type": "text_field",
      "required": true,
      "position": 1
    },
    {
      "id": 580,
      "label": "Back print",
      "type": "text_area",
      "required": false,
      "position": 2
    }
  ]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/personalization_forms/:personalization_form_id/personalization_inputs

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
personalization_form_id
required
Personalization form ID
Must be a number

Show personalization input

Show a specific product personalization input based on the personalization input ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalization_forms/101/personalization_inputs/579?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 579,
  "label": "Front print",
  "type": "text_field",
  "required": true,
  "position": 1
}

HTTP Request

GET /api/v2.1.0/products/:product_id/personalization_forms/:personalization_form_id/personalization_inputs/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
personalization_form_id
required
Personalization form ID
Must be a number
id
required
Personalization input ID
Must be a number

Create personalization input

Create a product personalization input for a specific personalization form based on the form ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalization_forms/101/personalization_inputs?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "personalization_input": {
    "label": "Back print",
    "type": "text_area",
    "required": false,
    "position": 2
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 580,
  "label": "Back print",
  "type": "text_area",
  "required": false,
  "position": 2
}

HTTP Request

POST /api/v2.1.0/products/:product_id/personalization_forms/:personalization_form_id/personalization_inputs

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
personalization_form_id
required
Personalization form ID
Must be a number

JSON Payload Parameters

Parameter Description
personalization_input
required
Must be a Hash
personalization_input[label]
required
Label
Must be a String
personalization_input[type]
required
Type
Must be one of: text_field, text_area
personalization_input[required]
required
Required
Must be one of: true, false, 1, 0
personalization_input[position]
required
Position
Must be a number

Update personalization input

Update a specific product personalization input for a specific personalization input ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalization_forms/101/personalization_inputs/579?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "personalization_input": {
    "label": "Front left print",
    "required": false,
    "position": 3
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 579,
  "label": "Front left print",
  "type": "text_field",
  "required": false,
  "position": 3
}

HTTP Request

PUT /api/v2.1.0/products/:product_id/personalization_forms/:personalization_form_id/personalization_inputs/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
personalization_form_id
required
Personalization form ID
Must be a number
id
required
Personalization input ID
Must be a number

JSON Payload Parameters

Parameter Description
personalization_input
required
Must be a Hash
personalization_input[label]
optional
Label
Must be a String
personalization_input[type]
optional
Type
Must be one of: text_field, text_area
personalization_input[required]
optional
Required
Must be one of: true, false, 1, 0
personalization_input[position]
optional
Position
Must be a number

Delete personalization input

Delete a specific product personalization input for a specific personalization input ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/1/personalization_forms/101/personalization_inputs/579?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 579,
  "label": "Front left print",
  "type": "text_field",
  "required": false,
  "position": 3
}

HTTP Request

DELETE /api/v2.1.0/products/:product_id/personalization_forms/:personalization_form_id/personalization_inputs/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
personalization_form_id
required
Personalization form ID
Must be a number
id
required
Personalization input ID
Must be a number

Product sub options

List of sub options for option

List all product sub options for a specific product option based on the option ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options/47204/sub_options?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "sub_options": [
    {
      "id": 556155,
      "name": "Small",
      "sub_sku": "",
      "image_src": "https://assets.host.com/uploads/website/product_image/image/03-30-2021/2065763/image.jpg",
      "price_modifier": "0.0",
      "position": 1
    }
  ]
}

HTTP Request

GET /api/v2.1.0/products/:product_id/options/:option_id/sub_options

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
option_id
required
Option ID
Must be a number

Show sub option

Show you a specific product sub option for a specific sub option ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options/47204/sub_options/1234?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 556155,
  "name": "Small",
  "sub_sku": "",
  "image_src": "https://assets.host.com/uploads/website/product_image/image/03-30-2021/2065763/image.jpg",
  "price_modifier": "0.0",
  "position": 2
}

HTTP Request

GET /api/v2.1.0/products/:product_id/options/:option_id/sub_options/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
option_id
required
Option ID
Must be a number
id
required
Sub option ID
Must be a number

Create sub option

Create a product sub option based on a specific product option ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options/47204/sub_options?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "sub_option": {
    "name": "X-Small",
    "sub_sku": "SKU123",
    "price_modifier": 2,
    "image_data": "R0lGODlhbgCMAPf/APbr48VySrxTO7IgKt2qmKQdJeK8lsFjROG5p",
    "filename": "myimage.jpg",
    "position": 3
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 559579,
  "name": "X-Small",
  "sub_sku": "SKU123",
  "image_src": "https://assets.host.com/uploads/website/product_image/image/03-30-2021/2065763/image.jpg",
  "price_modifier": "2.0",
  "position": 3
}

HTTP Request

POST /api/v2.1.0/products/:product_id/options/:option_id/sub_options

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
option_id
required
Option ID
Must be a number

JSON Payload Parameters

Parameter Description
sub_option
required
Must be a Hash
sub_option[name]
required
Name of sub option
Must be a String
sub_option[sub_sku]
optional , nil allowed
SKU
Must be a String
sub_option[price_modifier]
optional , nil allowed
Price Modifier
Must be a float
sub_option[position]
optional , nil allowed
Position of order
Must be a number
sub_option[image_data]
optional , nil allowed
Base64 Image representation
Must be a String
sub_option[filename]
optional , nil allowed
Image file name
Must be a String

Update sub option

Update a product sub option based on a specific sub option ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options/47204/sub_options/1234?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "sub_option": {
    "name": "Large"
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 559579,
  "name": "Large",
  "sub_sku": "SKU123",
  "image_src": "https://assets.host.com/uploads/website/product_image/image/03-30-2021/2065763/image.jpg",
  "price_modifier": "2.0",
  "position": 3
}

HTTP Request

PUT /api/v2.1.0/products/:product_id/options/:option_id/sub_options/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
option_id
required
Option ID
Must be a number
id
required
Sub Option ID
Must be a number

JSON Payload Parameters

Parameter Description
sub_option
required
Must be a Hash
sub_option[name]
optional
Name of sub option
Must be a String
sub_option[sub_sku]
optional , nil allowed
SKU
Must be a String
sub_option[price_modifier]
optional , nil allowed
Price Modifier
Must be a float
sub_option[position]
optional , nil allowed
Position of order
Must be a number
sub_option[image_data]
optional , nil allowed
Base64 Image representation
Must be a String
sub_option[filename]
optional , nil allowed
Image file name
Must be a String

Delete sub option

Delete a product sub option based on a specific sub option ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/22287/options/47204/sub_options/559579?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 559579,
  "name": "Large",
  "sub_sku": "SKU123",
  "image_src": "https://assets.host.com/uploads/website/product_image/image/03-30-2021/2065763/image.jpg",
  "price_modifier": "2.0",
  "position": 3
}

HTTP Request

DELETE /api/v2.1.0/products/:product_id/options/:option_id/sub_options/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
option_id
required
Option ID
Must be a number
id
required
Sub Option ID
Must be a number

Products

List products

List all products in the store. Keep in mind, the response will return up to 500 records on a single page and you will need to use "per_page" and "page" URL parameters to see all the records.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "products": [
    {
      "id": 579,
      "name": "Chocalate",
      "sku": "choc-1",
      "internal_id": "431234",
      "categories": [
        {
          "id": 123,
          "name": "Chocolates"
        }
      ],
      "vendors": [
        {
          "id": 234,
          "name": "The Willy Wonka Company"
        }
      ],
      "active": true,
      "created_at": "2016-03-29T22:53:03-06:00",
      "updated_at": "2016-03-29T22:53:03-06:00"
    }
  ],
  "meta": {
    "total": 1,
    "offset": 0,
    "limit": 0
  }
}

HTTP Request

GET /api/v2.1.0/products

JSON Payload Parameters

Parameter Description
categories
optional
Filter by categories
Must be one of: Array, String
sku
optional
Filter by sku
Must be a String
internal_id
optional
Filter by Internal ID
Must be a String
name
optional
Filter by name
Must be a String
vendors
optional
Filter by vendors
Must be one of: Array, String
created_at_from
optional
Filter by date created from
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
created_at_to
optional
Filter by date created to
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
updated_at_from
optional
Filter by date updated from
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
updated_at_to
optional
Filter by date updated to
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
page
optional
Pagination page number
Must be a number
per_page
optional
Pagination per page number
Must be a number

Show product

Show a specific product configuration based on the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/579?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "name": "Chocolate",
  "sku": "choc-1",
  "sku_separator": "-",
  "internal_id": "431234",
  "base_price": "10",
  "retail_price": "10",
  "cost": "10",
  "setup_charge": "10",
  "minimum_order_quantity": 10,
  "maximum_order_quantity": 20,
  "weight": "10",
  "width": "10",
  "height": "10",
  "length": "10",
  "shipping_modifier": "10",
  "meta_title": "choco",
  "meta_description": "tasty choco",
  "meta_keywords": "tasty chocolate wonka",
  "custom_url": "chocolate",
  "description": "Very Tasty Dark Chocolate",
  "active": true,
  "featured": false,
  "tax_exempt": false,
  "shipping_exempt": false,
  "categories": [
    {
      "id": 123,
      "name": "Chocolates"
    }
  ],
  "vendors": [
    {
      "id": 234,
      "name": "The Willy Wonka Company"
    }
  ],
  "options": [
    {
      "id": 301559,
      "name": "size",
      "friendly_name": "Size",
      "option_type": "size",
      "price_modifier_type": "$",
      "show_in_inventory": true,
      "show_as_thumbs": false,
      "include_in_images": false,
      "required": true,
      "multiple_quantity": true,
      "position": 2
    }
  ],
  "sub_options": [
    {
      "id": 1393159,
      "name": "Green",
      "sub_sku": "GRN",
      "price_modifier": "0.0",
      "image_src": null,
      "position": 0,
      "product_option_id": 301559
    }
  ],
  "inventories": [
    {
      "id": 774,
      "inventory": 23,
      "trigger": 6,
      "track": false,
      "allow_negative": false,
      "sub_sku": "GRN",
      "sub_option_ids": [
        1393159
      ]
    }
  ],
  "enable_quantity_discount": false,
  "related_products_type": "auto",
  "enable_related_products": false,
  "enable_product_personalization": false,
  "enable_inventory": false,
  "enable_logo_locations": false,
  "enable_decoration_methods": false,
  "primary_category_id": 36,
  "tax_code": "12345",
  "created_at": "2016-03-29T22:53:03-06:00",
  "updated_at": "2016-03-29T22:53:03-06:00"
}

HTTP Request

GET /api/v2.1.0/products/:id

Query Parameters

Parameter Description
id
required
Product ID
Must be a number

Create product

Create a brand new product for your store.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "product": {
    "name": "Chocolate",
    "sku": "choc-1",
    "sku_separator": "-",
    "internal_id": "431234",
    "base_price": 10,
    "retail_price": 10,
    "cost": 10,
    "setup_charge": 10,
    "minimum_order_quantity": 10,
    "maximum_order_quantity": 20,
    "tax_code": "12345",
    "weight": 10,
    "width": 10,
    "height": 10,
    "length": 10,
    "shipping_modifier": 10,
    "meta_title": "choco",
    "meta_description": "tasty choco",
    "meta_keywords": "tasty chocolate wonka",
    "custom_url": "chocolate",
    "description": "Very Tasty Dark Chocolate",
    "active": true,
    "featured": false,
    "tax_exempt": false,
    "shipping_exempt": false,
    "vendor_ids": [ 234 ],
    "category_ids": [ 123 ],
    "enable_quantity_discount": false,
    "related_products_type": "auto",
    "enable_related_products": false,
    "enable_product_personalization": false,
    "enable_inventory": false,
    "enable_logo_locations": false,
    "enable_decoration_methods": false,
    "primary_category_id": 36
  }
}
EOF

The above request returns JSON structured like this:

{
  "name": "Chocolate",
  "sku": "choc-1",
  "sku_separator": "-",
  "internal_id": "431234",
  "base_price": "10",
  "retail_price": "10",
  "cost": "10",
  "setup_charge": "10",
  "minimum_order_quantity": 10,
  "maximum_order_quantity": 20,
  "weight": "10",
  "width": "10",
  "height": "10",
  "length": "10",
  "shipping_modifier": "10",
  "meta_title": "choco",
  "meta_description": "tasty choco",
  "meta_keywords": "tasty chocolate wonka",
  "custom_url": "chocolate",
  "description": "Very Tasty Dark Chocolate",
  "active": true,
  "featured": false,
  "tax_exempt": false,
  "shipping_exempt": false,
  "categories": [
    {
      "id": 123,
      "name": "Chocolates"
    }
  ],
  "vendors": [
    {
      "id": 234,
      "name": "The Willy Wonka Company"
    }
  ],
  "options": [],
  "sub_options": [],
  "inventories": [],
  "enable_quantity_discount": false,
  "related_products_type": "auto",
  "enable_related_products": false,
  "enable_product_personalization": false,
  "enable_inventory": false,
  "enable_logo_locations": false,
  "enable_decoration_methods": false,
  "primary_category_id": 36,
  "tax_code": "12345",
  "created_at": "2016-03-29T22:53:03-06:00",
  "updated_at": "2016-03-29T22:53:03-06:00"
}

HTTP Request

POST /api/v2.1.0/products

JSON Payload Parameters

Parameter Description
product
required
Must be a Hash
product[name]
required
Product name
Must be a String
product[sku]
required
Unique sku
Must be a String
product[sku_separator]
optional
SKU separator
Must be a String (default to "-")
product[internal_id]
optional , nil allowed
Internal ID
Must be a String
product[base_price]
required
Base price ($)
Must be a float
product[retail_price]
optional , nil allowed
Retail price ($)
Must be a float
product[cost]
optional , nil allowed
Cost ($)
Must be a float
product[setup_charge]
optional , nil allowed
Setup charge ($)
Must be a float
product[minimum_order_quantity]
optional , nil allowed
Minimum Order Quantity
Must be a number
product[maximum_order_quantity]
optional , nil allowed
Maximum Order Quantity
Must be a number
product[tax_code]
optional , nil allowed
Product tax code
Must be a String
product[primary_category_id]
optional , nil allowed
ID of primary category
Must be a number
product[weight]
optional , nil allowed
Weight (lbs)
Must be a float
product[width]
optional , nil allowed
Width (in)
Must be a float
product[height]
optional , nil allowed
Height (in)
Must be a float
product[length]
optional , nil allowed
Length (in)
Must be a float
product[shipping_modifier]
optional , nil allowed
Shipping modifier ($)
Must be a float
product[meta_title]
optional , nil allowed
Custom title for search engine optimization (SEO)
Must be a String
product[meta_description]
optional , nil allowed
Description for SEO
Must be a String
product[meta_keywords]
optional , nil allowed
Keywords for SEO
Must be a String
product[custom_url]
optional , nil allowed
Custom URL
Must be a String
product[description]
optional , nil allowed
Product description
Must be a String
product[category_ids]
optional , nil allowed
Category IDs
Must be an Array of Integer
product[vendor_ids]
optional , nil allowed
Vendor IDs
Must be an Array of Integer
product[active]
optional , nil allowed
Active product
Must be one of: true, false, 1, 0
product[featured]
optional , nil allowed
Featured product
Must be one of: true, false, 1, 0
product[tax_exempt]
optional , nil allowed
Tax exempt
Must be one of: true, false, 1, 0
product[shipping_exempt]
optional , nil allowed
Shipping exempt
Must be one of: true, false, 1, 0
product[enable_quantity_discount]
optional , nil allowed
Enable/Disable quantity discounts
Must be one of: true, false, 1, 0
product[related_products_type]
optional , nil allowed
Related products type
Must be one of: auto, custom
product[enable_related_products]
optional , nil allowed
Enable/Disable related products
Must be one of: true, false, 1, 0
product[enable_product_personalization]
optional , nil allowed
Enable/Disable product personalization
Must be one of: true, false, 1, 0
product[enable_inventory]
optional , nil allowed
Enable/Disable inventory
Must be one of: true, false, 1, 0
product[enable_product_options]
optional , nil allowed
Enable/Disable product Options
Must be one of: true, false, 1, 0
product[enable_logo_locations]
optional , nil allowed
Enable/Disable product logo locations
Must be one of: true, false, 1, 0
product[enable_decoration_methods]
optional , nil allowed
Enabled/Disable product decoration methods
Must be one of: true, false, 1, 0

Update product

Update a specific product based on the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/579?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "product": {
    "name": "Dark Chocolate"
  }
}
EOF

The above request returns JSON structured like this:

{
  "name": "Dark Chocolate",
  "sku": "choc-1",
  "sku_separator": "-",
  "internal_id": "431234",
  "base_price": "10",
  "retail_price": "10",
  "cost": "10",
  "setup_charge": "10",
  "minimum_order_quantity": 10,
  "maximum_order_quantity": 20,
  "weight": "10",
  "width": "10",
  "height": "10",
  "length": "10",
  "shipping_modifier": "10",
  "meta_title": "choco",
  "meta_description": "tasty choco",
  "meta_keywords": "tasty chocolate wonka",
  "custom_url": "chocolate",
  "description": "Very Tasty Dark Chocolate",
  "active": true,
  "featured": false,
  "tax_exempt": false,
  "shipping_exempt": false,
  "categories": [
    {
      "id": 123,
      "name": "Chocolates"
    }
  ],
  "vendors": [
    {
      "id": 234,
      "name": "The Willy Wonka Company"
    }
  ],
  "options": [
    {
      "id": 301559,
      "name": "size",
      "friendly_name": "Size",
      "option_type": "size",
      "price_modifier_type": "$",
      "show_in_inventory": true,
      "show_as_thumbs": false,
      "include_in_images": false,
      "required": true,
      "multiple_quantity": true,
      "position": 2
    }
  ],
  "sub_options": [
    {
      "id": 1393159,
      "name": "Green",
      "sub_sku": "GRN",
      "price_modifier": "0.0",
      "image_src": null,
      "position": 0,
      "product_option_id": 301559
    }
  ],
  "inventories": [
    {
      "id": 774,
      "inventory": 23,
      "trigger": 6,
      "track": false,
      "allow_negative": false,
      "sub_sku": "GRN",
      "sub_option_ids": [
        1393159
      ]
    }
  ],
  "enable_quantity_discount": false,
  "related_products_type": "auto",
  "enable_related_products": false,
  "enable_product_personalization": false,
  "enable_inventory": false,
  "enable_logo_locations": false,
  "enable_decoration_methods": false,
  "primary_category_id": 36,
  "tax_code": "12345",
  "created_at": "2016-03-29T22:53:03-06:00",
  "updated_at": "2016-03-29T22:53:03-06:00"
}

HTTP Request

PUT /api/v2.1.0/products/:id

Query Parameters

Parameter Description
id
required
Product ID
Must be a number

JSON Payload Parameters

Parameter Description
product
required
Must be a Hash
product[name]
optional
Product name
Must be a String
product[sku]
optional
Unique sku
Must be a String
product[sku_separator]
optional
SKU separator
Must be a String
product[internal_id]
optional , nil allowed
Internal ID
Must be a String
product[base_price]
optional
Base price ($)
Must be a float
product[retail_price]
optional , nil allowed
Retail price ($)
Must be a float
product[cost]
optional , nil allowed
Cost ($)
Must be a float
product[setup_charge]
optional , nil allowed
Setup charge ($)
Must be a float
product[minimum_order_quantity]
optional , nil allowed
Minimum Order Quantity
Must be a number
product[maximum_order_quantity]
optional , nil allowed
Maximum Order Quantity
Must be a number
product[tax_code]
optional , nil allowed
Product tax code
Must be a String
product[primary_category_id]
optional , nil allowed
ID of primary category
Must be a number
product[weight]
optional , nil allowed
Weight (lbs)
Must be a float
product[width]
optional , nil allowed
Width (in)
Must be a float
product[height]
optional , nil allowed
Height (in)
Must be a float
product[length]
optional , nil allowed
Length (in)
Must be a float
product[shipping_modifier]
optional , nil allowed
Shipping modifier ($)
Must be a float
product[meta_title]
optional , nil allowed
Custom title for search engine optimization (SEO)
Must be a String
product[meta_description]
optional , nil allowed
Description for SEO
Must be a String
product[meta_keywords]
optional , nil allowed
Keywords for SEO
Must be a String
product[custom_url]
optional , nil allowed
Custom URL
Must be a String
product[description]
optional , nil allowed
Product description
Must be a String
product[category_ids]
optional , nil allowed
Category IDs
Must be an Array of Integer
product[vendor_ids]
optional , nil allowed
Vendor IDs
Must be an Array of Integer
product[active]
optional , nil allowed
Active product
Must be one of: true, false, 1, 0
product[featured]
optional , nil allowed
Featured product
Must be one of: true, false, 1, 0
product[tax_exempt]
optional , nil allowed
Tax exempt
Must be one of: true, false, 1, 0
product[shipping_exempt]
optional , nil allowed
Shipping exempt
Must be one of: true, false, 1, 0
product[enable_quantity_discount]
optional , nil allowed
Enable/Disable quantity discounts
Must be one of: true, false, 1, 0
product[related_products_type]
optional , nil allowed
Related products type
Must be one of: auto, custom
product[enable_related_products]
optional , nil allowed
Enable/Disable related products
Must be one of: true, false, 1, 0
product[enable_product_personalization]
optional , nil allowed
Enable/Disable product personalization
Must be one of: true, false, 1, 0
product[enable_inventory]
optional , nil allowed
Enable/Disable inventory
Must be one of: true, false, 1, 0
product[enable_product_options]
optional , nil allowed
Enable/Disable product Options
Must be one of: true, false, 1, 0
product[enable_logo_locations]
optional , nil allowed
Enable/Disable product logo locations
Must be one of: true, false, 1, 0
product[enable_decoration_methods]
optional , nil allowed
Enabled/Disable product decoration methods
Must be one of: true, false, 1, 0

Delete product

Delete a specific product from the store based on the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/products/579?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "name": "Dark Chocolate",
  "sku": "choc-1",
  "sku_separator": "-",
  "internal_id": "431234",
  "base_price": "10",
  "retail_price": "10",
  "cost": "10",
  "setup_charge": "10",
  "minimum_order_quantity": 10,
  "maximum_order_quantity": 20,
  "weight": "10",
  "width": "10",
  "height": "10",
  "length": "10",
  "shipping_modifier": "10",
  "meta_title": "choco",
  "meta_description": "tasty choco",
  "meta_keywords": "tasty chocolate wonka",
  "custom_url": "chocolate",
  "description": "Very Tasty Dark Chocolate",
  "active": true,
  "featured": false,
  "tax_exempt": false,
  "shipping_exempt": false,
  "categories": [
    {
      "id": 123,
      "name": "Chocolates"
    }
  ],
  "vendors": [
    {
      "id": 234,
      "name": "The Willy Wonka Company"
    }
  ],
  "options": [
    {
      "id": 301559,
      "name": "size",
      "friendly_name": "Size",
      "option_type": "size",
      "price_modifier_type": "$",
      "show_in_inventory": true,
      "show_as_thumbs": false,
      "include_in_images": false,
      "required": true,
      "multiple_quantity": true,
      "position": 2
    }
  ],
  "sub_options": [
    {
      "id": 1393159,
      "name": "Green",
      "sub_sku": "GRN",
      "price_modifier": "0.0",
      "image_src": null,
      "position": 0,
      "product_option_id": 301559
    }
  ],
  "inventories": [
    {
      "id": 774,
      "inventory": 23,
      "trigger": 6,
      "track": false,
      "allow_negative": false,
      "sub_sku": "GRN",
      "sub_option_ids": [
        1393159
      ]
    }
  ],
  "enable_quantity_discount": false,
  "related_products_type": "auto",
  "enable_related_products": false,
  "enable_product_personalization": false,
  "enable_inventory": false,
  "enable_logo_locations": false,
  "enable_decoration_methods": false,
  "primary_category_id": 36,
  "tax_code": "12345",
  "created_at": "2016-03-29T22:53:03-06:00",
  "updated_at": "2016-03-29T22:53:03-06:00"
}

HTTP Request

DELETE /api/v2.1.0/products/:id

Query Parameters

Parameter Description
id
required
Product ID
Must be a number

Quantity discounts

List quantity discounts

List all quantity discounts under a specific product based on the product ID you supply.

 GET https://subdomain.mybrightsites.com/api/v2.1.0/products/1/quantity_discounts?token=GXzAxWkkyYLsESGQTU15

The above request returns JSON structured like this:

 { "enabled": true, "type": "fixed_price", "quantity_discounts": [ { "id": 579, "quantity": 5, "modifier": 1000.0 }, { "id": 580, "quantity": 10, "modifier": 990.0 }, { "id": 581, "quantity": 100, "modifier": 900.0 } ] }

HTTP Request

GET /api/v2.1.0/products/:product_id/quantity_discounts

Parameter Description
product_id
required
Product ID
Must be a number

Show quantity discount

Show you a specific quantity discount for a product based on the quantity discount ID you supply.

 GET https://subdomain.mybrightsites.com/api/v2.1.0/products/1/quantity_discounts/579?token=GXzAxWkkyYLsESGQTU15

The above request returns JSON structured like this:

 { "id": 579, "quantity": 10, "modifier": 990.0 }

HTTP Request

GET /api/v2.1.0/products/:product_id/quantity_discounts/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Quantity discount ID
Must be a number

Create quantity discount

Create a new quantity discount for a specific product based on the product ID you supply.

 POST https://subdomain.mybrightsites.com/api/v2.1.0/products/1/quantity_discounts?token=GXzAxWkkyYLsESGQTU15 { "quantity_discount": { "quantity": 10, "modifier": 990.0 } }

The above request returns JSON structured like this:

 { "id": 581, "quantity": 10, "modifier": 990.0 }

HTTP Request

POST /api/v2.1.0/products/:product_id/quantity_discounts

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

JSON Payload Parameters

Parameter Description
quantity_discount
required
Must be a Hash
quantity_discount[quantity]
required
Quantity
Must be a number
quantity_discount[modifier]
required
Base price / Discount percentage
Must be a float

Update quantity discount

Update information for a specific quantity discount on a product based on the quantity discount ID you supply.

 PUT https://subdomain.mybrightsites.com/api/v2.1.0/products/1/quantity_discounts/579?token=GXzAxWkkyYLsESGQTU15 { "quantity_discount": { "modifier": 980.0 } }

The above request returns JSON structured like this:

 { "id": 579, "quantity": 10, "modifier": 980.0 }

HTTP Request

PUT /api/v2.1.0/products/:product_id/quantity_discounts/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Quantity discount ID
Must be a number

JSON Payload Parameters

Parameter Description
quantity_discount
required
Must be a Hash
quantity_discount[quantity]
required
Quantity
Must be a number
quantity_discount[modifier]
required
Base price / Discount percentage
Must be a float

Delete quantity discount

Delete a specific quantity discount on a product based on the quantity discount ID you supply.

 DELETE https://subdomain.mybrightsites.com/api/v2.1.0/products/1/quantity_discounts/579?token=GXzAxWkkyYLsESGQTU15

The above request returns JSON structured like this:

 { "id": 579, "quantity": 10, "modifier": 980.0 }

HTTP Request

DELETE /api/v2.1.0/products/:product_id/quantity_discounts/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Quantity discount ID
Must be a number

Related products

List you all related products for a specific item based on the product ID you supply. Keep in mind, the response will return up to 500 records on a single page and you will need to use "per_page" and "page" URL parameters to see all the records.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/product/:product_id/related_products?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "enabled": true,
  "type": "custom",
  "related_products": [
    {
      "id": 1,
      "name": "product",
      "sku": "SKU"
    }
  ],
  "meta": {
    "total": 1,
    "offset": 0,
    "limit": 0
  }
}

HTTP Request

GET /api/api/v2.1.0/products/:product_id/related_products

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number

JSON Payload Parameters

Parameter Description
page
optional
Pagination page number
Must be a number
per_page
optional
Pagination per page number
Must be a number

Add a custom related product to a specific item based on the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/product/1/related_products/579?token=GXzAxWkkyYLsESGQTU15" \
  -X POST

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "product1",
  "sku": "sku1"
}

HTTP Request

POST /api/api/v2.1.0/product/:product_id/related_products/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Related product ID
Must be a number

Remove a custom related product from a specific item based on the product ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/product/1/related_products/579?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "product1",
  "sku": "sku1"
}

HTTP Request

DELETE /api/api/v2.1.0/product/:product_id/related_products/:id

Query Parameters

Parameter Description
product_id
required
Product ID
Must be a number
id
required
Related product ID
Must be a number

Shipping Methods

List shipping methods

List all shipping methods in the store.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/shipping_methods?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "shipping_methods": [
    "Ground",
    "FedEx 1 Day Freight",
    "FedEx 2 Day",
    "FedEx 2 Day Freight",
    "FedEx 3 Day Freight",
    "International Economy Freight",
    "International First",
    "International Ground",
    "International Priority",
    "International Priority Freight",
    "UPS Ground",
    "UPS Next Day Air",
    "UPS Next Day Air Early A.M.",
    "UPS Second Day Air",
    "No Shipping Method"
  ]
}

HTTP Request

GET /api/v2.1.0/shipping_methods

User auth tokens

Generate authentication token for a user

Generate a login token for the shopper to sign in directly onto the website without a username or password. The token is generated based on the username being passed in the JSON parameters. This API end-point involves an SSO functionality and configuration, therefore it requires an agreement with our sales team.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/user_auth_tokens?token=GXzAxWkkyYLsESGQTU15" \
  -X POST
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "username": "foouser"
}
EOF

The above request returns JSON structured like this:

{
  "login_url": "https://subdomain.mybrightsites.com/account/token_auth?token=62BMxzbhY9GFpETFwzeu"
}

HTTP Request

POST /api/v2.1.0/user_auth_tokens

JSON Payload Parameters

Parameter Description
username
required
Username
Must be a String

Users

List users

List all users in the store. Keep in mind, the response will return up to 500 records on a single page and you will need to use "per_page" and "page" URL parameters to see all the records.

curl "https://subdomain.bsites-staging.com/api/v2.1.0/users?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "users": [
    {
      "id": 579,
      "name": "John Doe",
      "username": "johndoe",
      "balance": "12.5",
      "active": true,
      "creation_date": "2015-11-22T10:00:00-06:00",
      "last_edited_date": "2016-07-01T22:53:03-06:00"
    }
  ],
  "meta": {
    "total": 1,
    "offset": 0,
    "limit": 0
  }
}

HTTP Request

GET /api/v2.1.0/users

Query Parameters

Parameter Description
groups
optional
Filter by groups
Must be one of: Array, String
date_created_from
optional
Filter by date created from
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
date_created_to
optional
Filter by date created to
Valid format is ISO 8601, e.g. “YYYY-MM-DDThh:mm:ss”. You can provide a time-zone when using this parameter. If no time-zone is provided, then UTC will be used by default.
username
optional
Filter by username
Must be a String
active
optional
Filter by active/inactive users
Must be one of: true, false, 1, 0
page
optional
Pagination page number
Must be a number
per_page
optional
Pagination per page number
Must be a number

Show user

Show you the specific information for a user account based on the user ID you supply.

curl "https://subdomain.bsites-staging.com/api/v2.1.0/users/579?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 579,
  "username": "johndoe",
  "first_name": "John",
  "last_name": "Doe",
  "active": true,
  "confirmed": true,
  "email": "johndoe@email.com",
  "timezone": "America/Denver",
  "phone": "+1234567890",
  "company": "BSI",
  "title": "Support Leader",
  "groups": ["Public"],
  "balance": "12.5",
  "orders": [],
  "creation_date": "2015-11-22T10:00:00-06:00",
  "last_edited_date": "2016-07-01T22:53:03-06:00",
  "enable_sms_notifications": true
}

HTTP Request

GET /api/v2.1.0/users/:id

Query Parameters

Parameter Description
id
required
User ID
Must be a number

Create user

Create a brand new user account in the store.

curl "https://subdomain.bsites-staging.com/api/v2.1.0/users?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "user": {
    "username": "johndoe",
    "first_name":"John",
    "last_name":"Doe",
    "active":true,
    "email":"johndoe@email.com",
    "timezone": "America/Denver",
    "phone":"+1234567890",
    "company":"BSI",
    "title":"Support Leader",
    "groups":["Public"],
    "balance":12.5,
    "password":"12345678",
    "enable_sms_notifications":true,
    "cuf_1": "helloworld",
    "dont_send_confirmation_email":false,
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 579,
  "username": "johndoe",
  "first_name": "John",
  "last_name": "Doe",
  "active": true,
  "confirmed": true,
  "email": "johndoe@email.com",
  "timezone": "America/Denver",
  "phone": "+1234567890",
  "company": "BSI",
  "title": "Support Leader",
  "groups": ["Public"],
  "balance": "12.5",
  "orders": [],
  "creation_date": "2015-11-22T10:00:00-06:00",
  "last_edited_date": "2016-07-01T22:53:03-06:00",
  "enable_sms_notifications": true,
  "cuf_1": "helloworld"
}

HTTP Request

POST /api/v2.1.0/users

JSON Payload Parameters

Parameter Description
user
required
Must be a Hash
user[username]
required
Unique username
Must be a String
user[first_name]
required
First name
Must be a String
user[last_name]
required
Last name
Must be a String
user[email]
required
Email
Must be a String
user[timezone]
optional
Time zone
Must be a String. If no Time zone is set, it will default to America/Denver.
user[phone]
optional , nil allowed
Phone number
Must be a String
user[company]
optional , nil allowed
Company
Must be a String
user[title]
optional , nil allowed
Title
Must be a String
user[groups]
optional , nil allowed
Assign groups
Must be an array of String
user[balance]
optional , nil allowed
Balance
Must be a float
user[note]
optional , nil allowed
Create comment
Must be a String
user[password]
optional , nil allowed
Password
Must be a String
user[enable_sms_notifications]
optional
SMS Notification
Must be one of: true, false, 1, 0
user[cuf_]
optional , nil allowed
Custom User Field
Must be a String
user[dont_send_confirmation_email]
optional
Don't send user confirmation email
Must be one of: true, false, 1, 0
Only valid if no password is sent. If a password is sent it will be ignored. If there's no password and the field is set to true, the initial confirmation email is not sent

Update user

Update information for a specific user account based on the user ID you supply.

curl "https://subdomain.bsites-staging.com/api/v2.1.0/users/579?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "user": {
    "username": "johndoe",
    "first_name":"John",
    "last_name":"Doe",
    "active":true,
    "email":"johndoe@email.com",
    "timezone": "America/Denver",
    "phone":"+1234567890",
    "company":"BSI",
    "title":"Support Leader",
    "groups":["Public"],
    "balance":12.5,
    "password":"12345678",
    "enable_sms_notifications": true,
    "cuf_1": "12345678"
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 579,
  "username": "johndoe",
  "first_name": "John",
  "last_name": "Doe",
  "active": true,
  "confirmed": true,
  "email": "johndoe@email.com",
  "timezone": "America/Denver",
  "phone": "+1234567890",
  "company": "BSI",
  "title": "Support Leader",
  "groups": ["Public"],
  "balance": "12.5",
  "orders": [],
  "creation_date": "2015-11-22T10:00:00-06:00",
  "last_edited_date": "2016-07-01T22:53:03-06:00",
  "enable_sms_notifications": true,
  "cuf_1": "12345678"
}

HTTP Request

PUT /api/v2.1.0/users/:id

Query Parameters

Parameter Description
id
required
User ID
Must be a number

JSON Payload Parameters

Parameter Description
user
required
Must be a Hash
user[username]
optional
Unique username
Must be a String
user[first_name]
optional
First name
Must be a String
user[last_name]
optional
Last name
Must be a String
user[email]
optional
Email
Must be a String
user[timezone]
optional
Time zone
Must be a String. If no Time zone is set, it will default to America/Denver.
user[phone]
optional , nil allowed
Phone number
Must be a String
user[company]
optional , nil allowed
Company
Must be a String
user[title]
optional , nil allowed
Title
Must be a String
user[groups]
optional , nil allowed
Assign groups
Must be an array of String
user[balance]
optional , nil allowed
Balance
Must be a float
user[increase_balance]
optional , nil allowed
Increase Balance
Must be a float
user[decrease_balance]
optional , nil allowed
Decrease Balance
Must be a float
user[note]
optional , nil allowed
Create comment
Must be a String
user[password]
optional , nil allowed
Password
Must be a String
user[enable_sms_notifications]
optional
SMS Notification
Must be one of: true, false, 1, 0
user[cuf_]
optional , nil allowed
Custom User Field
Must be a String

Delete user

Delete a specific user account based on the user ID you supply.

curl "https://subdomain.bsites-staging.com/api/v2.1.0/users/579?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 579,
  "username": "johndoe",
  "first_name": "John",
  "last_name": "Doe",
  "active": true,
  "confirmed": true,
  "email": "johndoe@email.com",
  "timezone": "America/Denver",
  "phone": "+1234567890",
  "company": "BSI",
  "title": "Support Leader",
  "groups": [],
  "balance": "12.5",
  "orders": [],
  "creation_date": "2015-11-22T10:00:00-06:00",
  "enable_sms_notifications": true,
  "last_edited_date": "2016-07-01T22:53:03-06:00"
}

HTTP Request

DELETE /api/v2.1.0/users/:id

Query Parameters

Parameter Description
id
required
User ID
Must be a number

Vendors

List vendors

List all vendors in the store. Keep in mind, the response will return up to 500 records on a single page and you will need to use "per_page" and "page" URL parameters to see all the records.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/vendors?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "vendors": [
    {
      "id": 579,
      "name": "The Willy Wonka Company",
      "products": [
        {
          "id": 100,
          "name": "Licorice",
          "sku": "lic-1"
        }
      ],
      "active": true
    }
  ],
  "meta": {
    "total": 1,
    "offset": 0,
    "limit": 0
  }
}

HTTP Request

GET /api/v2.1.0/vendors

JSON Payload Parameters

Parameter Description
page
optional
Pagination page number
Must be a number
per_page
optional
Pagination per page number
Must be a number

Show vendor

Show you the information for a specific vendor based on the vendor ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/vendors/579?token=GXzAxWkkyYLsESGQTU15"

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "The Willy Wonka Company",
  "products": [
    {
      "id": 100,
      "name": "Licorice",
      "sku": "lic-1"
    }
  ],
  "address1": "2010 Oompa-Loompa drive",
  "address2": "",
  "city": "Sweetstown",
  "state": "Texas",
  "zip_code": "99099",
  "phone": "123123123123",
  "email": "test@test.com",
  "account_number": "account123123",
  "asi_number": "asi123456",
  "active": true
}

HTTP Request

GET /api/v2.1.0/vendors/:id

Query Parameters

Parameter Description
id
required
Vendor ID
Must be a number

Create vendor

Create a brand new vendor for a specific store.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/vendors?token=GXzAxWkkyYLsESGQTU15" \
  -X POST \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "vendor": {
    "name": "The Willy Wonka Company",
    "address1": "2010 Oompa-Loompa drive",
    "city": "Sweetstown",
    "state": "Texas",
    "zip_code": "99099",
    "phone": "123123123123",
    "email": "test@test.com",
    "account_number": "account123123"
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "The Willy Wonka Company",
  "products": [],
  "address1": "2010 Oompa-Loompa drive",
  "address2": "",
  "city": "Sweetstown",
  "state": "Texas",
  "zip_code": 99099,
  "phone": "123123123123",
  "email": "test@test.com",
  "account_number": "account123123",
  "active": true
}

HTTP Request

POST /api/v2.1.0/vendors

JSON Payload Parameters

Parameter Description
vendor
required
Must be a Hash
vendor[name]
required
Unique name
Must be a String
vendor[address1]
optional , nil allowed
First address
Must be a String
vendor[address2]
optional , nil allowed
Second address
Must be a String
vendor[city]
optional , nil allowed
City
Must be a String
vendor[state]
optional , nil allowed
State
Must be a String
vendor[zip_code]
optional , nil allowed
Zip code
Must be a String
vendor[phone]
optional , nil allowed
Phone number
Must be a String
vendor[email]
optional , nil allowed
Email address
Must be a String
vendor[account_number]
optional , nil allowed
Account number
Must be a String
vendor[asi_number]
optional , nil allowed
ASI number
Must be a String
vendor[active]
optional , nil allowed
Enable / Disable vendor
Must be one of: true, false, 1, 0

Update vendor

Update the information for a specific vendor based on the vendor ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/vendors/579?token=GXzAxWkkyYLsESGQTU15" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{
  "vendor": {
    "name": "The Willy Wonka Great Company",
  }
}
EOF

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "The Willy Wonka Great Company",
  "products": [
    {
      "id": 100,
      "name": "Licorice",
      "sku": "lic-1"
    }
  ],
  "address1": "2010 Oompa-Loompa drive",
  "address2": "",
  "city": "Sweetstown",
  "state": "Texas",
  "zip_code": "99099",
  "phone": "123123123123",
  "email": "test@test.com",
  "account_number": "account123123",
  "active": true
}

HTTP Request

PUT /api/v2.1.0/vendors/:id

Query Parameters

Parameter Description
id
required
Vendor ID
Must be a number

JSON Payload Parameters

Parameter Description
vendor
required
Must be a Hash
vendor[name]
optional
Unique name
Must be a String
vendor[address1]
optional , nil allowed
First address
Must be a String
vendor[address2]
optional , nil allowed
Second address
Must be a String
vendor[city]
optional , nil allowed
City
Must be a String
vendor[state]
optional , nil allowed
State
Must be a String
vendor[zip_code]
optional , nil allowed
Zip code
Must be a String
vendor[phone]
optional , nil allowed
Phone number
Must be a String
vendor[email]
optional , nil allowed
Email address
Must be a String
vendor[account_number]
optional , nil allowed
Account number
Must be a String
vendor[asi_number]
optional , nil allowed
ASI number
Must be a String
vendor[active]
optional , nil allowed
Enable / Disable vendor
Must be one of: true, false, 1, 0

Delete vendor

Delete a specific vendor from your store based on the vendor ID you supply.

curl "https://subdomain.mybrightsites.com/api/v2.1.0/vendors/579?token=GXzAxWkkyYLsESGQTU15" \
  -X DELETE

The above request returns JSON structured like this:

{
  "id": 579,
  "name": "The Willy Wonka Great Company",
  "products": [
    {
      "id": 100,
      "name": "Licorice",
      "sku": "lic-1"
    }
  ],
  "address1": "2010 Oompa-Loompa drive",
  "address2": "",
  "city": "Sweetstown",
  "state": "Texas",
  "zip_code": "99099",
  "phone": "123123123123",
  "email": "test@test.com",
  "account_number": "account123123",
  "active": true
}

HTTP Request

DELETE /api/v2.1.0/vendors/:id

Query Parameters

Parameter Description
id
required
Vendor ID
Must be a number

Changelog

2.1.0

Changes 2.1.0:

/api/v2.1.0/users/:id

{
  "user": {
    "username": "johndoe",
    "first_name": "John",
    "last_name": "Doe",
    "active": true,
    "email": "johndoe@email.com",
+   "timezone": "America/Denver",
    "phone": "+1234567890",
    "company": "BSI",
    "title": "Support Leader",
    "groups": [
      "Public"
    ],
    "balance": 12.5,
    "password": "12345678",
    "enable_sms_notifications": true,
    "cuf_1": "helloworld",
    "dont_send_confirmation_email": true
  }
}
  1. Added timezone to users json

Affected APIs:

2.0.0

Changes 2.0.0:

/api/v2.0.0/inventories (new)

+ {
+   "inventories": [
+     {
+       "product_id": 44371,
+       "product_name": "District Made - Ladies Dip Dye Rounded Deep V-Neck Tee",
+       "internal_id": "",
+       "sku": "DM4310",
+       "final_sku": "DM4310-XXS-Blk",
+       "id": 2871,
+       "inventory": 999,
+       "trigger": 6,
+       "track": true,
+       "allow_negative": true,
+       "sub_option_ids": [
+         734290,
+         734297
+       ],
+       "sub_sku": "XXS-Blk"
+     }
+   ]
+ }

/api/v2.0.0/products

{
  "products": [
    {
      "id": 579,
      "name": "Chocalate",
      "sku": "choc-1",
      "internal_id": "431234",
      "categories": [
        {
          "id": 123,
          "name": "Chocolates"
        }
      ],
      "vendors": [
        {
          "id": 234,
          "name": "The Willy Wonka Company"
        }
      ],
      "active": true,
-     "last_edited_date": "2016-03-29T22:53:03-06:00",
+     "created_at": "2016-03-29T22:53:03-06:00",
+     "updated_at": "2016-03-29T22:53:03-06:00"
    }
  ],
  "meta": {
    "total": 1,
    "offset": 0,
    "limit": 0
  }
}

/api/v2.0.0/products/:id

{
  "name": "Chocolate",
  "sku": "choc-1",
  "sku_separator": "-",
  "internal_id": "431234",
  "base_price": "10",
  "retail_price": "10",
  "cost": "10",
  "setup_charge": "10",
  "minimum_order_quantity": 10,
  "maximum_order_quantity": 20,
  "weight": "10",
  "width": "10",
  "height": "10",
  "length": "10",
  "shipping_modifier": "10",
  "meta_title": "choco",
  "meta_description": "tasty choco",
  "meta_keywords": "tasty chocolate wonka",
  "custom_url": "chocolate",
  "description": "Very Tasty Dark Chocolate",
  "active": true,
  "featured": false,
  "tax_exempt": false,
  "shipping_exempt": false,
  "categories": [
    {
      "id": 123,
      "name": "Chocolates"
    }
  ],
  "vendors": [
    {
      "id": 234,
      "name": "The Willy Wonka Company"
    }
  ],
+ "options": [
+   {
+     "id": 301559,
+     "name": "size",
+     "friendly_name": "Size",
+     "option_type": "size",
+     "price_modifier_type": "$",
+     "show_in_inventory": true,
+     "show_as_thumbs": false,
+     "include_in_images": false,
+     "required": true,
+     "multiple_quantity": true,
+     "position": 2
+   }
+ ],
+ "sub_options": [
+   {
+     "id": 1393159,
+     "name": "Green",
+     "sub_sku": "CLRGRN",
+     "price_modifier": "0.0",
+     "image_src": null,
+     "position": 0,
+     "product_option_id": 301559
+   }
+ ],
+ "inventories": [
+   {
+     "id": 774,
+     "inventory": 23,
+     "trigger": 6,
+     "track": false,
+     "allow_negative": false,
+     "sub_sku": "GRN",
+     "sub_option_ids": [
+       1393159
+     ]
+   }
+ ],
  "enable_quantity_discount": false,
  "related_products_type": "auto",
  "enable_related_products": false,
  "enable_product_personalization": false,
  "enable_inventory": false,
  "enable_logo_locations": false,
  "enable_decoration_methods": false,
  "primary_category_id": 36,
  "created_at": "2016-03-29T22:53:03-06:00",
  "updated_at": "2016-03-29T22:53:03-06:00",
  "tax_code": "12345"
}

GET /api/v2.0.0/orders

{
  "orders": [
    {
      "order_id": 1,
      "shipping_method": "Best Way",
      "tracking": "12234tracking2123",
-     "date": "2015-08-28T08:34:37-06:00",
+     "updated_at": "2015-08-28T08:34:37-06:00",
+     "created_at": "2015-08-27T08:30:10-06:00",
      "status": "new",
      "customer": "test@johndoe.com"
    }
  ],
  "meta": {
    "total": 1,
    "offset": 0,
    "limit": 0
  }
}

/api/v2.0.0/orders/:id

{
  "order_id": 249,
  "custom_data_collections": [],
  "customer_email": "helloworld1231@email.com",
  "customer_id": 1624,
  "username": "helloworld1231",
  "item_total": "10.0",
  "grand_total": "43.32",
  "required_adjustments": [
    {
      "amount": "30.0",
      "modifier_type": "$",
      "note": "shipment"
    },
    {
      "amount": "3.32",
      "modifier_type": "$",
      "note": "sales tax"
    }
  ],
  "balance_adjustments": [],
  "payment": {
    "id": 6164,
    "authorization": null,
    "created_at": "2019-03-25T19:59:21.000-06:00",
    "amount": "43.32",
    "state": "completed",
    "details": {
      "method": "Custom payment",
      "custom method name": "No Pay1",
      "details": "",
      "amount": "$43.32"
    }
  },
  "status": "moas_pending",
- "date": "2019-03-25T19:59:28.000-06:00",
+ "created_at": "2019-03-25T19:59:28.000-06:00",
+ "updated_at": "2019-03-25T20:30:28.000-06:00",
  "site_id": 178,
  "site_name": "Testing & Site1",
  "site_url": "http://bestsiteever.lvh.me:3000",
  "organization_name": "Jurassic Deployment",
  "organization_id": 49,
  "custom_store_id": "test custom store id",
  "shipping_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "helloworld1231@email.com",
    "phone": "12345678"
  },
  "shipping_address": {
    "company": "",
    "first_address": "1437 Larimer Street1",
    "second_address": "32",
    "city": "Denver1",
    "state": "Colorado",
    "country": "United States",
    "zip": "80202"
  },
  "billing_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "helloworld1231@email.com",
    "phone": "12345678"
  },
  "billing_address": {
    "company": "",
    "first_address": "1437 Larimer Street1",
    "second_address": "32",
    "city": "Denver1",
    "state": "Colorado",
    "country": "United States",
    "zip": "80202"
  },
  "shipment": {
    "tracking_number": "12341234",
    "created_at": "2019-03-25T19:59:04.000-06:00",
    "ship_date": "2019-09-19",
    "in_hands_date": null,
    "shipping_method": "FedEx 2 Day Freight",
    "cost": "30.0"
  },
  "payments": [
    {
      "id": 6164,
      "authorization": null,
      "created_at": "2019-03-25T19:59:21.000-06:00",
      "amount": "43.32",
      "state": "completed",
      "details": {
        "method": "Custom payment",
        "custom method name": "No Pay1",
        "details": "",
        "amount": "$43.32"
      }
    }
  ],
  "line_items": [
    {
      "id": 10176,
      "name": "logo1",
      "final_sku": "l1",
      "quantity": 1,
      "product_price": "10.0",
      "options_price": "0.0",
      "total_price": "10.0",
      "tax_price": null,
      "unit_price": "10.0",
      "pdf_status": "not_available",
      "pdf_file_url": null,
      "product_id": 44429,
      "final_internal_id": null,
      "tax_code": "",
      "product_options": [
        {
          "option_name": "Size",
          "sub_option_name": "Small",
          "option_type": "size",
          "option_id": 85557,
          "sub_option_id": 734144
        }
      ],
      "logos": [
        {
          "name": "test1",
          "charge": null,
          "image_url": "/uploads/website/line_item_logo/image/03-25-2019/838/t-shirt.png",
          "supplier_id": null,
          "location": null,
          "decoration": null
        }
      ],
      "product_personalizations": [],
      "decoration_method": null,
      "gift_certificate": null,
      "vendors": [
        {
          "id": 1342,
          "name": "Leeds",
          "address1": null,
          "address2": null,
          "city": null,
          "state": null,
          "zip_code": null,
          "phone": null,
          "email": null,
          "account_number": null,
          "asi_number": null
        }
      ]
    }
  ],
  "coupons_adjustments": [],
  "custom_adjustments": [],
  "notes": [],
  "shipments": [
    {
      "id": 14,
      "tracking_number": "12341",
      "ship_date": null,
      "note": "",
      "shipping_method": "FedEx 2 Day Freight",
      "line_items": [
        {
          "id": 10176,
          "quantity": 1
        }
      ]
    },
    {
      "id": 32,
      "tracking_number": null,
      "ship_date": null,
      "note": null,
      "shipping_method": "FedEx 2 Day Freight",
      "line_items": [
        {
          "id": 10176,
          "quantity": 1
        }
      ]
    }
  ]
}

POST /api/v2.0.0/users

{
  "user": {
    "username": "johndoe",
    "first_name": "John",
    "last_name": "Doe",
    "active": true,
    "email": "johndoe@email.com",
    "phone": "+1234567890",
    "company": "BSI",
    "title": "Support Leader",
    "groups": [
      "Public"
    ],
    "balance": 12.5,
    "password": "12345678",
    "enable_sms_notifications": true,
    "cuf_1": "helloworld",
+   "dont_send_confirmation_email": true
  }
}

All endpoints

Starting with v2.0.0 we're using UTC as the default time zone.

/api/v2.0.0/inventories

  1. Added Inventories
  2. per_page query parameter is limited to a maximum of 500 records per page for Inventories

/api/v2.0.0/products

  1. Added created_at to List products json
  2. Field last_edited_date renamed to updated_at in List products json for a better consistency
  3. Added updated_at and created_at filters to query parameters for List products

/api/v2.0.0/products/:id

  1. Added options, sub_options, inventories, created_at to Show product json
  2. Field last_edited_date renamed to updated_at in Show product json for a better consistency

/api/v2.0.0/orders

  1. Added updated_at to List orders json
  2. Field date renamed to created_at in List orders json for a better consistency
  3. Added updated_at and created_at filters to query parameters for List orders

/api/v2.0.0/orders/:id

  1. Added updated_at to Show order json
  2. Field date renamed to created_at in Show order json for a better consistency

/api/v2.0.0/users

  1. Added dont_send_confirmation_email option support to Create user API. This field is only valid if no password is sent. If a password is sent it will be ignored. If there's no password and the field is set to true, the initial confirmation email is not sent.

1.1.7

Changes 1.1.7:

/api/v1.1.7/products/:id

{
  "name": "Chocolate",
  "sku": "choc-1",
+ "sku_separator": "-",
  "internal_id": "431234",
  "base_price": "10",
  "retail_price": "10",
  "cost": "10",
  "setup_charge": "10",
  "minimum_order_quantity": 10,
  "maximum_order_quantity": 20,
  "weight": "10",
  "width": "10",
  "height": "10",
  "length": "10",
  "shipping_modifier": "10",
  "meta_title": "choco",
  "meta_description": "tasty choco",
  "meta_keywords": "tasty chocolate wonka",
  "custom_url": "chocolate",
  "description": "Very Tasty Dark Chocolate",
  "active": true,
  "featured": false,
  "tax_exempt": false,
  "shipping_exempt": false,
  "categories": [
    {
      "id": 123,
      "name": "Chocolates"
    }
  ],
  "vendors": [
    {
      "id": 234,
      "name": "The Willy Wonka Company"
    }
  ],
  "enable_quantity_discount": false,
  "related_products_type": "auto",
  "enable_related_products": false,
  "enable_product_personalization": false,
  "enable_inventory": false,
  "enable_logo_locations": false,
  "enable_decoration_methods": false,
  "primary_category_id": 36,
  "last_edited_date": "2016-03-29T22:53:03-06:00",
  "tax_code": "12345"
}
  1. Added sku_separator to product json

Affected APIs:

1.1.6

Changes 1.1.6:

/api/v1.1.6/orders/:id

{
  "order_id": 249,
  "custom_data_collections": [],
  "customer_email": "helloworld1231@email.com",
  "customer_id": 1624,
  "username": "helloworld1231",
  "item_total": "10.0",
  "grand_total": "43.32",
  "required_adjustments": [
    {
      "amount": "30.0",
      "modifier_type": "$",
      "note": "shipment"
    },
    {
      "amount": "3.32",
      "modifier_type": "$",
      "note": "sales tax"
    }
  ],
  "balance_adjustments": [],
  "payment": {
    "id": 6164,
    "authorization": null,
    "created_at": "2019-03-25T19:59:21.000-06:00",
    "amount": "43.32",
    "state": "completed",
    "details": {
      "method": "Custom payment",
      "custom method name": "No Pay1",
      "details": "",
      "amount": "$43.32"
    }
  },
  "status": "moas_pending",
  "date": "2019-03-25T19:59:28.000-06:00",
  "site_id": 178,
  "site_name": "Testing & Site1",
  "site_url": "http://bestsiteever.lvh.me:3000",
  "organization_name": "Jurassic Deployment",
  "organization_id": 49,
  "custom_store_id": "test custom store id",
  "shipping_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "helloworld1231@email.com",
    "phone": "12345678"
  },
  "shipping_address": {
    "company": "",
    "first_address": "1437 Larimer Street1",
    "second_address": "32",
    "city": "Denver1",
    "state": "Colorado",
    "country": "United States",
    "zip": "80202"
  },
  "billing_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "helloworld1231@email.com",
    "phone": "12345678"
  },
  "billing_address": {
    "company": "",
    "first_address": "1437 Larimer Street1",
    "second_address": "32",
    "city": "Denver1",
    "state": "Colorado",
    "country": "United States",
    "zip": "80202"
  },
  "shipment": {
    "tracking_number": "12341234",
    "created_at": "2019-03-25T19:59:04.000-06:00",
    "ship_date": "2019-09-19",
    "in_hands_date": null,
    "shipping_method": "FedEx 2 Day Freight",
    "cost": "30.0"
  },
  "payments": [
    {
      "id": 6164,
      "authorization": null,
      "created_at": "2019-03-25T19:59:21.000-06:00",
      "amount": "43.32",
      "state": "completed",
      "details": {
        "method": "Custom payment",
        "custom method name": "No Pay1",
        "details": "",
        "amount": "$43.32"
      }
    }
  ],
  "line_items": [
    {
      "id": 10176,
      "name": "logo1",
      "final_sku": "l1",
      "quantity": 1,
      "product_price": "10.0",
      "options_price": "0.0",
      "total_price": "10.0",
      "tax_price": null,
      "unit_price": "10.0",
      "pdf_status": "not_available",
      "pdf_file_url": null,
      "product_id": 44429,
      "final_internal_id": null,
      "tax_code": "",
      "product_options": [
        {
          "option_name": "Size",
          "sub_option_name": "Small",
          "option_type": "size",
          "option_id": 85557,
          "sub_option_id": 734144
        }
      ],
      "logos": [
        {
          "name": "test1",
          "charge": null,
          "image_url": "/uploads/website/line_item_logo/image/03-25-2019/838/t-shirt.png",
          "supplier_id": null,
          "location": null,
          "decoration": null
        }
      ],
      "product_personalizations": [],
      "split_items": [],
      "decoration_method": null,
      "gift_certificate": null,
      "vendors": [
        {
          "id": 1342,
          "name": "Leeds",
          "address1": null,
          "address2": null,
          "city": null,
          "state": null,
          "zip_code": null,
          "phone": null,
          "email": null,
          "account_number": null,
          "asi_number": null
        }
      ]
    }
  ],
  "coupons_adjustments": [],
  "custom_adjustments": [],
  "notes": [],
+ "shipments": [
+   {
+     "id": 14,
+     "tracking_number": "12341",
+     "ship_date": null,
+     "note": "",
+     "shipping_method": "FedEx 2 Day Freight",
+     "line_items": [
+       {
+         "id": 10176,
+         "quantity": 1
+       }
+     ]
+   },
+   {
+     "id": 32,
+     "tracking_number": null,
+     "ship_date": null,
+     "note": null,
+     "shipping_method": "FedEx 2 Day Freight",
+     "line_items": [
+       {
+         "id": 10176,
+         "quantity": 1
+       }
+     ]
+   }
+ ]
}

/api/v1.1.6/orders/:order_id/shipments (new)

+ {
+   "shipments": [
+     {
+       "id": 14,
+       "tracking_number": "1234123412",
+       "ship_date": "2019-10-20",
+       "note": "Lorem ipsum",
+       "shipping_method": "FedEx 2 Day Freight",
+       "line_items": [
+         {
+           "id": 1234,
+           "quantity": 1
+         }
+       ]
+     }
+   ]
+ }

/api/v1.1.6/orders/:order_id/shipping_methods (new)

+ {
+   "shipping_methods": [
+     "Ground",
+     "FedEx 1 Day Freight",
+     "FedEx 2 Day",
+     "FedEx 2 Day Freight",
+     "FedEx 3 Day Freight",
+     "International Economy Freight",
+     "International First",
+     "International Ground",
+     "International Priority",
+     "International Priority Freight",
+     "UPS Ground",
+     "UPS Next Day Air",
+     "UPS Next Day Air Early A.M.",
+     "UPS Second Day Air",
+     "No Shipping Method"
+   ]
+ }
  1. Added shipments to order json
  2. Added order shipments
  3. Added shipping methods

Affected APIs:

1.1.5

Changes 1.1.5:

/api/v1.1.5/orders/:id

{
  "order_id": 1,
  "date": "2015-08-25T05:06:36-06:00",
  "status": "new",
  "site_id": 178,
  "site_name": "my website",
  "site_url": "http://mywebsite.bsites-staging.com",
+ "custom_store_id": "mycustomstore",
  "organization_name": "Super organization",
  "organization_id": 49,
  "custom_data_collections": [],
  "customer_email": "test@johndoe.com",
  "customer_id": null,
  "username": "Guest",
  "item_total": "4703.0",
  "grand_total": "3069.15",
  "shipping_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "test@johndoe.com",
    "phone": "1234123456"
  },
  "shipping_address": {
    "first_address": "2658 East 26th Street",
    "company": "Testco LLC",
    "second_address": "John Doe",
    "city": "Brooklyn",
    "state": "New York",
    "country": "United States",
    "zip": "11235"
  },
  "billing_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "test@johndoe.com",
    "phone": "1234123456"
  },
  "billing_address": {
    "first_address": "2658 East 26th Street",
    "company": "Testco LLC",
    "second_address": "John Doe",
    "city": "Brooklyn",
    "state": "New York",
    "country": "United States",
    "zip": "11235"
  },
  "payment": {
    "id": 4305,
    "authorization": "A70A9B840C12",
    "created_at": "2016-06-23T10:19:22-06:00",
    "amount": "82.0",
    "state": "refunded",
    "details": {
      "method": "credit card",
      "card type": "Visa",
      "card": "**** **** **** 1111",
      "amount": "$82.00"
    }
  },
  "payments": [],
  "shipment": {
    "tracking_number": "12234tracking2123",
    "cost": "0.0",
    "created_at": "2015-08-25T05:06:23-06:00",
    "shipping_method": "Best Way",
    "ship_date": "2016-08-25",
    "in_hands_date": "2018-06-15"
  },
  "line_items": [],
  "coupons_adjustments": [],
  "balance_adjustments": [],
  "custom_adjustments": [],
  "required_adjustments": [],
  "notes": []
}
  1. Orders are sorted by order_id in descending order
  2. Added custom_store_id to order json

Affected APIs:

1.1.4

Changes 1.1.4:

/api/v1.1.4/products/:id

{
  "name": "Dark Chocolate",
  "sku": "choc-1",
  "internal_id": "431234",
  "base_price": "10",
  "retail_price": "10",
  "cost": "10",
  "setup_charge": "10",
  "minimum_order_quantity": 10,
  "maximum_order_quantity": 20,
- "custom_tic": "12345",
+ "tax_code": "12345",
  "weight": "10",
  "width": "10",
  "height": "10",
  "length": "10",
  "shipping_modifier": "10",
  "meta_title": "choco",
  "meta_description": "tasty choco",
  "meta_keywords": "tasty chocolate wonka",
  "custom_url": "chocolate",
  "description": "Very Tasty Dark Chocolate",
  "active": true,
  "featured": false,
  "tax_exempt": false,
  "shipping_exempt": false,
  "categories": [],
  "vendors": [],
  "enable_quantity_discount": false,
  "related_products_type": "auto",
  "enable_related_products": false,
  "enable_product_personalization": false,
  "enable_inventory": false,
  "enable_logo_locations": false,
  "enable_decoration_methods": false,
  "primary_category_id": 36,
  "last_edited_date": "2016-03-29",
}

/api/v1.1.4/vendors/:id

{
  "id": 579,
  "name": "The Willy Wonka Company",
  "products": [
    {
      "id": 100,
      "name": "Licorice",
      "sku": "lic-1"
    }
  ],
  "address1": "2010 Oompa-Loompa drive",
  "address2": "",
  "city": "Sweetstown",
  "state": "Texas",
  "zip_code": "99099",
  "phone": "123123123123",
  "email": "test@test.com",
  "account_number": "account123123",
  "asi_number": "asi123456",
  "active": true,
+ "global_vendor": false
}

/api/v1.1.4/orders/:order_id

{
  "order_id": 1,
  "date": "2015-08-25T05:06:36-06:00",
  "status": "new",
+ "site_id": 178,
+ "site_name": "my website",
+ "site_url": "http://mywebsite.bsites-staging.com",
+ "organization_name": "Super organization",
+ "organization_id": 49,
  "custom_data_collections": [],
  "customer_email": "test@johndoe.com",
  "customer_id": null,
  "username": "Guest",
  "item_total": "4703.0",
  "grand_total": "3069.15",
  "line_items": [
    {
      "name": "Product 1",
      "final_sku": "sku",
      "final_internal_id": "431234",
+     "tax_code": "12345",
      "quantity": 18,
      "product_price": "150.0",
      "options_price": "5.0",
      "total_price": "2790.0",
      "tax_price": "7.75",
      "unit_price": "155.0",
      "product_id": 10,
      "product_options": [],
      "logos": [
        {
          "name": "fedex",
          "charge": "10.0",
          "image_url": "https://assets.bsites-staging.com/uploads/website/line_item_logo/image/05-01-2018/762/fedex.png",
+         "supplier_id": "VENDOR123"
         }
      ],
+     "vendors": [
+       {
+         "id": 579,
+         "name": "The Willy Wonka Company",
+         "address1": "2010 Oompa-Loompa drive",
+         "address2": "",
+         "city": "Sweetstown",
+         "state": "Texas",
+         "zip_code": "99099",
+         "phone": "123123123123",
+         "email": "test@test.com",
+         "account_number": "account123123",
+         "asi_number": "asi123456"
+       }
+     ],
      "product_personalizations": [],
      "split_items":[],
      "decoration_method": null,
      "gift_certificate": null,
    }
  ],
  "shipping_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "test@johndoe.com",
    "phone": "1234123456"
  },
  "shipping_address": {
    "first_address": "2658 East 26th Street",
    "company": "Testco LLC",
    "second_address": "John Doe",
    "city": "Brooklyn",
    "state": "New York",
    "country": "United States",
    "zip": "11235"
  },
  "billing_contact": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "test@johndoe.com",
    "phone": "1234123456"
  },
  "billing_address": {
    "first_address": "2658 East 26th Street",
    "company": "Testco LLC",
    "second_address": "John Doe",
    "city": "Brooklyn",
    "state": "New York",
    "country": "United States",
    "zip": "11235"
  },
  "payment": {
    "id": 4305,
    "authorization": "A70A9B840C12",
    "created_at": "2016-06-23T10:19:22-06:00",
    "amount": "82.0",
    "state": "refunded",
    "details": {
      "method": "credit card",
      "card type": "Visa",
      "card": "**** **** **** 1111",
      "amount": "$82.00"
    }
  },
  "payments": [
    {
      "id": 4305,
      "authorization": "A10AA3EC513B",
      "created_at": "2016-06-23T10:19:22-06:00",
      "amount": "82.0",
      "state": "refunded",
      "details": {
        "method": "credit card",
        "card type": "Visa",
        "card": "**** **** **** 1111",
        "amount": "$82.00"
      }
    }
  ],
  "shipment": {
    "tracking_number": "12341234",
    "cost": "0.0",
    "created_at": "2015-08-25T05:06:23-06:00",
    "shipping_method": "Best Way",
    "ship_date": "2016-08-25",
    "in_hands_date": "2018-06-15"
  },
  "coupons_adjustments": [],
  "balance_adjustments": [],
  "custom_adjustments": [],
  "required_adjustments": [],
  "notes": []
}
  1. Renamed custom_tic to tax_code for products json
  2. Added tax_code to line_items json
  3. Added vendors to line_items json
  4. Added supplier_id to logos array in line_items json
  5. Added global_vendor flag to vendors json
  6. Added site_id, site_name, site_url, organization_id and organization_name to order json

Affected APIs:

1.1.3

Changes 1.1.3:

/api/v1.1.3/users/:user_id

{
  "user": {
    "id": 1642,
    "username": "johndoe+admin",
    "first_name": "John",
    "last_name": "Doe",
    "active": true,
    "confirmed": false,
    "email": "johndoe+admin@email.com",
    "phone": "+12345678",
    "company": "",
    "title": "",
    "groups": [
      "Public"
    ],
    "balance": "0.0",
    "orders": [],
    "last_edited_date": "2018-12-21T07:03:02.000-07:00",
    "creation_date": "2018-11-13T10:58:23.000-07:00",
+   "enable_sms_notifications": true,
  }
}
  1. Added enable_sms_notifications to users json

Affected APIs:

1.1.2

Changes 1.1.2:

"decoration" is a part of /api/v1.1.2/orders/:order_id


{
  "decoration": {
    "custom_text": "",
    "font": "Playfair Display",
    "size": null,
    "color": null,
    "colors": [],
+   "font_style": "bold",
+   "font_decoration": "Underline",
+   "font_modifier": "Lowercase"
  }
}

/api/v1.1.2/orders/:order_id/line_items/:line_item_id

{
  "id": 5037732,
  "name": "Gift Certificate Product Example",
  "final_sku": "GC1",
  "quantity": 1,
  "product_price": "10.0",
  "options_price": "0.0",
  "total_price": "10.0",
  "tax_price": null,
  "unit_price": "10.0",
  "pdf_status": "not_available",
  "pdf_file_url": null,
  "product_id": 329181,
  "final_internal_id": null,
  "product_options": [],
  "logos": [],
  "product_personalizations": [],
  "split_items": [],
  "decoration_method": null,
+ "gift_certificate": {
+   "first_name": "",
+   "last_name": "",
+   "email": "",
+   "message": "",
+   "expires_at": null,
+   "code": "7D70CBCB88B",
+   "amount": "10.0"
+ }
}
  1. Added font_style, font_decoration, font_modifier to decoration json
  2. Added gift_certificate to line_item json

Affected APIs: