# Bulk Create / Update Endpoints

# General Guidelines

  • API calls with JSON payload must contain a Content-Type: application/json HTTP header
  • Fields marked with * are required. Invalid payloads will be rejected
  • Each API call can contain a maximum of 50 products. If more than 50 products are sent, only the first 50 will be processed.
  • Products sent to the bulk create / update API will be priced immediately without competitor data and again, with competitor data, on the next scheduled scraping (depending on your Quicklizard payment package).
  • If your competitor data is taken from price-comparison sites, your competitor names should be adjusted to reflect the cheapest competitor - most expensive competitor: sitename_1 for the cheapest up to sitename_N for the most expensive (where total N is the number of competitors)
  • Numbers must be formatted according to the following rules:
    • Price / cost must be a positive, non-zero float, formatted in US-style decimal point, without thousands separator
    • Inventory must be a positive, integer or zero
    • VAT (when passed as an attribute) must be a positive, non-zero float, formatted in US-style decimal point, without thousands separator

# Bulk update guidelines

  • Except for a uid or client_uid, all other parameters are optional, depending on what you wish to update.
  • The disabled flag allows to to determine which products are priced by our pricing engine. This is particularly important if your QL package includes a limited number of products, and you wish to add / remove products from this list
  • Marking a product as disabled (disabled=1), means that this we will not generate new price recommendations for this product.
  • Non-existing products sent to the bulk update API will be rejected

# /api/v2/products/bulk_create

Endpoint - POST /api/v2/products/bulk_create

Create new products on Quicklizard in bulk.

# Request payload

Each product sent for bulk creation, can contain the following fields:

  • client_uid * - product uid as sent from pixel (will be converted to Quicklizard internal uid).
  • price * - product's shelf-price. Must be a positive, non-zero float
  • label * - product's name as appears on your online store.
  • meta - product metadata hash
    • cost - product cost. Must be a positive, non-zero float
    • inventory - product inventory level.
    • permalink * - product permalink on your online store.
    • img - product image URL (used for preview on the Quicklizard UI)
  • attrs - product attributes array
    • name - attribute name
    • value - attribute value
  • competitors - product competitor prices array
    • competitor_key * - competitor name as appears in QL's competitor list.
    • price * - competitor price. Must be a positive, non-zero float
    • permalink - competitor product permalink.
    • label - competitor display name.
  • prices - multi-channel prices array (used only if your account supports multiple price channels)
    • shelf * - channel shelf price. Must be a positive, non-zero float
    • cost * - channel cost. Must be a positive, non-zero float
    • tag * - channel name (eg. "offline", "online")

# Example Request

curl -XPOST -H 'API_KEY: YOUR_API_KEY_HERE' -H 'API_DIGEST: YOUR_API_DIGEST_HERE' \
'https://api.quicklizard.com/api/v2/products/bulk_create' -d 'products[][client_uid]=uid_1&products[][price]=12.3&
products[][attrs][][name]=brand&products[][attrs][][value]=Apple&
products[][competitors][][competitor_key]=competitor_a&products[][competitors][][price]=12.3&
products[][competitors][][permalink]=http://competitor-site.com/product/abc&
products[][competitors][][label]=Competitor%20A&
products[][meta][cost]=11.2&products[][meta][inventory]=23&products[][meta][permalink]=http://www.yourstore.com/products/123'

# Example JSON Request

curl -XPOST -H 'API_KEY: YOUR_API_KEY_HERE' -H 'API_DIGEST: YOUR_API_DIGEST_HERE' \
-H 'Content-Type: application/json' \
'https://api.quicklizard.com/api/v2/products/bulk_create' -d '{"products":[{
  "client_uid":"uid_1","price":12.3, "label": "My Product",
  "meta":{ "cost":11, "inventory":23, "permalink": "http://www.yourstore.com/products/123" },
  "attrs": [{"name": "brand", "value":"Apple"}],
  "competitors": [{"competitor_key": "competitor_a", "price": 12.3, "permalink": "http://competitor-site.com/product/abc", "label": "Competitor A"}]
}]}'

# Example JSON Request - multiple price channels

curl -XPOST -H 'API_KEY: YOUR_API_KEY_HERE' -H 'API_DIGEST: YOUR_API_DIGEST_HERE' \
-H 'Content-Type: application/json' \
'https://api.quicklizard.com/api/v2/products/bulk_create' -d '{"products":[{
  "client_uid":"uid_1", "label": "My Product",
  "meta":{ "inventory":23, "permalink": "http://www.yourstore.com/products/123" },
  "attrs": [{"name": "brand", "value":"Apple"}],
  "competitors": [{"competitor_key": "competitor_a", "price": 12.3, "permalink": "http://competitor-site.com/product/abc", "label": "Competitor A"}],
  "prices": [
    {"shelf": 132.2, "cost": 121.3, "tag": "online"},
    {"shelf": 141.23, "cost": 121.3, "tag": "offline"}
  ]
}]}'

