Techdocs
  • Introduction
  • Implementing Nosto
    • Implement on your website
      • Manual Tagging - Essentials
        • Setting up your account
        • Adding the Nosto Script
        • Adding the Cart Tagging
        • Adding the Customer information
        • Adding the Product Tagging
          • Default Product Tagging
          • Basic Tagging
        • Adding the Category/Brand Tagging
        • Adding the Search Tagging
        • Adding the Order Tagging
        • Defining Nosto placements
        • Tagging your page types
      • Advanced Usage
        • Extending tagging with SKUs
        • Adding support for multi-currency
        • Adding support for customer group pricing
      • FAQ
    • Implement on native mobile
    • Implement on a physical store
    • Implement Search & Categories
      • Using Search Templates
        • Using Search Templates
        • Implementing Search page
        • Implementing Autocomplete
        • Implementing Category pages
        • Testing & deployment
        • FAQ
      • Using the API
        • Use the Search & Categories API
        • Implement Search results page
        • Implement Autocomplete
        • Implement Category pages
        • FAQ
      • Using the JavaScript Library
        • Implement Autocomplete using the Nosto Autocomplete library
          • Installation
          • Initialization
            • Render results
            • Submit search
          • Create Autocomplete template
          • Further reading
    • Check your setup
    • Template customization
      • Starting points
      • Product cards
      • Styling
      • Scripting
  • APIs
    • GraphQL
      • The Playground
      • Using the API
      • Testing and Debugging
      • Using Mutations
        • Updating Products
        • Updating Categories
        • Updating Identities
        • GraphQL: Onsite Sessions
        • Working with Orders
          • GraphQL: Placing Orders
          • GraphQL: Updating Order Statuses
      • Using Queries
        • Querying Products
        • Querying Identities
        • Querying Orders
        • Querying Recommendations
        • Querying Segments
        • Querying Search
        • Querying Category Merchandising Products (CM 1.0)
      • For iOS & Android
      • For Headless
    • REST
      • GDPR
        • Redacting customer data
        • Initiating data takeouts
      • Customers
        • Blacklisting Customers
        • Toggling marketing consent
      • Products
        • Updating Products
        • Discontinuing Products
        • Recrawling Products
      • Other
        • Updating Rates
    • Frontend
      • Session API
        • Terminology
        • Setting up
        • Managing Sessions
        • Handling Placements
        • Tracking Events
        • Leveraging Features
        • Record Attribution
        • Advanced Usage
          • Supporting opt-out and do-not-track
          • Using external session identifiers
          • Adding support for multi-currency
          • Adding support for customer group pricing
        • FAQ
      • JS API
        • Initializing Nosto
        • Recommendations
          • Loading Recommendations
          • Recommendation Callbacks
          • Setting up dynamic filtering
          • Sending Product-View Events
          • Sending Add to Cart-Events
        • Popups
          • Listing Popup Campaigns
          • Opening a Popup
          • Enabling & Disabling Popups
          • Popup Callbacks
        • Advanced Usage
          • Sending email addresses to Nosto
          • Manually segmenting users
          • Dynamically sending the cart content
          • Sending Customer Information
        • Record Attribution
      • Open Source
        • Nosto JS
        • Search JS
        • Nosto React
        • Web Components
          • Loading Web components
  • User Generated Content
    • UGC Techdocs
  • 3rd party data integrations
    • Shopify
    • Magento 2
    • Magento
    • BigCommerce
    • Shopware 6
    • Shopware 5
    • Prestashop
    • Salesforce
    • PHP-SDK
Powered by GitBook
On this page
  • Sending the categories
  • How can I get an API token?
  • How many items can I update at a time?
  • How often can I update products?
  • When should I make an API call?
  • Is there any additional benefit of using the product API?
  • What fields are required?

Was this helpful?

Export as PDF
  1. APIs
  2. REST
  3. Products

Updating Products

While Nosto's crawler attempts to keep its copy of your catalog as fresh as possible, there are scenarios where we may not be able to update all the information as quickly as needed.

In these scenarios, we recommend that you implement our enhanced Products API which allows you push all your product metadata and have the changes instantly reflect across our entire engine.

