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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.
This request will skip vendor's inventory levels and only return the store's inventory levels.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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.6.1/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.
You can't update inventory levels for a product that has a vendor's inventory enabled.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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.6.1/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.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/orders/123/line_items?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"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"
}
},
{
"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"
}
}
],
"product_personalizations": [
{
"title": "Enter Name Here",
"attributes": [
{
"key": "Name",
"value": ""
}
],
"price_modifier": {
"modifier_type": "$",
"amount": "1.99"
}
}
],
"gift_certificate": null,
"note": "Product note example"
},
{
"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": [],
"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"
},
"note": "Product note example"
}
]
}
HTTP Request
GET /api/v2.6.1/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.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/orders/1/line_items/1234?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"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"
}
},
{
"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"
}
}
],
"product_personalizations": [
{
"title": "Enter Name Here",
"attributes": [
{
"key": "Name",
"value": ""
}
],
"price_modifier": {
"modifier_type": "$",
"amount": "1.99"
}
}
],
"gift_certificate": null,
"note": "Product note example"
}
HTTP Request
GET /api/v2.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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"
}
},
{
"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"
}
}
],
"product_personalizations": [
{
"title": "Enter Name Here",
"attributes": [
{
"key": "Name",
"value": ""
}
],
"price_modifier": {
"modifier_type": "$",
"amount": "1.99"
}
}
],
"gift_certificate": null,
"note": "Product note example"
},
{
"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": [],
"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"
},
"note": "Product note example"
}
],
"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.6.1/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.6.1/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"
}
},
{
"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"
}
}
],
"product_personalizations": [
{
"title": "Enter Name Here",
"attributes": [
{
"key": "Name",
"value": ""
}
],
"price_modifier": {
"modifier_type": "$",
"amount": "1.99"
}
}
],
"note": 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.6.1/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.6.1/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.6.1/orders/:id/cancel
Query Parameters
Parameter | Description |
---|---|
id required |
Order ID Must be a number |
Origin Addresses
List origin addresses
List all origin addresses 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.6.1/origin_addresses?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"origin_addresses": [
{
"id": 1,
"nickname": "Custom Origin Address",
"first_address": "Some Address 1",
"second_address": "Some Address 2",
"city": "Denver",
"country": "United States",
"state": "Colorado",
"zip": "80202"
}
],
"meta": {
"total": 1,
"offset": 0,
"limit": 0
}
}
HTTP Request
GET /api/v2.6.1/origin_addresses
Query Parameters
Parameter | Description |
---|---|
page optional |
Pagination page number Must be a number |
per_page optional |
Pagination per page number Must be a number |
Product images
List of product images
List all product images for the product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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",
"filename": "myimage.jpg",
}
}
EOF
OR
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/1/images/2?token=GXzAxWkkyYLsESGQTU15" \
-X PUT \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"image": {
"position": 0,
"primary": true,
"thumbnail": false,
"image_url": "https://www.remoteimagestorage.com/someimage.jpg",
}
}
EOF
> The above request returns JSON structured like this:
```json
{
"id": 2,
"primary": true,
"thumbnail": false,
"position": 0,
"src": "https://www.imagestorage.com/image3.jpg"
}
HTTP Request
POST /api/api/v2.6.1/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] conditionally required |
Base64 Image representation Must be a String, required when image_url wasn't provided |
image[filename] conditionally required |
Image file name Must be a String, required when image_url wasn't provided |
image[image_url] conditionally required |
Remote Image URL Must be a String containing valid image url. Required when image_data + filename were not provided |
Update product image
Update a specific product image based on the product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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",
"filename": "new_image.jpg",
}
}
EOF
OR
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/1/images/2?token=GXzAxWkkyYLsESGQTU15" \
-X PUT \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"image": {
"position": 0,
"primary": true,
"thumbnail": false,
"image_url": "https://www.remoteimagestorage.com/new_image.jpg",
}
}
EOF
> The above request returns JSON structured like this:
```json
{
"id": 2,
"primary": true,
"thumbnail": false,
"position": 0,
"src": "https://www.imagestorage.com/new_image.jpg"
}
HTTP Request
PUT /api/api/v2.6.1/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] conditionally required |
Base64 Image representation Must be a String, required when image_url wasn't provided |
image[filename] conditionally required |
Image file name Must be a String, required when image_url wasn't provided |
image[image_url] conditionally required |
Remote Image URL Must be a String containing valid image url. Required when image_data + filename were not provided |
Delete product image
Delete a specific product image based on the product image ID you provide.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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.6.1/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.
You won't get inventory if vendor's inventory is enabled because it is managed by supplier.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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": "image3.png",
"position": 3
}
}
EOF
OR
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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_url": "https://www.imagestorage.com/image3.png",
"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/image3.png",
"price_modifier": "2.0",
"position": 3
}
HTTP Request
POST /api/v2.6.1/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. Must be nil when image_url was provided |
sub_option[filename] optional, nil allowed |
Image file name Must be a String. Must be nil when image_url was provided |
sub_option[image_url] optional, nil allowed |
Remote Image URL Must be a String containing valid image url. Must be nil when image_data + filename were provided |
Update sub option
Update a product sub option based on a specific sub option ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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.6.1/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. Must be nil when image_url was provided |
sub_option[filename] optional, nil allowed |
Image file name Must be a String. Must be nil when image_url was provided |
sub_option[image_url] optional, nil allowed |
Remote Image URL Must be a String containing valid image url. Must be nil when image_data + filename were provided |
Delete sub option
Delete a product sub option based on a specific sub option ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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.6.1/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 |
Product PromoStandards
List of promostandards items
List all promostandards items based on a product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/22287/promostandards?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"promostandards_items": [
{
"size_id": 1392573,
"color_id": 1392565,
"part_id": "G100KSBLKSM",
"track_inventory": true,
"allow_negative_inventory": false
},
{
"size_id": 1392574,
"color_id": 1392565,
"part_id": "G100KSBLKMD",
"track_inventory": true,
"allow_negative_inventory": false
},
{
"size_id": 1392575,
"color_id": 1392565,
"part_id": "G100KSBLKLG",
"track_inventory": true,
"allow_negative_inventory": false
}
]
}
HTTP Request
GET /api/v2.6.1/products/:product_id/promostandards
Query Parameters
Parameter | Description |
---|---|
product_id required |
Product ID Must be a number |
Batch update
Update promostandards items based on the product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/22287/promostandards/batch_update?token=GXzAxWkkyYLsESGQTU15" \
-X PUT \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"promostandards_items": [
{
"size_id": 1392573,
"color_id": 1392565,
"part_id": "G100KSBLKS",
"track_inventory": true,
"allow_negative_inventory": true
},
{
"size_id": 1392575,
"color_id": 1392565,
"part_id": "G200KSBLKLG",
"track_inventory": true,
"allow_negative_inventory": false
}
]
}
EOF
The above request returns JSON structured like this:
{
"promostandards_items": [
{
"size_id": 1392573,
"color_id": 1392565,
"part_id": "G100KSBLKS",
"track_inventory": true,
"allow_negative_inventory": true
},
{
"size_id": 1392574,
"color_id": 1392565,
"part_id": "G100KSBLKMD",
"track_inventory": true,
"allow_negative_inventory": false
},
{
"size_id": 1392575,
"color_id": 1392565,
"part_id": "G200KSBLKLG",
"track_inventory": true,
"allow_negative_inventory": false
}
]
}
HTTP Request
PUT /api/v2.6.1/products/:product_id/promostandards/batch_update
Query Parameters
Parameter | Description |
---|---|
product_id required |
Product ID Must be a number |
JSON Payload Parameters
Parameter | Description |
---|---|
promostandards_items required |
Array of promostandards items |
promostandards_items[size_id] required |
Sub option ID of Size product option Must be a number |
promostandards_items[color_id] required |
Sub option ID of Color product option Must be a number |
promostandards_items[part_id] required |
Supplier Part ID Must be a number |
promostandards_items[track_inventory] optional |
Enable/Disable inventory tracking Boolean value |
promostandards_items[allow_negative_inventory] optional |
Allow negative value of inventories Boolean value |
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.6.1/products?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"products": [
{
"id": 579,
"name": "Chocalate",
"sku": "choc-1",
"internal_id": "431234",
"origin_address_id": 1,
"new_product": false,
"new_expires_at": null,
"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.6.1/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.6.1/products/579?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"name": "Chocolate",
"sku": "choc-1",
"sku_separator": "-",
"internal_id": "431234",
"origin_address_id": null,
"new_product": false,
"new_expires_at": null,
"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,
"primary_category_id": 36,
"vendor_inventory_enabled": false,
"inventory_vendor_id": 2354,
"tax_code": "12345",
"note": "This is my favourite chocolate",
"created_at": "2016-03-29T22:53:03-06:00",
"updated_at": "2016-03-29T22:53:03-06:00"
}
HTTP Request
GET /api/v2.6.1/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.6.1/products?token=GXzAxWkkyYLsESGQTU15" \
-X POST \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"product": {
"name": "Chocolate",
"sku": "choc-1",
"sku_separator": "-",
"internal_id": "431234",
"origin_address_id": null,
"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 ],
"new_product": true,
"new_expires_at": "2023-01-01",
"enable_quantity_discount": false,
"related_products_type": "auto",
"enable_related_products": false,
"enable_product_personalization": false,
"enable_inventory": false,
"enable_logo_locations": false,
"primary_category_id": 36,
"vendor_inventory_enabled": false,
"inventory_vendor_id": 2354,
"note": "This is my favourite chocolate"
}
}
EOF
The above request returns JSON structured like this:
{
"name": "Chocolate",
"sku": "choc-1",
"sku_separator": "-",
"internal_id": "431234",
"origin_address_id": null,
"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": [],
"new_product": true,
"new_expires_at": "2023-01-01",
"enable_quantity_discount": false,
"related_products_type": "auto",
"enable_related_products": false,
"enable_product_personalization": false,
"enable_inventory": false,
"enable_logo_locations": false,
"primary_category_id": 36,
"tax_code": "12345",,
"vendor_inventory_enabled": false,
"inventory_vendor_id": 2354,
"note": "This is my favourite chocolate",
"created_at": "2016-03-29T22:53:03-06:00",
"updated_at": "2016-03-29T22:53:03-06:00"
}
HTTP Request
POST /api/v2.6.1/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[origin_address_id] optional , nil allowed |
Custom Shipping Origin ID Must be a number |
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[new_product] optional , nil allowed |
New product Must be one of: true, false, 1, 0 |
product[new_expires_at] optional , nil allowed |
Unmark new product at Valid format is ISO 8601 (Date), e.g. “YYYY-MM-DDThh:mm:ss” or “YYYY-MM-DD”. When “YYYY-MM-DDThh:mm:ss” provided then only date part will be used. |
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[vendor_inventory_enabled] optional |
Enabled/Disable vendor inventory Must be one of: true, false, 1, 0 |
product[inventory_vendor_id] optional , nil allowed |
Set supplier for you inventory Must be a number |
product[note] optional , nil allowed |
Product note Must be a String |
Update product
Update a specific product based on the product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/579?token=GXzAxWkkyYLsESGQTU15" \
-X PUT \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"product": {
"name": "Dark Chocolate",
"origin_address_id": 123,
}
}
EOF
The above request returns JSON structured like this:
{
"name": "Dark Chocolate",
"sku": "choc-1",
"sku_separator": "-",
"internal_id": "431234",
"origin_address_id": 123,
"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
]
}
],
"new_product": false,
"new_expires_at": null,
"enable_quantity_discount": false,
"related_products_type": "auto",
"enable_related_products": false,
"enable_product_personalization": false,
"enable_inventory": false,
"enable_logo_locations": false,
"primary_category_id": 36,
"tax_code": "12345",
"vendor_inventory_enabled": false,
"inventory_vendor_id": 2354,
"note": null,
"created_at": "2016-03-29T22:53:03-06:00",
"updated_at": "2016-03-29T22:53:03-06:00"
}
HTTP Request
PUT /api/v2.6.1/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[origin_address_id] optional , nil allowed |
Custom Shipping Origin ID Must be a number |
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[new_product] optional , nil allowed |
New product Must be one of: true, false, 1, 0 |
product[new_expires_at] optional , nil allowed |
Unmark new product at Valid format is ISO 8601 (Date), e.g. “YYYY-MM-DDThh:mm:ss” or “YYYY-MM-DD”. When “YYYY-MM-DDThh:mm:ss” provided then only date part will be used. |
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[vendor_inventory_enabled] optional |
Enabled/Disable vendor inventory Must be one of: true, false, 1, 0 |
product[inventory_vendor_id] optional , nil allowed |
Set supplier for you inventory Must be a number |
product[note] optional , nil allowed |
Product note Must be a String |
Delete product
Delete a specific product from the store based on the product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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",
"origin_address_id": null,
"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
]
}
],
"new_product": false,
"new_expires_at": null,
"enable_quantity_discount": false,
"related_products_type": "auto",
"enable_related_products": false,
"enable_product_personalization": false,
"enable_inventory": false,
"enable_logo_locations": false,
"primary_category_id": 36,
"tax_code": "12345",
"vendor_inventory_enabled": false,
"inventory_vendor_id": 2354,
"note": null,
"created_at": "2016-03-29T22:53:03-06:00",
"updated_at": "2016-03-29T22:53:03-06:00"
}
HTTP Request
DELETE /api/v2.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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 |
Quantity discount groups
List quantity discount groups
List all quantity discount groups under a specific product based on the product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/1/quantity_discount_groups?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"enabled": true,
"quantity_discount_groups": [
{
"id": 123,
"name": "Default",
"default": true,
"type": "fixed_price",
"product_options": [
{
"product_option_id": 1234,
"sub_option_ids": [432, 654]
},
{
"product_option_id": 4443,
"sub_option_ids": [985, 765]
}
],
"discounts": [
{
"quantity": 10,
"modifier": 10.0
},
{
"quantity": 20,
"modifier": 8.0
}
]
}
]
}
HTTP Request
GET /api/v2.6.1/products/:product_id/quantity_discount_groups
Query Parameters
Parameter | Description |
---|---|
product_id required |
Product ID Must be a number |
Show quantity discount group
Show you a specific quantity discount group for a product based on the quantity discount group ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/1/quantity_discount_groups/579?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"id": 123,
"name": "Default",
"default": true,
"type": "fixed_price",
"product_options": [
{
"product_option_id": 1234,
"sub_option_ids": [432, 654]
},
{
"product_option_id": 4443,
"sub_option_ids": [985, 765]
}
],
"discounts": [
{
"quantity": 10,
"modifier": 10.0
},
{
"quantity": 20,
"modifier": 8.0
}
]
}
HTTP Request
GET /api/v2.6.1/products/:product_id/quantity_discount_groups/: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 group
Create a new quantity discount group for a specific product based on the product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/1/quantity_discount_groups?token=GXzAxWkkyYLsESGQTU15" \
-X POST \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"quantity_discount_group": {
"type": "percentage",
"name": "apitest",
"product_options": [
{
"product_option_id": 85315,
"sub_option_ids": [
733287,
733292
]
},
{
"product_option_id": 85359,
"sub_option_ids": [
733525,
733530
]
}
],
"discounts": [
{
"quantity": 10,
"modifier": "10.0"
},
{
"quantity": 20,
"modifier": "15.0"
}
]
}
}
EOF
The above request returns JSON structured like this:
{
"type": "percentage",
"id": 579,
"name": "apitest",
"default": false,
"product_options": [
{
"product_option_id": 85315,
"sub_option_ids": [
733287,
733292
]
},
{
"product_option_id": 85359,
"sub_option_ids": [
733525,
733530
]
}
],
"discounts": [
{
"quantity": 10,
"modifier": "10.0"
},
{
"quantity": 20,
"modifier": "15.0"
}
]
}
HTTP Request
POST /api/v2.6.1/products/:product_id/quantity_discount_groups
Query Parameters
Parameter | Description |
---|---|
product_id required |
Product ID Must be a number |
JSON Payload Parameters
Parameter | Description |
---|---|
quantity_discount_group required |
Must be a Hash |
quantity_discount_group[name] required |
Must be a String |
quantity_discount_group[type] required |
Type Must be one of: percentage, fixed_price |
quantity_discount_group[product_options] optional , nil allowed |
Must be an Array of nested elements |
quantity_discount_group[product_options][product_option_id] required |
Must be a number |
quantity_discount_group[product_options][sub_option_ids] required |
Must be an Array of Integer |
quantity_discount_group[discounts] optional , nil allowed |
Must be an Array of nested elements |
quantity_discount_group[discounts][quantity] optional , nil allowed |
Must be a number |
quantity_discount_group[discounts][modifier] optional , nil allowed |
Must be a float |
Update quantity discount group
Update information for a specific quantity discount group on a product based on the quantity discount ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/1/quantity_discount_groups/579?token=GXzAxWkkyYLsESGQTU15" \
-X PUT \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"quantity_discount_group": {
"name": "apitest2"
}
}
EOF
The above request returns JSON structured like this:
{
"type": "percentage",
"id": 579,
"name": "apitest2",
"default": false,
"product_options": [
{
"product_option_id": 85315,
"sub_option_ids": [
733287,
733292
]
},
{
"product_option_id": 85359,
"sub_option_ids": [
733525,
733530
]
}
],
"discounts": [
{
"quantity": 10,
"modifier": "10.0"
},
{
"quantity": 20,
"modifier": "15.0"
}
]
}
HTTP Request
PUT /api/v2.6.1/products/:product_id/quantity_discount_groups/:id
Query Parameters
Parameter | Description |
---|---|
product_id required |
Product ID Must be a number |
id required |
Quantity discount group ID Must be a number |
JSON Payload Parameters
Parameter | Description |
---|---|
quantity_discount_group required |
Must be a Hash |
quantity_discount_group[name] optional |
Must be a String |
quantity_discount_group[type] optional |
Type Must be one of: percentage, fixed_price |
quantity_discount_group[product_options] optional , nil allowed |
Must be an Array of nested elements |
quantity_discount_group[product_options][product_option_id] optional |
Must be a number |
quantity_discount_group[product_options][sub_option_ids] optional |
Must be an Array of Integer |
quantity_discount_group[discounts] optional , nil allowed |
Must be an Array of nested elements |
quantity_discount_group[discounts][quantity] optional , nil allowed |
Must be a number |
quantity_discount_group[discounts][modifier] optional , nil allowed |
Must be a float |
Delete quantity discount group
Delete a specific quantity discount group on a product based on the quantity discount group ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/products/1/quantity_discount_groups/579?token=GXzAxWkkyYLsESGQTU15" \
-X DELETE
The above request returns JSON structured like this:
{
"type": "percentage",
"id": 579,
"name": "apitest",
"default": false,
"product_options": [],
"discounts": []
}
HTTP Request
DELETE /api/v2.6.1/products/:product_id/quantity_discount_groups/:id
Query Parameters
Parameter | Description |
---|---|
product_id required |
Product ID Must be a number |
id required |
Quantity discount group ID Must be a number |
Related products
List of 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.6.1/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.6.1/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 custom related product
Add a custom related product to a specific item based on the product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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.6.1/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 custom related product
Remove a custom related product from a specific item based on the product ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.mybrightsites.com/api/v2.6.1/users?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"users": [
{
"id": 579,
"name": "John Doe",
"username": "johndoe",
"email": "john@example.com",
"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.6.1/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 |
email optional |
Filter by email address 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.mybrightsites.com/api/v2.6.1/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": [],
"notes": [
{
"id": 123,
"note": "hello world",
"username": "API",
"created_at": "2021-04-20T10:20:09.000Z"
}
],
"moas_sms_approvers": [
{
"id": 123,
"phone": "1-800-123-12345",
"created_at": "2021-04-20T10:20:09.000Z"
}
],
"moas_email_approvers": [
{
"id": 123,
"email": "email@example.com",
"created_at": "2021-04-20T10:20:09.000Z"
}
],
"moas_activation_amount": "0.00",
"creation_date": "2015-11-22T10:00:00-06:00",
"last_edited_date": "2016-07-01T22:53:03-06:00",
"enable_sms_notifications": true,
"avalara_tax_exemption_reason": "A",
"balance_log": [
{
"id": 1,
"note": "note",
"balance": "12.5",
"action": "Set",
"amount": "12.5",
"adjusted_by": "User: admin (admin@brightstores.com)",
"created_at": "2022-11-24T14:49:45.000Z"
}
]
}
HTTP Request
GET /api/v2.6.1/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.mybrightsites.com/api/v2.6.1/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,
"balance_note":"note",
"password":"12345678",
"enable_sms_notifications":true,
"dont_send_confirmation_email":false,
"avalara_tax_exemption_reason": "A",
"cuf_1": "helloworld"
}
}
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": [],
"notes": [],
"moas_sms_approvers": [],
"moas_email_approvers": [],
"moas_activation_amount": "0.00",
"creation_date": "2015-11-22T10:00:00-06:00",
"last_edited_date": "2016-07-01T22:53:03-06:00",
"enable_sms_notifications": true,
"avalara_tax_exemption_reason": "A",
"cuf_1": "helloworld",
"balance_log": [
{
"id": 1,
"note": "note",
"balance": "12.5",
"action": "Set",
"amount": "12.5",
"adjusted_by": "User: admin (admin@brightstores.com)",
"created_at": "2022-11-24T14:49:45.000Z"
}
]
}
HTTP Request
POST /api/v2.6.1/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[balance_note] optional , nil allowed |
Balance Note Must be a String |
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[moas_activation_amount] optional |
MOAS activation amount (requires enabled MOAS feature). Must be a float |
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 |
user[avalara_tax_exemption_reason] optional |
Tax Exemption Reason (Avalara) This field only works with the Avalara sales tax integration and will send a tax exemption reason to Avalara for them to determine if tax is exempt or not when an order is being processed for the user. Valid values: A, B, C, D, E, F, G, H, I, J, K, L, M, N, P, Q, R, TAXABLE. Avalara Docs. |
Update user
Update information for a specific user account based on the user ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/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,
"balance_note":"note",
"password":"12345678",
"enable_sms_notifications": true,
"avalara_tax_exemption_reason": "A",
"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": [],
"notes": [],
"moas_sms_approvers": [],
"moas_email_approvers": [],
"moas_activation_amount": "0.00",
"creation_date": "2015-11-22T10:00:00-06:00",
"last_edited_date": "2016-07-01T22:53:03-06:00",
"enable_sms_notifications": true,
"avalara_tax_exemption_reason": "A",
"cuf_1": "12345678",
"balance_log": [
{
"id": 1,
"note": "note",
"balance": "12.5",
"action": "Set",
"amount": "12.5",
"adjusted_by": "User: admin (admin@brightstores.com)",
"created_at": "2022-11-24T14:49:45.000Z"
}
]
}
HTTP Request
PUT /api/v2.6.1/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[balance_note] optional , nil allowed |
Balance Note Must be a String |
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[moas_activation_amount] optional |
MOAS activation amount (requires enabled MOAS feature). Must be a float |
user[enable_sms_notifications] optional |
SMS Notification Must be one of: true, false, 1, 0 |
user[avalara_tax_exemption_reason] optional |
Tax Exemption Reason (Avalara) This field only works with the Avalara sales tax integration and will send a tax exemption reason to Avalara for them to determine if tax is exempt or not when an order is being processed for the user. Valid values: A, B, C, D, E, F, G, H, I, J, K, L, M, N, P, Q, R, TAXABLE. Avalara Docs. |
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.mybrightsites.com/api/v2.6.1/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": [],
"notes": [],
"moas_sms_approvers": [],
"moas_email_approvers": [],
"moas_activation_amount": "0.00",
"creation_date": "2015-11-22T10:00:00-06:00",
"enable_sms_notifications": true,
"avalara_tax_exemption_reason": "A",
"last_edited_date": "2016-07-01T22:53:03-06:00",
"balance_log": []
}
HTTP Request
DELETE /api/v2.6.1/users/:id
Query Parameters
Parameter | Description |
---|---|
id required |
User ID Must be a number |
User notes
List notes
List all user notes based on a user ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/1/notes?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"notes": [
{
"id": 579,
"username": "API",
"note": "helloworld",
"created_at": "2015-11-22T10:00:00-06:00"
}
]
}
HTTP Request
GET /api/v2.6.1/users/:user_id/notes
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
Create user note
Create a new note for the user.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/123/notes?token=GXzAxWkkyYLsESGQTU15" \
-X POST \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"note": "helloworld"
}
EOF
The above request returns JSON structured like this:
{
"id": 579,
"username": "API",
"note": "helloworld",
"created_at": "2015-11-22T10:00:00-06:00"
}
HTTP Request
POST /api/v2.6.1/users/:user_id/notes
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
JSON Payload Parameters
Parameter | Description |
---|---|
note required |
Comment body Must be a String |
Update user note
Update specific user note for a user account based on the user ID and note ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/579/notes/123?token=GXzAxWkkyYLsESGQTU15" \
-X PUT \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"note": "helloworld"
}
EOF
The above request returns JSON structured like this:
{
"id": 579,
"username": "API",
"note": "helloworld",
"created_at": "2015-11-22T10:00:00-06:00"
}
HTTP Request
PUT /api/v2.6.1/users/:user_id/notes/:id
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
id required |
Note ID Must be a number |
JSON Payload Parameters
Parameter | Description |
---|---|
note required |
Comment body Must be a String |
Delete user note
Delete a specific user note for a user account based on the user ID and note ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/579/notes/123?token=GXzAxWkkyYLsESGQTU15" \
-X DELETE
The above request returns JSON structured like this:
{
"id": 579,
"username": "API",
"note": "helloworld",
"created_at": "2015-11-22T10:00:00-06:00"
}
HTTP Request
DELETE /api/v2.6.1/users/:user_id/notes/:id
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
id required |
Note ID Must be a number |
User MOAS e-mail approvers
List MOAS e-mail approvers
List all user MOAS email approvers based on a user ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/1/moas_email_approvers?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"moas_email_approvers": [
{
"id": 579,
"email": "hello@world.com",
"created_at": "2015-11-22T10:00:00-06:00"
}
]
}
HTTP Request
GET /api/v2.6.1/users/:user_id/moas_email_approvers
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
Create MOAS e-mail approver
Create a new MOAS e-mail approver for the user.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/123/moas_email_approvers?token=GXzAxWkkyYLsESGQTU15" \
-X POST \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"email": "hello@world.com"
}
EOF
The above request returns JSON structured like this:
{
"id": 579,
"email": "hello@world.com",
"created_at": "2015-11-22T10:00:00-06:00"
}
HTTP Request
POST /api/v2.6.1/users/:user_id/moas_email_approvers
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
JSON Payload Parameters
Parameter | Description |
---|---|
email required |
Approver e-mail address Must be a String |
Update MOAS e-email approver
Update specific MOAS e-mail approver for a user account based on the user ID and MOAS approver ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/579/moas_email_approvers/123?token=GXzAxWkkyYLsESGQTU15" \
-X PUT \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"email": "test@world.com"
}
EOF
The above request returns JSON structured like this:
{
"id": 579,
"email": "test@world.com",
"created_at": "2015-11-22T10:00:00-06:00"
}
HTTP Request
PUT /api/v2.6.1/users/:user_id/moas_email_approvers/:id
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
id required |
MOAS Approver ID Must be a number |
JSON Payload Parameters
Parameter | Description |
---|---|
email required |
Approver e-mail address Must be a String |
Delete MOAS e-mail approver
Delete a specific MOAS approver for a user account based on the user ID and MOAS approver ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/579/moas_email_approvers/123?token=GXzAxWkkyYLsESGQTU15" \
-X DELETE
The above request returns JSON structured like this:
{
"id": 579,
"email": "hello@world.com",
"created_at": "2015-11-22T10:00:00-06:00"
}
HTTP Request
DELETE /api/v2.6.1/users/:user_id/moas_email_approvers/:id
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
id required |
MOAS approver ID Must be a number |
User MOAS sms approvers
List MOAS sms approvers
List all user MOAS sms approvers based on a user ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/1/moas_sms_approvers?token=GXzAxWkkyYLsESGQTU15"
The above request returns JSON structured like this:
{
"moas_sms_approvers": [
{
"id": 579,
"phone": "+1-518-555-0154",
"created_at": "2015-11-22T10:00:00-06:00"
}
]
}
HTTP Request
GET /api/v2.6.1/users/:user_id/moas_sms_approvers
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
Create MOAS sms approver
Create a new MOAS sms approver for the user.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/123/moas_sms_approvers?token=GXzAxWkkyYLsESGQTU15" \
-X POST \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"phone": "+1-518-555-0154"
}
EOF
The above request returns JSON structured like this:
{
"id": 579,
"phone": "+1-518-555-0154",
"created_at": "2015-11-22T10:00:00-06:00"
}
HTTP Request
POST /api/v2.6.1/users/:user_id/moas_sms_approvers
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
JSON Payload Parameters
Parameter | Description |
---|---|
sms required |
Approver sms address Must be a String |
Update MOAS sms approver
Update specific MOAS sms approver for a user account based on the user ID and MOAS approver ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/579/moas_sms_approvers/123?token=GXzAxWkkyYLsESGQTU15" \
-X PUT \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"phone": "+1-518-555-0154"
}
EOF
The above request returns JSON structured like this:
{
"id": 579,
"phone": "+1-518-555-0154",
"created_at": "2015-11-22T10:00:00-06:00"
}
HTTP Request
PUT /api/v2.6.1/users/:user_id/moas_sms_approvers/:id
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
id required |
MOAS Approver ID Must be a number |
JSON Payload Parameters
Parameter | Description |
---|---|
sms required |
Approver sms address Must be a String |
Delete MOAS sms approver
Delete a specific MOAS approver for a user account based on the user ID and MOAS approver ID you supply.
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users/579/moas_sms_approvers/123?token=GXzAxWkkyYLsESGQTU15" \
-X DELETE
The above request returns JSON structured like this:
{
"id": 579,
"phone": "+1-518-555-0154",
"created_at": "2015-11-22T10:00:00-06:00"
}
HTTP Request
DELETE /api/v2.6.1/users/:user_id/moas_sms_approvers/:id
Query Parameters
Parameter | Description |
---|---|
user_id required |
User ID Must be a number |
id required |
MOAS approver 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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/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.6.1/vendors/:id
Query Parameters
Parameter | Description |
---|---|
id required |
Vendor ID Must be a number |
Changelog
2.6.1
Changes 2.6.1
/api/v2.6.1/users
curl "https://subdomain.mybrightsites.com/api/v2.6.1/users?token=GXzAxWkkyYLsESGQTU15&email=john@example.com"
{
"users": [
{
"id": 579,
"name": "John Doe",
"username": "johndoe",
+ "email": "john@example.com",
"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
}
}
- Added
email
tousers
json. Also added ability to filterusers
by email address.
Affected APIs:
- /api/v2.6.1/users
2.6.0
Changes 2.6.0
/api/v2.6.0/products/:id
{
"name": "Chocolate",
"sku": "choc-1",
"sku_separator": "-",
"internal_id": "431234",
"origin_address_id": 2,
"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": [],
"vendors": [],
"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,
"primary_category_id": 36,
"tax_code": "12345",
"vendor_inventory_enabled": false,
"inventory_vendor_id": 2354,
"new_product": false,
"new_expires_at": "2023-01-01",
+ "note": "This is my favourite chocolate",
"created_at": "2016-03-29T22:53:03-06:00",
"updated_at": "2016-03-29T22:53:03-06:00",
}
/api/v2.6.0/orders/:order_id/line_items/:id
{
"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"
}
},
{
"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"
}
}
],
"product_personalizations": [
{
"title": "Enter Name Here",
"attributes": [
{
"key": "Name",
"value": ""
}
],
"price_modifier": {
"modifier_type": "$",
"amount": "1.99"
}
}
],
"gift_certificate": null,
+ "note": "Product note example"
}
/api/v2.6.0/users/:id
{
"id": 579,
...
+ "balance_log": [
+ {
+ "id": 1,
+ "note": "note",
+ "balance": "12.5",
+ "action": "Set",
+ "amount": "12.5",
+ "adjusted_by": "User: admin (admin@brightstores.com)",
+ "created_at": "2022-11-24T14:49:45.000Z"
+ }
+ ]
}
/api/v2.6.0/users (new)
{
"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,
+ "balance_note":"note",
"password":"12345678",
"enable_sms_notifications":true,
"dont_send_confirmation_email":false,
"avalara_tax_exemption_reason": "A",
"cuf_1": "helloworld"
}
}
/api/v2.6.0/users/:id (update)
{
"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,
+ "balance_note":"note",
"password":"12345678",
"enable_sms_notifications": true,
"avalara_tax_exemption_reason": "A",
"cuf_1": "12345678"
}
}
- Added
note
toproduct
andline_item
json.
Affected APIs:
- /api/v2.6.0/products/:id
- /api/v2.6.0/orders
- /api/v2.6.0/orders/:order_id/line_items
- /api/v2.6.0/orders/:order_id/line_items/:id
- Added
balance_note
andbalance_log
touser
json.
Affected APIs:
- /api/v2.6.0/users/:id
- /api/v2.6.0/users
2.5.0
Changes 2.5.0
/api/v2.5.0/products/:product
{
"name": "Chocolate",
"sku": "choc-1",
"sku_separator": "-",
"internal_id": "431234",
"origin_address_id": 2,
"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": [],
"vendors": [],
"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,
"primary_category_id": 36,
"tax_code": "12345",
"vendor_inventory_enabled": false,
"inventory_vendor_id": 2354,
+ "new_product": false,
+ "new_expires_at": "2023-01-01",
"created_at": "2016-03-29T22:53:03-06:00",
"updated_at": "2016-03-29T22:53:03-06:00",
}
/api/v2.5.0/products
{
"products": [
{
"id": 579,
"name": "Chocalate",
"sku": "choc-1",
"internal_id": "431234",
"origin_address_id": 1,
+ "new_product": false,
+ "new_expires_at": "2023-01-01",
"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
}
}
/api/v2.5.0/products/:product_id/product_images
{
"image": {
"position": 0,
"primary": true,
"thumbnail": false,
+ "image_url": "https://www.imagestorage.com/image3.jpg",
}
}
/api/v2.5.0/products/:product_id/product_options/:option_id/sub_options
{
"sub_option": {
"name": "X-Small",
"sub_sku": "SKU123",
"price_modifier": 2,
+ "image_url": "https://www.imagestorage.com/image3.jpg",
"position": 3
}
}
- Added
new_product
toproducts
json. - Added
new_expires_at
toproducts
json. - Added ability to create image from
image_url
parameter inimage
andsub_option
json
Affected APIs:
- /api/v2.5.0/products/:id
- /api/v2.5.0/products
- /api/v2.5.0/products/:product_id/product_options
- /api/v2.5.0/products/:product_id/product_options/:option_id/sub_options
2.4.0
Changes 2.4.0
/api/v2.4.0/users/:id
{
"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": [],
"notes": [],
"moas_sms_approvers": [],
"moas_email_approvers": [],
"moas_activation_amount": "0.00",
"creation_date": "2015-11-22T10:00:00-06:00",
"last_edited_date": "2016-07-01T22:53:03-06:00",
"enable_sms_notifications": true,
+ "avalara_tax_exemption_reason": "A",
"cuf_1": "12345678"
}
Added avalara_tax_exemption_reason
to users
json.
This field only works with the Avalara sales tax integration and will send a tax exemption reason to Avalara for them to determine if tax is exempt or not when an order is being processed for the user. Avalara Docs.
Affected APIs:
- /api/v2.4.0/users/:id
2.3.0
Changes 2.3.0
/api/v2.3.0/orders/:id
{
"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"
}
},
{
"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"
}
}
],
"product_personalizations": [
{
"title": "Enter Name Here",
"attributes": [
{
"key": "Name",
"value": ""
}
],
"price_modifier": {
"modifier_type": "$",
"amount": "1.99"
}
}
],
"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": [],
"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
}
]
}
]
}
/api/v2.3.0/products/:id
{
"name": "Chocolate",
"sku": "choc-1",
"sku_separator": "-",
"internal_id": "431234",
"origin_address_id": 2,
"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": [],
"vendors": [],
"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,
"primary_category_id": 36,
"tax_code": "12345",
+ "vendor_inventory_enabled": false,
+ "inventory_vendor_id": 2354,
"created_at": "2016-03-29T22:53:03-06:00",
"updated_at": "2016-03-29T22:53:03-06:00",
}
- Added
vendor_inventory_enabled
toproducts
json - Added
inventory_vendor_id
toproducts
json - Added Product PromoStandards endpoint
Affected APIs:
- /api/v2.3.0/products/:product_id
- /api/v2.3.0/products/:product_id/promostandards (new)
- /api/v2.3.0/orders/:id
2.2.0
Changes 2.2.0:
/api/v2.2.0/origin_addresses
Added Origin Addresses endpoint
/api/v2.2.0/products
{
"products": [
{
"id": 579,
"name": "Chocalate",
"sku": "choc-1",
"internal_id": "431234",
+ "origin_address_id": 1,
"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
}
}
Added origin_address_id
to products
json
/api/v2.0.0/products/:id
{
"name": "Chocolate",
"sku": "choc-1",
"sku_separator": "-",
"internal_id": "431234",
+ "origin_address_id": 2,
"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": [],
"vendors": [],
"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,
"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"
}
Added origin_address_id
to product
json
2.1.1
Changes 2.1.1:
/api/v2.1.1/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"
],
+ "notes": [
+ {
+ "id": 123,
+ "note": "hello world",
+ "username": "API",
+ "created_at": "2021-04-20T10:20:09.000Z"
+ }
+ ],
+ "moas_sms_approvers": [
+ {
+ "id": 123,
+ "phone": "+1-800-123-12345",
+ "created_at": "2021-04-20T10:20:09.000Z"
+ }
+ ],
+ "moas_email_approvers": [
+ {
+ "id": 123,
+ "email": "email@example.com",
+ "created_at": "2021-04-20T10:20:09.000Z"
+ }
+ ],
+ "moas_activation_amount": "0.00",
"balance": "12.5",
"password": "12345678",
"enable_sms_notifications": true,
"cuf_1": "helloworld",
"dont_send_confirmation_email": true
}
}
- Added
notes
tousers
json - Added
moas_email_approvers
tousers
json - Added
moas_sms_approvers
tousers
json - Added
moas_activation_amount
tousers
json
Affected APIs:
- /api/v2.1.1/users/:id
All endpoints
Starting with v2.1.1 per_page
query parameter is limited to a maximum of 500 records per page for all listings.
/api/v2.1.1/users/:id/notes
Added User Notes endpoint
/api/v2.1.1/users/:id/moas_sms_approvers
Added User MOAS Sms Approvers endpoint
/api/v2.1.1/users/:id/moas_email_approvers
Added User MOAS E-mail Approvers endpoint
/api/v2.1.1/vendors
phone_number
param key renamed to phone
in vendors create and update endpoints
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
}
}
- Added
timezone
tousers
json
Affected APIs:
- /api/v2.1.0/users/:id
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,
"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,
}
],
"product_personalizations": [],
"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
- Added Inventories
per_page
query parameter is limited to a maximum of 500 records per page for Inventories
/api/v2.0.0/products
- Added
created_at
to List products json - Field
last_edited_date
renamed toupdated_at
in List products json for a better consistency - Added
updated_at
andcreated_at
filters to query parameters for List products
/api/v2.0.0/products/:id
- Added
options
,sub_options
,inventories
,created_at
to Show product json - Field
last_edited_date
renamed toupdated_at
in Show product json for a better consistency
/api/v2.0.0/orders
- Added
updated_at
to List orders json - Field
date
renamed tocreated_at
in List orders json for a better consistency - Added
updated_at
andcreated_at
filters to query parameters for List orders
/api/v2.0.0/orders/:id
- Added
updated_at
to Show order json - Field
date
renamed tocreated_at
in RAJASLOTO json for a better consistency
/api/v2.0.0/users
- 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,
"primary_category_id": 36,
"last_edited_date": "2016-03-29T22:53:03-06:00",
"tax_code": "12345"
}
- Added
sku_separator
toproduct
json
Affected APIs:
- /api/v1.1.7/products/:id
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,
}
],
"product_personalizations": [],
"split_items": [],
"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"
+ ]
+ }
- Added
shipments
toorder
json - Added order shipments
- Added shipping methods
Affected APIs:
- /api/v1.1.6/orders/:order_id
- /api/v1.1.6/orders/:order_id/shipments (new)
- /api/v1.1.6/shipping_methods (new)
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.mybrightsites.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": []
}
- Orders are sorted by
order_id
in descending order - Added
custom_store_id
toorder
json
Affected APIs:
- /api/v1.1.5/orders
- /api/v1.1.5/orders/:order_id
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,
"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.mybrightsites.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.mybrightsites.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":[],
"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": []
}
- Renamed
custom_tic
totax_code
forproducts
json - Added
tax_code
toline_items
json - Added
vendors
toline_items
json - Added
supplier_id
tologos
array inline_items
json - Added
global_vendor
flag tovendors
json - Added
site_id
,site_name
,site_url
,organization_id
andorganization_name
toorder
json
Affected APIs:
- /api/v1.1.4/products/:id
- /api/v1.1.4/orders/:order_id
- /api/v1.1.4/orders/:order_id/line_items
- /api/v1.1.4/orders/:order_id/line_items/:line_item_id
- /api/v1.1.4/vendors/:id
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,
}
}
- Added
enable_sms_notifications
tousers
json
Affected APIs:
- /api/v1.1.3/users/:user_id
1.1.2
Changes 1.1.2:
/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": [],
+ "gift_certificate": {
+ "first_name": "",
+ "last_name": "",
+ "email": "",
+ "message": "",
+ "expires_at": null,
+ "code": "7D70CBCB88B",
+ "amount": "10.0"
+ }
}
- Added
gift_certificate
toline_item
json
Affected APIs:
- /api/v1.1.2/orders/:order_id
- /api/v1.1.2/orders/:order_id/line_items
- /api/v1.1.2/orders/:order_id/line_items/:line_item_id