# API Response

{
  "message": "Created 50 products", // success / error message
  "products" [], // list of created products
  "errors": [] // list of products that could not be created due to invalid structure
}

# /api/v2/products/bulk_update

Endpoint - PUT /api/v2/products/bulk_update

Send a list of products with updated information about shelf-price, cost, inventory and attributes.

# Deleting attributes

You can explicitly delete an attribute by passing delete! as its value. Attributes with a value of delete! that are sent to the bulk_update API will be deleted from their respective products.

# Request Payload

Each product sent for bulk update, can contain the following fields:

  • uid - product uid (required unless client_uid is used)
  • client_uid - product uid as sent from pixel (will be converted to Quicklizard internal uid. Required unless using uid)
  • price - product's shelf-price. Must be a positive, non-zero float
  • label - product's name as appears on your online store
  • disabled - disabled pricing flag. pass 0 to enable pricing on this product, or 1 to disable pricing on this product
  • meta - product metadata hash
    • cost - product cost. Must be a positive, non-zero float
    • inventory - product inventory level
    • permalink - product permalink on your online store
    • img - product image URL (used for preview on the Quicklizard UI)
  • attrs - product attributes array
    • name - attribute name
    • value - attribute value
  • competitors - product competitor prices array
    • competitor_key * - competitor name as appears in QL's competitor list.
    • price * - competitor price. Must be a positive, non-zero float
    • permalink - competitor product permalink.
    • label - competitor display name.
  • prices - multi-channel prices array (used only if your account supports multiple price channels)
    • shelf * - channel shelf price. Must be a positive, non-zero float
    • cost * - channel cost. Must be a positive, non-zero float
    • tag * - channel name (eg. "offline", "online")

# Example Request

curl -XPUT -H 'API_KEY: YOUR_API_KEY_HERE' -H 'API_DIGEST: YOUR_API_DIGEST_HERE' \
'https://api.quicklizard.com/api/v2/products/bulk_update' -d 'products[][client_uid]=uid_1&products[][price]=12.3&
products[][attrs][][name]=brand&products[][attrs][][value]=Apple&
products[][competitors][][competitor_key]=competitor_a&products[][competitors][][price]=12.3&
products[][competitors][][permalink]=http://competitor-site.com/product/abc&
products[][competitors][][label]=Competitor%20A&
products[][meta][cost]=11.2&products[][meta][inventory]=23&products[][meta][permalink]=http://www.yourstore.com/products/123'

# Example JSON Request

curl -XPUT -H 'API_KEY: YOUR_API_KEY_HERE' -H 'API_DIGEST: YOUR_API_DIGEST_HERE' \
-H 'Content-Type: application/json' \
'https://api.quicklizard.com/api/v2/products/bulk_update' -d '{"products":[{
  "client_uid":"uid_1","price":12.3, "label": "My Product",
  "meta":{ "cost":11, "inventory":23, "permalink": "http://www.yourstore.com/products/123" },
  "attrs": [{"name": "brand", "value":"Apple"}],
  "competitors": [{"competitor_key": "competitor_a", "price": 12.3, "permalink": "http://competitor-site.com/product/abc", "label": "Competitor A"}]
}]}'

# Example JSON Request - multiple price channels

curl -XPUT -H 'API_KEY: YOUR_API_KEY_HERE' -H 'API_DIGEST: YOUR_API_DIGEST_HERE' \
-H 'Content-Type: application/json' \
'https://api.quicklizard.com/api/v2/products/bulk_update' -d '{"products":[{
  "client_uid":"uid_1", "label": "My Product",
  "meta":{ "inventory":23, "permalink": "http://www.yourstore.com/products/123" },
  "attrs": [{"name": "brand", "value":"Apple"}],
  "competitors": [{"competitor_key": "competitor_a", "price": 12.3, "permalink": "http://competitor-site.com/product/abc", "label": "Competitor A"}],
  "prices": [
    {"shelf": 132.2, "cost": 121.3, "tag": "online"},
    {"shelf": 141.23, "cost": 121.3, "tag": "offline"}
  ]
}]}'

# API Response

{
  "message": "Updated 50 products", // success / error message
  "products" [], // list of updated products
  "rejected": [] // list of products that were rejected because they do not exist in our system
}
Do not send products to the bulk update API blindly! Only send products that contain changes