Add items to a catalog

Use this endpoint to add items to a catalog.

API at a glance

Description: This API allows you to add multiple products or content items to an existing catalog in Blueshift. You can add up to 100 items per API call. Catalogs organize items such as products, movies, courses, and other content that users interact with, enabling personalized recommendations and content delivery.

Authentication & testing

Testing the API on this page

How to try it here

  • Use your User API Key as the Username (leave Password blank).
  • User API Key Location
  • Select the appropriate API endpoint based on your Blueshift region.
  • API - Select Region
  • Enter the necessary parameters and click Try It to run the request.
Authentication using Base64 encoding

Note for developers

API requests require authentication using HTTP Basic Authentication with an API key. The API key serves as the username, while the password field should be left empty. The format to encode is: your_api_key: (note the trailing colon).

This string must be Base64-encoded and included in the request's Authorization header as follows:

Authorization: Basic encoded_value

You can generate the encoded value using a trusted Base64 encoder.


Postman collection

Try it with Postman: Explore the API using Blueshift's Postman collection.


Things to know before you start

  • You can add up to 100 items per API call.
  • The catalog must already exist in Blueshift. Use the Create Catalog API to create a new catalog.
  • Required fields for each item: image, product_id, title, web_link, availability, and category.
  • Price fields (msrp and price) must contain numeric values without currency symbols (e.g., "999.99" not "$999.99").
  • Latitude must be between -90 and 90; longitude must be between -180 and 180.
  • Product IDs must be unique within and across catalogs.
  • Use case: Bulk import product catalogs, update inventory, sync content feeds, or add new items to existing catalogs programmatically.
  • Catalog UUID: You can find the catalog UUID in the URL when viewing a catalog in the Blueshift app. For example, https://app.getblueshift.com/dashboard#/app/catalogs/<CATALOG_UUID>/details.

📖 Catalogs – user guide
To learn more about catalogs and how they work in Blueshift, see the Catalogs overview.

Request parameters

Check out the request parameters

Path parameters

ParameterTypeRequiredDescription
catalog_uuidstring✅ YesUUID of the catalog to which you want to add items. You can get the catalog's UUID from its URL. For example, if you open a catalog on the Blueshift app, its URL looks like https://app.getblueshift.com/dashboard#/app/catalogs/89ee8378-a887-474b-8afe-e2369cc9297c/details, where the UUID is 89ee8378-a887-474b-8afe-e2369cc9297c.

You can find the catalog UUID in the URL when viewing a catalog in the Blueshift app.

Query parameters

ParameterTypeRequiredDescription
syncUpdateWithProductDataboolean❌ NoWhen set to true, the API returns the product_id and uuid for each successfully added item. When set to false or not provided, returns a simple {"status": "ok"} response. Default: false.

Body parameters

ParameterTypeRequiredDescription
catalog.productsarray✅ YesArray of product/item objects to add to the catalog. Maximum 100 items per request.
product_idstring✅ YesUnique identifier for the item (max 64 characters). Must match the product IDs used in your events.
titlestring✅ YesTitle of the item (max 255 characters).
imagestring✅ YesURL of the item's image (max 500 characters).
web_linkstring✅ YesURL of the item on your website (max 500 characters).
availabilitystring✅ YesAvailability status of the item (e.g., in_stock, out_of_stock).
categoryarray✅ YesCategory identifiers starting from the root of the taxonomy (e.g., ["Electronics", "Electronics > Laptops"]).
brandstring❌ NoBrand name of the item.
msrpstring❌ NoMaximum suggested retail price (numeric value without currency symbol, e.g., "999.99").
pricestring❌ NoSelling price (numeric value without currency symbol, e.g., "899.99").
tagsarray❌ NoArray of strings for grouping similar products (e.g., ["bestseller", "premium"]).
parent_skustring❌ NoSKU to tie all variants or child products together.
latitudestring❌ NoLatitude of the product location (must be between -90 and 90).
longitudestring❌ NoLongitude of the product location (must be between -180 and 180).

Example requests & responses

Request example
curl --request PUT \
     --url https://api.getblueshift.com/api/v1/catalogs/89ee8378-a887-474b-8afe-e2369cc9297c.json \
     --header 'accept: application/json' \
     --header 'authorization: Basic YWNlZDZlNGYxMWExYWVhOTZmNTJkNDg4M2ZmMjI4Mjg6' \
     --header 'content-type: application/json' \
     --data '
{
  "catalog": {
    "products": [
      {
        "image": "https://example.com/images/product.jpg",
        "product_id": "PROD123456",
        "title": "Premium Laptop 15-inch",
        "web_link": "https://example.com/products/laptop-001",
        "availability": "in_stock",
        "category": [
          "Electronics",
          "Electronics > Laptops"
        ],
        "brand": "TechBrand",
        "msrp": "999.99",
        "price": "899.99",
        "tags": [
          "bestseller",
          "premium"
        ],
        "parent_sku": "SKU-PARENT-001",
        "latitude": "40.7128",
        "longitude": "-74.0060"
      }
    ]
  }
}
'
Response example (without syncUpdateWithProductData)
{
  "status": "ok"
}
Response example (with syncUpdateWithProductData=true)
{
  "success": {
    "products": [
      {
        "product_id": "PROD123456",
        "uuid": "8da44313-e540-449d-9513-6eb36285bfe3"
      }
    ]
  },
  "failure": []
}
API error responses
Status codeDescriptionExample response
400 Bad RequestThe request was invalid or cannot be parsed.{ "status": 400, "error": "Json Parse error: unexpected character at line 10, column 11 [parse.c:671]" }
401 UnauthorizedAPI authentication failed due to an invalid or missing API key.{ "message": "Not authorized" }
404 Not FoundThe catalog with the specified UUID was not found.{ "status": "404", "error": "Not Found" }
413 Payload Too LargeMore than 100 products were included in the request.{ "message": "You can upload maximum 100 products in one API call" }
422 Unprocessable EntitySome or all products have invalid data. Check the response for specific errors.{ "errors": [{ "msrp": ["is not a number"], "latitude": ["Must be between -90 and 90"] }], "products": [ ... ] }
429 Too Many RequestsRate limit exceeded.{ "message": "Rate limit exceeded" }
500 Internal Server ErrorAn unexpected server error occurred.{ "message": "Internal Server Error - Please contact Blueshift support." }
502 Bad GatewayService unavailable. Retry with exponential backoff.{ "message": "Bad Gateway - Please retry the request." }
503 Service UnavailableService temporarily unavailable. Retry with exponential backoff.{ "message": "Service Unavailable - Try again later." }
504 Gateway TimeoutServer took too long to respond. Retry with exponential backoff.{ "message": "Gateway Timeout - Retry with exponential backoff." }
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!