{"openapi":"3.0.3","info":{"title":"Products API","description":"Manages product catalogue data and analytics within Dotdigital Personalization. The products API supports importing and querying product records as well as retrieving behavioural analytics — including daily performance metrics and aggregated product analytics — that feed into recommendation and personalisation rules. Operations include searching, importing, retrieving product history, and accessing aggregated analytics.","version":"1.0.1"},"servers":[{"url":"https://{region}-api-freshrelevance.dotdigital.com","variables":{"region":{"description":"The region id your account belongs to","enum":["r1","r2","r3"],"default":"r1"}}}],"security":[{"apiTokenAuth":[]}],"paths":{"/api/{website_id}/products/":{"get":{"tags":["Manage products"],"summary":"Get products.","description":"Retrieves the products from Dotdigital Personalization.","operationId":"getProducts","parameters":[{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"},{"name":"format","in":"query","description":"Get data in JSON format.","required":true,"schema":{"type":"string","enum":["json"]},"example":"json"},{"name":"limit","in":"query","description":"Get this number of records to return in results array (pagination).","schema":{"minimum":1,"type":"integer","default":25},"example":50},{"name":"page","in":"query","description":"Which page of results you wish to return; First page is indexed as 1.","schema":{"type":"integer","default":1},"example":1},{"name":"search","in":"query","description":"Search for this pid value in the product data.","required":false,"schema":{"type":"string"}},{"name":"search_string","in":"query","description":"Text search for this value in the product data.","required":false,"schema":{"type":"string"}},{"name":"only_variants","in":"query","description":"Restrict the search to only variants.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"The page of product data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200"},"examples":{"success":{"value":{"links":{"next":"https://api.freshrelevance.com/api/abc12345/products/?format=json&limit=3&page=2"},"count":609,"total":609,"page":1,"results":[{"_id":"1x8kgjapCEQs8_UiwABdeQ==","n":"Cupcake","prid":"5354107306151","u":"https://experiencedemo.myshopify.com/products/neff-women-s-cupcake-beanie-2014","img":"https://experiencedemo.myshopify.com/cdn/shop/products/cupstraw.jpg?v=1592558322&width=533","sbr":"experiencedemo","curr":"GBP","lang":"en","cat":[],"location_ids":[],"dt":"2024-12-04 16:58:16.929000","dtadded":"2024-12-04 16:39:09.550000","variant_count":0,"variant_keys":[],"variants":{}},{"_id":"r8402XsEczzLK1Ndi-qJsw==","n":"Amy","prid":"5354107502759","u":"https://experiencedemo.myshopify.com/products/neff-women-s-amy-beanie-2014","img":"https://experiencedemo.myshopify.com/cdn/shop/products/wht_5.jpg?v=1592558323&width=533","sbr":"experiencedemo","curr":"GBP","lang":"en","cat":[],"location_ids":[],"dt":"2024-12-04 16:58:16.927000","dtadded":"2024-12-04 16:39:09.309000","variant_count":0,"variant_keys":[],"variants":{}},{"_id":"qAHnT8jSPOJMISSd3hnAhg==","n":"Daily Heather","prid":"5354106781863","u":"https://experiencedemo.myshopify.com/products/neff-cassic-beanie-2015","img":"https://experiencedemo.myshopify.com/cdn/shop/products/dailyheath_purpblk.jpg?v=1592558318&width=533","sbr":"experiencedemo","curr":"GBP","lang":"en","cat":[],"location_ids":[],"dt":"2024-12-04 16:58:16.925000","dtadded":"2024-12-04 16:39:09.306000","variant_count":0,"variant_keys":[],"variants":{}}],"headers":{"n":"Name","prid":"ID","u":"URL","img":"IMG","img_tn":"Thumbnail","up":"Unit Price","uv":"Unit Value","rup":"Regular Unit Price","stock":"Stock","sku":"SKU","sbr":"Site Brand","curr":"Currency","lang":"Language","location_ids":"Location IDs","dt":"Last Updated","dtadded":"Date Added","reviews":"Reviews","variant_count":"Variant Count","variant_keys":"Variant Keys","variants":"Variants"}}}}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"401":{"description":"Unauthorized"},"403":{"$ref":"#/components/responses/403Response"}}}},"/api/{website_id}/products/search/":{"get":{"tags":["Manage products"],"summary":"Search products.","description":"Searches the products in Dotdigital Personalization based on your criteria.","operationId":"getSearchProducts","parameters":[{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"},{"name":"format","in":"query","description":"Get data in JSON format.","required":true,"schema":{"type":"string","enum":["json"]},"example":"json"},{"name":"search","in":"query","description":"The search value.","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","description":"The type to search for the value for. \nIf not specified all types will be checked.\n* **prid** - Product id\n* **vid** - Variant id\n* **id** - Dotdigital Personalization product id\n* **n** - Product name\n* **sku** - Product SKU","required":false,"schema":{"type":"string","enum":["prid","vid","id","n","sku"]}},{"name":"partial","in":"query","description":"Indicate whether to do a partial match of not.","required":false,"schema":{"type":"integer","enum":[0,1],"default":0}},{"name":"limit","in":"query","description":"Get this number of records to return in results array (pagination).","schema":{"minimum":1,"type":"integer","default":25},"example":50},{"name":"page","in":"query","description":"Which page of results you wish to return; First page is indexed as 1.","schema":{"type":"integer","default":1},"example":1}],"responses":{"200":{"description":"The page of product data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200"},"examples":{"success":{"value":{"links":{"next":"https://api.freshrelevance.com/api/abc12345/products/?format=json&limit=3&page=2"},"count":609,"total":609,"page":1,"results":[{"_id":"1x8kgjapCEQs8_UiwABdeQ==","n":"Cupcake","prid":"5354107306151","u":"https://experiencedemo.myshopify.com/products/neff-women-s-cupcake-beanie-2014","img":"https://experiencedemo.myshopify.com/cdn/shop/products/cupstraw.jpg?v=1592558322&width=533","sbr":"experiencedemo","curr":"GBP","lang":"en","cat":[],"location_ids":[],"dt":"2024-12-04 16:58:16.929000","dtadded":"2024-12-04 16:39:09.550000","variant_count":0,"variant_keys":[],"variants":{}},{"_id":"r8402XsEczzLK1Ndi-qJsw==","n":"Amy","prid":"5354107502759","u":"https://experiencedemo.myshopify.com/products/neff-women-s-amy-beanie-2014","img":"https://experiencedemo.myshopify.com/cdn/shop/products/wht_5.jpg?v=1592558323&width=533","sbr":"experiencedemo","curr":"GBP","lang":"en","cat":[],"location_ids":[],"dt":"2024-12-04 16:58:16.927000","dtadded":"2024-12-04 16:39:09.309000","variant_count":0,"variant_keys":[],"variants":{}},{"_id":"qAHnT8jSPOJMISSd3hnAhg==","n":"Daily Heather","prid":"5354106781863","u":"https://experiencedemo.myshopify.com/products/neff-cassic-beanie-2015","img":"https://experiencedemo.myshopify.com/cdn/shop/products/dailyheath_purpblk.jpg?v=1592558318&width=533","sbr":"experiencedemo","curr":"GBP","lang":"en","cat":[],"location_ids":[],"dt":"2024-12-04 16:58:16.925000","dtadded":"2024-12-04 16:39:09.306000","variant_count":0,"variant_keys":[],"variants":{}}],"headers":{"n":"Name","prid":"ID","u":"URL","img":"IMG","img_tn":"Thumbnail","up":"Unit Price","uv":"Unit Value","rup":"Regular Unit Price","stock":"Stock","sku":"SKU","sbr":"Site Brand","curr":"Currency","lang":"Language","location_ids":"Location IDs","dt":"Last Updated","dtadded":"Date Added","reviews":"Reviews","variant_count":"Variant Count","variant_keys":"Variant Keys","variants":"Variants"}}}}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"401":{"description":"Unauthorized"},"403":{"$ref":"#/components/responses/403Response"}}}},"/api/{website_id}/products/import/":{"post":{"tags":["Import products"],"summary":"Product Import","description":"Import Products into the Dotdigital Personalization system by adding products to the Product Import Engine Queue.\n\nThis is an asychronous call and will only queue the products for import. The actual creation / update of products will occur asynchronously after the request has been processed. The time for products to be imported will depend on the number of products, but you should see products start to appear in your Dotdigital Personalization account within a minute or so.\n\n*Note: Maximum rquest size in 5MB* ","parameters":[{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsImport"}}},"required":true},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_202"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}},"401":{"description":"Unauthorized"},"403":{"$ref":"#/components/responses/403Response"}}}},"/api/{website_id}/product_history/":{"get":{"tags":["Product history"],"summary":"Get product history.","description":"Retrieves the product history as a set of records describing when the record last changes and the value and stock level.","operationId":"getProductHistory","parameters":[{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"},{"name":"format","in":"query","description":"Get data in JSON format.","required":true,"schema":{"type":"string","enum":["json"]},"example":"json"},{"name":"limit","in":"query","description":"Get this number of records to return in results array (pagination).","schema":{"minimum":1,"type":"integer","default":25},"example":50},{"name":"page","in":"query","description":"Which page of results you wish to return; First page is indexed as 1.","schema":{"type":"integer","default":1},"example":1}],"responses":{"200":{"description":"The page of stock history data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200_1"},"examples":{"success":{"value":{"links":{"next":"https://api.freshrelevance.com/api/abc1234/product_history/?format=json&limit=5&page=2"},"count":4290560,"total":4290560,"page":1,"results":[{"oid":"To5vN7CAJdfTvJhAfEvpnw==","dt":"2024-06-03T00:00:00Z","uv":707256,"stock":11},{"oid":"To5vN7CAJdfTvJhAfEvpnw==","vid":"34795825692839","dt":"2024-06-03T00:00:00Z","uv":707256},{"oid":"dkD34zQwLrSSA0IDbp0Pqg==","dt":"2024-06-03T00:00:00Z","uv":3371.89,"stock":11},{"oid":"1Sqt7iW2EpnN2QsV4R6efA==","vid":"34795825692839","dt":"2024-06-03T00:00:00Z","uv":318.01},{"oid":"40xG4flfT_GNKC2mY4ZB7Q==","dt":"2024-06-03T00:00:00Z","uv":11617.75,"stock":11}],"headers":{"oid":"original_id","vid":"variant_id","dt":"modified_date","uv":"unit_value","stock":"stock"}}}}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"401":{"description":"Unauthorized"},"403":{"$ref":"#/components/responses/403Response"}}}},"/api/{website_id}/product_analytics/":{"get":{"tags":["Product analytics"],"summary":"Get daily product analytics","description":"Retrieves the product analytics summarized on a daily basis for the specified filter criteria.","operationId":"getDailyProductAnalytics","parameters":[{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"},{"name":"format","in":"query","description":"Get data in JSON format.","required":true,"schema":{"type":"string","enum":["json"]},"example":"json"},{"name":"limit","in":"query","description":"Get this number of records to return in results array (pagination).","schema":{"minimum":1,"type":"integer","default":25},"example":50},{"name":"page","in":"query","description":"Which page of results you wish to return; First page is indexed as 1.","schema":{"type":"integer","default":1},"example":1},{"name":"date_start","in":"query","description":"Start date for the data in ISO-8601 format, defaults to earliest possible date.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"date_end","in":"query","description":"End date for the data in ISO-8601 format, defaults to today.","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"The page of product analytics data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200_2"},"examples":{"success":{"value":{"links":{"next":"https://api.freshrelevance.com/api/abc12345/product_analytics/?date_start=2025-01-01&format=json&limit=2&page=2"},"count":82,"total":82,"page":1,"results":[{"_id":"67770afd836138400fe6157c","imp":1,"wmu":0,"emu":1,"ct":0,"ect":0,"wct":0,"sbr":"experiencedemo","curr":"GBP","lang":"en"},{"_id":"67770afd836138400fe61fcd","imp":1,"wmu":0,"emu":1,"ct":0,"ect":0,"wct":0,"sbr":"experiencedemo","curr":"GBP","lang":"en"}],"headers":{"_id":"ID","prid":"Product ID","name":"Name","imp":"Total Impressions","emu":"Email Impressions","wmu":"Web Impressions","ct":"Total Click Throughs","ect":"Email Click Throughs","wct":"Web Click Throughs","bp":"Browsed Price","bq":"Browsed Quantity","pp":"Purchased Price","pq":"Purchased Quantity","cp":"Carted Price","cq":"Carted Quantity","sbr":"Site Brand","curr":"Currency","lang":"Language"}}}}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"401":{"description":"Unauthorized"},"403":{"$ref":"#/components/responses/403Response"}}}},"/api/{website_id}/product_analytics_aggregated/":{"get":{"tags":["Product analytics"],"summary":"Get aggregated product analytics","description":"Retrieves an aggregation of product analytics daily records over the given date range.<br> *Note: due to database constraints, there is a maximum limit value of 100,000 and results are sorted by bq (browsed quantity).*","operationId":"getAggregatedProductAnalytics","parameters":[{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"},{"name":"format","in":"query","description":"Get data in JSON format.","required":true,"schema":{"type":"string","enum":["json"]},"example":"json"},{"name":"limit","in":"query","description":"Get this number of records to return in results array (pagination).","schema":{"minimum":1,"type":"integer","default":25},"example":50},{"name":"page","in":"query","description":"Which page of results you wish to return; First page is indexed as 1.","schema":{"type":"integer","default":1},"example":1},{"name":"date_start","in":"query","description":"Start date for the data in ISO-8601 format, defaults to earliest possible date.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"date_end","in":"query","description":"End date for the data in ISO-8601 format, defaults to today.","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"The page of product analytics data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200_3"},"examples":{"success":{"value":{"links":{"next":"https://api.freshrelevance.com/api/abc1234/product_analytics_aggregated/?date_end=2025-01-02&date_start=2025-01-01&format=json&limit=2&page=2"},"count":3,"total":3,"page":1,"results":[{"_id":"qAHnT8jSPOJMISSd3hnAhg==","prid":5354106781863,"name":"Daily Heather","imp":1,"wmu":0,"emu":1,"ct":0,"ect":0,"wct":0,"bp":0,"bq":0,"pp":0,"pq":0,"cp":0,"cq":0,"sbr":"experiencedemo","curr":"GBP","lang":"en","rpm":0},{"_id":"r8402XsEczzLK1Ndi-qJsw==","prid":5354107502759,"name":"Amy","imp":1,"wmu":0,"emu":1,"ct":0,"ect":0,"wct":0,"bp":0,"bq":0,"pp":0,"pq":0,"cp":0,"cq":0,"sbr":"experiencedemo","curr":"GBP","lang":"en","rpm":0}],"headers":{"_id":"ID","prid":"Product ID","name":"Name","imp":"Total Impressions","emu":"Email Impressions","wmu":"Web Impressions","ct":"Total Click Throughs","ect":"Email Click Throughs","wct":"Web Click Throughs","bp":"Browsed Price","bq":"Browsed Quantity","pp":"Purchased Price","pq":"Purchased Quantity","cp":"Carted Price","cq":"Carted Quantity","sbr":"Site Brand","curr":"Currency","lang":"Language"}}}}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"401":{"description":"Unauthorized"},"403":{"$ref":"#/components/responses/403Response"}}}}},"components":{"schemas":{"GoogleCurrencyField":{"type":"object","properties":{"google_currency_field":{"type":"string","description":"Used to indicate that the field mapping is linked to a compound price and currency value e.g. 14.99 GBP and this indicates what aspect to extract for this mapping either `uv` the numeric price or `curr` the currency code.","enum":["uv","curr"]}}},"Field":{"required":["source_field_name"],"type":"object","properties":{"source_field_name":{"type":"string","description":"The field in the product data this maps to.","example":"Team ID"},"field_type":{"type":"string","description":"The type of data that is stored in this field. This will be used to validate imported data and provides guarantees around what the data will look like.\n\n* int - integer values such as stock level (e.g. 32)\n* double - non-integer values such as prices (e.g. 32.72)\n* datetime - date, e.g. 2014-12-02T13:27:00.00Z\n* bool - boolean value, supported are \"yes\"/\"no\", \"1\"/\"0\", \"true\"/\"false\". Not case sensitive.\n* stock - converts \"in stock\" or \"yes\" to 1 and other values to 0. Not case sensitive.\n* json - maps {\"key\":\"value\"} to a dictionary / nest of dictionaries\n* jsonpricelist - allows for the import of json-based customer group price lists (requires B2B module)","enum":["bool","datetime","double","int","json","jsonpricelist"]},"list_separator":{"maxLength":1,"minLength":1,"type":"string","description":"If specified we treat the value like CVS using this character as the value seperator.","example":"|"},"ignore_blank":{"type":"boolean","description":"Normally, empty fields in the product will be imported and will overwrite any existing data in the field. If you want to keep existing data when no data is supplied then set this option to `true`.","default":false}}},"ProductsImport":{"required":["field_mapping","products"],"type":"object","properties":{"products":{"type":"array","description":"A list of products records, one record per product. The fields that are expected in these objects are defined in the field mapping","items":{"type":"object","additionalProperties":{}}},"field_mapping":{"$ref":"#/components/schemas/ProductsImport_field_mapping"},"report_job":{"type":"boolean","description":"If true, will return a job ID with the import response which can be used to track the import in Dotdigital Personalization reporting tools","default":false}},"description":"How the product records should be interpreted. The key is the name of the Dotdigital Personalization field and the value of `source_field_name` matches that to a field in the product record.","example":{"products":[{"prid":"10001","name":"Product API Test Product 1","curr":"EUR","desc":"Automatically generated product for product API testing","unit_value":9364.64,"unit_value_currency":"£9364.64","stock":0,"country":"be","created":1675165286,"property3":1,"property1":"green","property4":false},{"prid":"10002","name":"Product API Test Product 2","curr":"EUR","desc":"Automatically generated product for product API testing","unit_value":3603.28,"unit_value_currency":"£3603.28","stock":3,"country":"nl","created":1672569393,"property2":"small","property1":"blue"}],"field_mapping":{"sbr":{"source_field_name":"country"},"lang":{"source_field_name":"country"},"curr":{"source_field_name":"curr"},"prid":{"source_field_name":"prid"},"n":{"source_field_name":"name"},"desc":{"source_field_name":"desc"},"stock":{"source_field_name":"stock"},"uv":{"source_field_name":"unit_value"},"up":{"source_field_name":"unit_value_currency"},"ex.created":{"source_field_name":"created","field_type":"datetime"},"ex.property1":{"source_field_name":"property1"},"ex.property2":{"source_field_name":"property2"},"ex.property3":{"source_field_name":"property3"},"ex.property4":{"source_field_name":"property4"},"ex.property5":{"source_field_name":"property5"},"cat:property1":{"source_field_name":"property1","category_group":"p1","replace_category_group":true},"cat:property2":{"source_field_name":"property2","category_group":"p2","replace_category_group":true},"cat:property3":{"source_field_name":"property3","category_group":"p3","replace_category_group":true},"cat:property4":{"source_field_name":"property4","category_group":"p4","replace_category_group":true},"cat:property5":{"source_field_name":"property5","category_group":"p5","replace_category_group":true}}}},"Headers":{"required":["curr","dt","dtadded","img","img_tn","lang","location_ids","n","prid","reviews","rup","sbr","sku","stock","u","up","uv","variant_count","variant_keys","variants"],"type":"object","properties":{"n":{"type":"string","description":"The terminolgy to use for this."},"prid":{"type":"string","description":"The terminolgy to use for this."},"u":{"type":"string","description":"The terminolgy to use for this."},"img":{"type":"string","description":"The terminolgy to use for this."},"img_tn":{"type":"string","description":"The terminolgy to use for this."},"up":{"type":"string","description":"The terminolgy to use for this."},"uv":{"type":"string","description":"The terminolgy to use for this."},"rup":{"type":"string","description":"The terminolgy to use for this."},"stock":{"type":"string","description":"The terminolgy to use for this."},"sku":{"type":"string","description":"The terminolgy to use for this."},"sbr":{"type":"string","description":"The terminolgy to use for this."},"curr":{"type":"string","description":"The terminolgy to use for this."},"lang":{"type":"string","description":"The terminolgy to use for this."},"location_ids":{"type":"string","description":"The terminolgy to use for this."},"dt":{"type":"string","description":"The terminolgy to use for this."},"dtadded":{"type":"string","description":"The terminolgy to use for this."},"reviews":{"type":"string","description":"The terminolgy to use for this."},"variant_count":{"type":"string","description":"The terminolgy to use for this."},"variant_keys":{"type":"string","description":"The terminolgy to use for this."},"variants":{"type":"string","description":"The terminolgy to use for this."}},"description":"Key terminolgy mappings."},"PaginatedData":{"required":["count","links","page","total"],"type":"object","properties":{"page":{"minimum":1,"type":"integer","description":"The index for the page of data returned.","example":1},"count":{"minimum":0,"type":"integer","description":"Number of records in the page.","example":12},"total":{"minimum":0,"type":"integer","description":"Total number of records in the set.","example":12},"links":{"$ref":"#/components/schemas/PaginatedData_links"}},"description":"Data page and pagination links"},"Product":{"required":["_id"],"type":"object","properties":{"_id":{"type":"string","description":"The Dotdigital Personalization unique identifier for a product.","example":"hK8cs10zbudEoqpkl2IvFQ=="},"related":{"type":"array","description":"The product ids related to this product.","example":["32323211","21324343"],"items":{"type":"string"}},"cat":{"type":"array","description":"The categories the product belongs to.","example":["Skis"],"items":{"type":"string"}},"curr":{"type":"string","description":"Price currency - ISO 4217 currency code.","example":"USD"},"n":{"type":"string","description":"Name of the product.","example":"Ti Xelium Skis DH6"},"u":{"type":"string","description":"Product URL.","format":"url","example":"https://example.com/prd/5354127294631"},"prid":{"type":"string","description":"Your unique product id.","example":"5354127294631"},"sku":{"type":"string","description":"The SKU for the product.","example":"SKI-TI-XELIUM-DH6"},"rid":{"type":"string","description":"Product review ID.","example":"df234a"},"sbr":{"type":"string","description":"Site brand.","example":"AbsoluteSki"},"desc":{"type":"string","description":"Product description.","example":"Power turn skis"},"img":{"type":"string","description":"Product image URL.","format":"url"},"img_tn":{"type":"string","description":"Product thumbnail URL.","format":"url"},"uv":{"type":"number","description":"Unit value, price in numeric format.","example":180},"up":{"type":"string","description":"Unit price, price with currency symbol.","example":"$180.00"},"ruv":{"type":"number","description":"Regular unit value (e.g. price before any sale or offer) numeric value.","example":220},"rup":{"type":"string","description":"Regular unit price (e.g. price before any sale or offer) value with currency symbol.","example":"$220.00"},"qty":{"type":"integer","description":"Quantity sold in e.g. multi packs.","example":1},"stock":{"type":"integer","description":"Quantity in stock.","example":12},"ex":{"type":"object","description":"Extension properties.","example":{"color":"red","width":330,"height":1500,"depth":260}},"opt":{"$ref":"#/components/schemas/Product_opt"},"lang":{"type":"string","description":"Language of the product description using ISO 639 language codes.","example":"en"},"promo":{"type":"array","description":"Promotional flags.","items":{"type":"string"}},"reviews":{"$ref":"#/components/schemas/Product_reviews"},"review_locale":{"type":"string","description":"Language Location using a combination of ISO 639 language codes and ISO 3166-1 alpha-2 format country code.","example":"en-GB"},"vid":{"type":"string","description":"Variant identifier.","example":"5354127294631-1"},"pth":{"type":"string","description":"Path of the product e.g. clothes/jumpers. Should only be used of the path is fixed for one product. Product ID / SKU preferred.","example":"snow/skis/5354127294631"},"variants":{"type":"array","description":"Variants","items":{"type":"object"}},"location_ids":{"type":"array","description":"Location ids for this product.","items":{"type":"string"}},"variant_count":{"type":"integer","description":"How many variants exist.","example":3},"variant_keys":{"type":"array","description":"List of variant ids","items":{"type":"string"}},"dt":{"type":"string","description":"Date last modified in ISO-8601 format.","example":"2024-10-31T05:38:33.878Z"},"edt":{"type":"string","description":"Date last used in an email in ISO-8601 format.","example":"2024-10-31T05:38:33.878Z"},"dtadded":{"type":"string","description":"Date first added in ISO-8601 format.","example":"2024-10-31T05:38:33.878Z"},"ai":{"type":"object","description":"AI details."},"meta":{"type":"object","description":"Meta data."}},"description":"Product details"},"inline_response_200":{"allOf":[{"$ref":"#/components/schemas/PaginatedData"},{"required":["headers","results"],"type":"object","properties":{"results":{"type":"array","description":"The product records.","items":{"$ref":"#/components/schemas/Product"}},"headers":{"$ref":"#/components/schemas/Headers"}},"description":"The product details."}]},"inline_response_202":{"required":["productsRead","validProducts"],"type":"object","properties":{"productsRead":{"type":"integer","description":"The total number of products that were attempted to be imported.","example":100},"validProducts":{"type":"integer","description":"The number of valid products that have the required mandatory data.","example":99},"jobId":{"type":"string","description":"The unique job id for the import.","example":"1ca0430d-a062-4881-b001-187f325ec646"}}},"inline_response_400":{"required":["invalidProducts"],"type":"object","properties":{"invalidProducts":{"type":"integer","description":"Number of products that are invalid and cannot be processed."},"jobId":{"type":"string","description":"The unique job id for the import.","example":"1ca0430d-a062-4881-b001-187f325ec646"}}},"inline_response_200_1":{"allOf":[{"$ref":"#/components/schemas/PaginatedData"},{"required":["headers","results"],"type":"object","properties":{"results":{"type":"array","description":"The product history records.","items":{"$ref":"#/components/schemas/inline_response_200_1_results"}},"headers":{"$ref":"#/components/schemas/inline_response_200_1_headers"}},"description":"The product history."}]},"inline_response_200_2":{"allOf":[{"$ref":"#/components/schemas/PaginatedData"},{"required":["headers","results"],"type":"object","properties":{"results":{"type":"array","description":"The daily product analytics.","items":{"$ref":"#/components/schemas/inline_response_200_2_results"}},"headers":{"$ref":"#/components/schemas/inline_response_200_2_headers"}},"description":"The product analytics."}]},"inline_response_200_3":{"allOf":[{"$ref":"#/components/schemas/PaginatedData"},{"required":["headers","results"],"type":"object","properties":{"results":{"type":"array","description":"The aggregated daily product analytics.","items":{"$ref":"#/components/schemas/inline_response_200_2_results"}},"headers":{"$ref":"#/components/schemas/inline_response_200_2_headers"}},"description":"The product analytics."}]},"ProductsImport_field_mapping":{"required":["prid"],"type":"object","properties":{"prid":{"allOf":[{"description":"The unique product id using same coded values as will be used by Dotdigital Personalization to capture data from the website."},{"$ref":"#/components/schemas/Field"}]},"vid":{"allOf":[{"description":"The variant identifier for variants of a product."},{"$ref":"#/components/schemas/Field"}]},"sku":{"allOf":[{"description":"The SKU for the product."},{"$ref":"#/components/schemas/Field"}]},"n":{"allOf":[{"description":"The name of the product."},{"$ref":"#/components/schemas/Field"}]},"desc":{"allOf":[{"description":"The description of the product."},{"$ref":"#/components/schemas/Field"}]},"qty":{"allOf":[{"description":"Quantity it is sold in."},{"$ref":"#/components/schemas/Field"}]},"img":{"allOf":[{"description":"Product image URL."},{"$ref":"#/components/schemas/Field"}]},"img_tn":{"allOf":[{"description":"Product image thumbnail URL."},{"$ref":"#/components/schemas/Field"}]},"u":{"allOf":[{"description":"Product page URL."},{"$ref":"#/components/schemas/Field"}]},"pth":{"allOf":[{"description":"Path of the product e.g. clothes/jumpers. Should only be used of the path is fixed for one product. Product ID / SKU preferred."},{"$ref":"#/components/schemas/Field"}]},"up":{"allOf":[{"description":"Unit price (as seen by the user), with the currency symbol and value e.g. $14.99"},{"$ref":"#/components/schemas/Field"}]},"rup":{"allOf":[{"description":"Regular unit price (e.g. price before any sale or offer), with the currency symbol and value e.g. $19.99"}]},"uv":{"allOf":[{"description":"Unit value, the products numeric value in the currency e.g. 14.99"},{"$ref":"#/components/schemas/Field"},{"$ref":"#/components/schemas/GoogleCurrencyField"}]},"cg_prices":{"allOf":[{"description":"A customer group is a set of prices to allow different pricing by groups."},{"$ref":"#/components/schemas/Field"}]},"curr":{"allOf":[{"description":"Price currency - ISO 4217 currency code e.g. USD"},{"$ref":"#/components/schemas/Field"},{"$ref":"#/components/schemas/GoogleCurrencyField"}]},"stock":{"allOf":[{"description":"Quantity in stock."},{"$ref":"#/components/schemas/Field"}]},"sbr":{"allOf":[{"description":"Site brand of the product, for sites that support this."},{"$ref":"#/components/schemas/Field"}]},"lang":{"allOf":[{"description":"Language of the product description using [ISO 639 language codes](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) e.g. en"},{"$ref":"#/components/schemas/Field"}]},"cat":{"allOf":[{"description":"Separated list of categories for this product. You can set what separator character is used in the field mapping."},{"$ref":"#/components/schemas/Field"},{"type":"object","properties":{"category_group":{"type":"string","description":"Used to indicate the grouping for the categories / tags being mapped.","example":"style"},"replace_category_group":{"type":"boolean","description":"If `true` this will replace all existing values in the category / tag group with the imported value.","default":false}}}]},"promo":{"allOf":[{"description":"Separated list of promotional flags for this product. You can set what separator character is used in the field mapping."},{"$ref":"#/components/schemas/Field"}]},"related":{"allOf":[{"description":"Separated list of product ids related this product. You can set what separator character is used in the field mapping."},{"$ref":"#/components/schemas/Field"}]},"location_ids":{"allOf":[{"description":"Location information for the product, if location based."},{"$ref":"#/components/schemas/Field"}]},"rid":{"allOf":[{"description":"Product review ID (rid) field, if neither the product ID or SKU values are suitable for this purpose."},{"$ref":"#/components/schemas/Field"}]},"reviews.rating":{"allOf":[{"description":"The average review rating for the product e.g. 4.9"},{"$ref":"#/components/schemas/Field"}]},"reviews.ratingCount":{"allOf":[{"description":"The number of reviews that contributed to the average score."},{"$ref":"#/components/schemas/Field"}]}},"additionalProperties":{"$ref":"#/components/schemas/Field"},"example":"{\"prid\":{\"source_field_name\":\"product_id\"},\"n\":{\"source_field_name\":\"product_name\"},\"uv\":{\"source_field_name\":\"product_price\"},\"img\":{\"source_field_name\":\"product_image\"},\"u\":{\"source_field_name\":\"product_url\"},\"curr\":{\"source_field_name\":\"product_currency\"},\"stock\":{\"source_field_name\":\"product_stock\",\"field_type\":\"int\"},\"ex.brand\":{\"source_field_name\":\"product_brand\"},\"cat:brand\":{\"source_field_name\":\"brand\",\"category_group\":\"brand\",\"list_separator\":\">\",\"replace_category_group\":true},\"cat:1\":{\"source_field_name\":\"categories\",\"category_group\":\"category\",\"list_separator\":\">\",\"replace_category_group\":true}}"},"PaginatedData_links":{"type":"object","properties":{"next":{"type":"string","description":"URL of the next page.","format":"url","nullable":true},"previous":{"type":"string","description":"URL of the previous page.","format":"url","nullable":true}},"description":"Page navigation links"},"Product_opt":{"type":"object","properties":{"img":{"type":"string","description":"Product image URL.","format":"url"},"img_tn":{"type":"string","description":"Product thumbnail URL.","format":"url"},"n":{"type":"string","description":"Name of the product.","example":"Ti Xelium Skis DH6"},"u":{"type":"string","description":"Product URL.","format":"url","example":"https://example.com/prd/5354127294631"},"uv":{"type":"number","description":"Unit value, price in numeric format.","example":180},"up":{"type":"string","description":"Unit price, price with currency symbol.","example":"$180.00"},"ruv":{"type":"number","description":"Regular unit value (e.g. price before any sale or offer) numeric value.","example":220},"rup":{"type":"string","description":"Regular unit price (e.g. price before any sale or offer) value with currency symbol.","example":"$220.00"}},"description":"Options"},"Product_reviews":{"type":"object","properties":{"dt":{"type":"string","description":"Date of last review in ISO-8601 format.","example":"2024-10-31T05:38:33.878Z"}},"description":"Product review details."},"inline_response_200_1_results":{"required":["dt","oid","stock","uv","vid"],"type":"object","properties":{"oid":{"type":"string","description":"The product id.","example":"To5vN7CAJdfTvJhAfEvpnw=="},"vid":{"description":"The product variant id.","nullable":true,"example":"GBP"},"dt":{"type":"string","description":"The date time when the product record was modified.","format":"date-time","example":"2024-06-03T00:00:00Z"},"uv":{"type":"number","description":"The unit value for the product.","nullable":true,"example":19.99},"stock":{"type":"integer","description":"Stock level for the product.","nullable":true,"example":12}}},"inline_response_200_1_headers":{"required":["dt","oid","stock","uv","vid"],"type":"object","properties":{"oid":{"type":"string","description":"The terminolgy to use for this."},"vid":{"type":"string","description":"The terminolgy to use for this."},"dt":{"type":"string","description":"The terminolgy to use for this."},"uv":{"type":"string","description":"The terminolgy to use for this."},"stock":{"type":"string","description":"The terminolgy to use for this."}},"description":"Key terminolgy mappings."},"inline_response_200_2_results":{"required":["_id","bp","bq","cp","cq","ct","curr","ect","emu","imp","lang","name","pp","pq","prid","rpm","sbr","wct","wmu"],"type":"object","properties":{"_id":{"type":"string","description":"The record id.","example":"678a9794836138400fdd5e19"},"prid":{"type":"string","description":"Product id.","nullable":true},"name":{"type":"string","description":"Product name.","nullable":true},"imp":{"type":"number","description":"Total impressions."},"wmu":{"type":"number","description":"Web impressions."},"emu":{"type":"number","description":"Email impressions."},"ct":{"type":"number","description":"Total click-throughs."},"ect":{"type":"number","description":"Email click-throughs."},"wct":{"type":"number","description":"Web click-throughs."},"bp":{"type":"number","description":"Browsed price."},"bq":{"type":"number","description":"Browsed quantity."},"pp":{"type":"number","description":"Purchased price."},"pq":{"type":"number","description":"Purchased quantity."},"cp":{"type":"number","description":"Carted price."},"cq":{"type":"number","description":"Carted quantity."},"sbr":{"type":"string","description":"Site brand.","nullable":true},"curr":{"type":"string","description":"Currency - ISO 4217 currency code e.g. USD.","nullable":true},"lang":{"type":"string","description":"Language of the product description using [ISO 639 language codes](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) e.g. en'","nullable":true},"rpm":{"type":"number","description":"Revenue per mile","nullable":true}}},"inline_response_200_2_headers":{"required":["_id","bp","bq","cp","cq","ct","curr","ect","emu","imp","lang","name","pp","pq","prid","sbr","wct","wmu"],"type":"object","properties":{"_id":{"type":"string","description":"The terminolgy to use for this."},"prid":{"type":"string","description":"The terminolgy to use for this."},"name":{"type":"string","description":"The terminolgy to use for this."},"imp":{"type":"string","description":"The terminolgy to use for this."},"emu":{"type":"string","description":"The terminolgy to use for this."},"wmu":{"type":"string","description":"The terminolgy to use for this."},"ct":{"type":"string","description":"The terminolgy to use for this."},"ect":{"type":"string","description":"The terminolgy to use for this."},"wct":{"type":"string","description":"The terminolgy to use for this."},"bp":{"type":"string","description":"The terminolgy to use for this."},"bq":{"type":"string","description":"The terminolgy to use for this."},"pp":{"type":"string","description":"The terminolgy to use for this."},"pq":{"type":"string","description":"The terminolgy to use for this."},"cp":{"type":"string","description":"The terminolgy to use for this."},"cq":{"type":"string","description":"The terminolgy to use for this."},"sbr":{"type":"string","description":"The terminolgy to use for this."},"curr":{"type":"string","description":"The terminolgy to use for this."},"lang":{"type":"string","description":"The terminolgy to use for this."}},"description":"Key terminolgy mappings."}},"responses":{"ErrorResponse":{"description":"An error occurred","content":{"application/json":{"schema":{"required":["error","ok"],"type":"object","properties":{"ok":{"type":"boolean","description":"Indicates the call failed","enum":[false]},"error":{"oneOf":[{"type":"string","description":"The reason the call errored","example":"Validation error. No folder bd8eciompb7y, unable to delete"},{"type":"object","additionalProperties":{"minItems":1,"type":"array","items":{"type":"string","example":"This field may not be null."}},"description":"Fields with issues and their errors"}]}}}}}},"403Response":{"description":"Forbidden - Usually you are requesting data for a website you don't have access to."}},"parameters":{"WebsiteId":{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"},"FormatJson":{"name":"format","in":"query","description":"Get data in JSON format.","required":true,"schema":{"type":"string","enum":["json"]},"example":"json"},"Limit":{"name":"limit","in":"query","description":"Get this number of records to return in results array (pagination).","schema":{"minimum":1,"type":"integer","default":25},"example":50},"Page":{"name":"page","in":"query","description":"Which page of results you wish to return; First page is indexed as 1.","schema":{"type":"integer","default":1},"example":1}},"securitySchemes":{"apiTokenAuth":{"type":"apiKey","name":"x-api-key","in":"header"}}},"x-samples-languages":["curl","csharp","java","javascript","node","python","php","ruby"]}