For example, if you add a discount of -10% to all the products in your "Shirts" category, you can use the Products API to bulk update all the products.

Here's an example of a Curl request.

curl -v --user :WI0j2oN7TgG42tlblX3yzOQ5xvCYc2oYj9eWg79lghVq8R0nKQXlVE9wvihBUFOw -H "Content-Type: application/json" -X POST https://api.nosto.com/v1/products/upsert -d '
[
  {
    "url":"http://shop.example.com/product/123",
    "product_id":"123",
    "name":"Example product 123",
    "image_url":"http://cdn.example.com/product_123.jpg",
    "price_currency_code":"EUR",
    "availability":"InStock",
    "rating_value":"3.8",
    "review_count":"15",
    "categories":[
      "sale",
      "sale/summer",
      "sale/summer/shirts",
      "sale/summer/shirts/long-sleeve-shirts"
    ],
    "description":"Example description",
    "price":10.00,
    "list_price":12.34,
    "brand":"Example Brand",
    "tag1":[
      "red",
      "green"
    ],
    "tag2":[
      "women"
      "promo:mens"
    ],
    "tag3":[
      "Foldable"
    ],
    "date_published":"2013-­04-­23",
    "variation_id":"EUR_1",
    "alternate_image_urls": [
      "http://cdn.example.com/product_123-1.jpg",
      "http://cdn.example.com/product_123-2.jpg",
      "http://cdn.example.com/product_123-3.jpg",
    ],
    "variations":{
      "USD_2":{
        "price_currency_code":"USD",
        "availability":"InStock",
        "price":12.00,
        "list_price":15.67
      },
      "GBP_3":{
        "price_currency_code":"GBP",
        "availability":"OutOfStock",
        "price":20.00,
        "list_price":21.99
      }
    },
    "inventory_level":25,
    "supplier_cost":1312.96,
    "custom_fields":{
      "material":"Cotton",
      "weather":"Summer"
    },
    "skus":[
      {
        "id":"123-2",
        "name":"S-Blue",
        "price":1269.0,
        "list_price":1299.0,
        "url":"http://www.example.com/product/CANOE123#/1-size-s/14-color-blue",
        "image_url":"http://www.example.com/product/images/CANOE123-1.jpg",
        "availability":"InStock",
        "inventory_level":35,
        "custom_fields":{
          "size":"S",
          "color":"Blue"
        }
      },
      {
        "id":"123-1",
        "name":"S-Orange",
        "price":1269.0,
        "list_price":1299.0,
        "url":"http://www.example.com/product/CANOE123#/1-size-s/13-color-orange",
        "image_url":"http://www.example.com/product/images/CANOE123-1.jpg",
        "availability":"InStock",
        "inventory_level":42,
        "custom_fields":{
          "size":"S",
          "color":"Orange"
        }
      }
    ]
  }
]'

Sending the categories

Categories must always be delimited by a slash. For example, Home/Accessories or sale/summer/shirts/long-sleeve-shirts is a valid category while Home > Accessories is not.

How can I get an API token?

How many items can I update at a time?

The Products API takes an array of product metadata and has no hard limit on the number of items that you can specify and is only limited by the maximum size of the payload of 2 MB.

How often can I update products?

You can update products as often as you need although, initially you'll need to send the entire catalog to populate the replica of your catalog on Nosto.

When should I make an API call?

You should make an API call when any product information changes. If a non-critical field of the product e.g. description, has changed, you can delay the product update as descriptions are rarely visible to the end customer. When the price or availability of the product changes, you should make an API call right away as this will instantly reflect in the recommendations.

Is there any additional benefit of using the product API?

While the product API contains the full superset of the information in the tagging, it also allows you to pass sensitive information to us. Sensitive information is fields such as the supplier cost (margin) and the inventory level. These fields are only mutable via the API.

What fields are required?

The following fields are required:

  • product_id

  • name

  • url

  • image_url

  • availability

  • price

  • price_currency_code

PreviousProductsNextDiscontinuing Products

Last updated 1 year ago

Was this helpful?

You can request an API token (API_PRODUCTS) by getting in touch with our support personnel. Once the token has been granted, you will be able to find it listed in the

authentication tokens section in the admin.