- 19 Nov 2024
- DarkLight
Enhanced (google) Feed API: Publisher (retail)
- Updated on 19 Nov 2024
- DarkLight
Publisher Product API: Enhanced Feeds
(Download the PDF above)
What is this?
The Publisher Product API allows a publisher to download an Awin Feed in the Json Line format (jsonl).
This document is intended for software engineers integrating the new feed system with this API. Not all Awin Advertisers are currently using the new feed system, but do not hesitate to contact your preffered advertisers to request them to make the switch.
Authentication
You will need to include an access token with every request, see the documentation here. This access token should be included in the HTTP header.
Unauthorised Response
Check the access token has been set correctly in the HTTP header.
Response code: 401
Response type: JSON
{ "error": 401, "message": "Full authentication is required to access this resource." } |
Access Denied Response
Check the access token corresponds to the user the request is being made for.
Response code: 403
Response type: JSON
{ "error": 403, "message": "Access Denied." } |
Download an Awin Feed
To download an Awin Feed make a GET request to the following URL, remember to include the authentication token.
https://api.awin.com/publishers/{PUBLISHER_ID}/awinfeeds/download/{ADVERTISER_ID}-{VERTICAL}-{LOCALE}.jsonl | ||
PUBLISHER_ID | Your Awin Publisher ID | |
ADVERTISER_ID | An Awin Advertiser ID | |
VERTICAL | Currently only retail is accepted | |
LOCALE | The advertiser’s Awin Feed Language, all available combinations of languages and locales are currently available. For example:
|
URL example:
https://api.awin.com/publishers/12345/awinfeeds/download/6789-retail-en_GB.jsonl | ||
PUBLISHER_ID | 12345 | |
ADVERTISER_ID | 6789 | |
VERTICAL | retail | |
LOCALE | en_GB |
Curl example:
curl -X 'GET' \ 'https://api.awin.com/publishers/12345/awinfeeds/download/6789-retail-en_GB.jsonl' \ |
Not Found Response
If a not found response is encountered check the URL parameters are set correct for Publisher ID, Advertiser ID, Vertical and Locale.
Response code: 404
Response type: JSON
{ "message": "Locale not found" } |
Successful Response
If an Awin feed exists and permission is granted to download a success response will be received.
Awin Feeds use the JSON Lines format (JSONL), the response type will use this format.
Response code: 200
Response type: JSONL
Awin Feed Format
JSON Lines
Is one valid JSON value per line, encoded using UTF-8.
In this example there are 3 JSON values on 3 lines. Each JSON value is a valid JSON object.
Usage Limits
We ask that publishers limit themselves to no more than 5 requests per minute.
It is not possible to make concurrent requests to the same advertiser feed.
Product Example:
{"meta":{”advertiser_id”:1001,”advertiser_name”:”Example Merchant”}, "product_details":{"product_basic":{"id":"16817108","title":"Organic Cotton Men''s T-Shirt - Blue - M","description":"Made from 100% organic cotton, this classic red men''s polo has a slim fit and signature logo embroidered on the left chest. Machine wash cold; imported.","link":"https://www.example.com/writing/pens","image_link":"http://www.example.com/image1.jpg","additional_image_link":["http://www.example.com/image1.jpg","http://www.example.com/image2.jpg"],"mobile_link":"https://www.m.example.com/writing/pens","aw_deep_link":"https://www.awin1.com/cread.php?awinmid=12345&awinaffid=6789&ued=https://www.example.com/writing/pens","aw_mobile_link":"https://www.awin1.com/cread.php?awinmid=12345&awinaffid=6789&ued=https://www.m.example.com/writing/pens"},"price_and_availability":{"availability":"in_stock","availability_date":"2023-12-25T13:00-0800","expiration_date":"2023-12-26T13:00-0800","price":"15.00 GBP","sale_price":"5.00 GBP","sale_price_effective_date":"2022-02-24T13:00-0800/2022-03-29T15:30-0800","cost_of_goods_sold":"3526.63 USD","unit_pricing_measure":"750 ml","unit_pricing_base_measure":"100 ml","installment":{"months":6,"amount":"50 BRL"},"subscription_cost":{"period":"month","period_length":"12","amount":"35.00 EUR"},"loyalty_points":"Programme A:100:0.5"},"product_category":{"google_product_category_id":"1234","google_product_category":"Apparel & Accessories > Clothing > Dresses","product_type":"Home > Women > Dresses > Maxi Dresses"},"product_identifiers":{"brand":"Google","gtin":"3243567980126","mpn":"EXA12345MPLE","identifier_exists":"yes"},"product_detailed":{"condition":"new","adult":"yes","multipack":20,"is_bundle":false,"energy_efficiency_class":"A+","min_energy_efficiency_class":"A+","max_energy_efficiency_class":"D","age_group":"adult","color":"yellow","gender":"unisex","material":"Cotton/polyester/elastane","pattern":"Striped","size":"L","size_type":["regular","plus"],"size_system":"UK","item_group_id":"AB12345","product_length":"14 cm","product_width":"14 cm","product_height":"14 cm","product_weight":"173 g","product_detail":[{"section_name":"General","attribute_name":"Product Type","attribute_value":"Digital player"},{"section_name":"General","attribute_name":"Product Type","attribute_value":"Digital Video"}],"product_highlight":["Supports thousands of apps, including Netflix, YouTube, HBO Now, Spotify, Showtime, Pandora, Google Play Movies","Supports thousands of apps, including Netflix, YouTube, HBO Now, Spotify, Showtime, Pandora, Google Play Movies","Supports thousands of apps, including Netflix, YouTube, HBO Now, Spotify, Showtime, Pandora, Google Play Movies"]},"shopping_campaign":{"lifestyle_image_link":"https://www.example.com/image1.jpg"},"delivery":{"shipping":[{"country":"US","region":"US","postal_code":"80302","service":"Overnight","price":"16.00 USD","min_handling_time":"1","max_handling_time":"1","min_transit_time":"3","max_transit_time":"3"}],"shipping_weight":"3 kg","shipping_length":"20 in","shipping_width":"40 cm","shipping_height":"20 in","ships_from_country":"DE","min_handling_time":1,"max_handling_time":10},"tax":{"tax":[{"country":"US","region":"CA","postal_code":"94043","rate":"8.75","tax_ship":"yes"}]}}}
This is an example of one valid product, there should not be any new lines within the product’s JSON.
Product Sections
An Awin Product consists of sections which contain the individual fields that contain product information.
Meta
advertiser_id | Awin’s unique ID for the advertiser programme, Integer |
advertiser_name | Name of the advertiser programme, String |
{"meta": {”advertiser_id”:1001,”advertiser_name”:”Example Merchant”}} |
Basic Product Data
id | Advertiser’s unique product ID to identify each product
1–50 characters |
{"product_basic":{"id":"16817108"}} |
title | Product name
1–150 characters |
{"product_basic":{"title":"Organic Cotton Men''s T-Shirt - Blue - M"}} |
description | Product description
1–5,000 characters |
{"product_basic":{"Made from 100% organic cotton, this classic red men''s polo has a slim fit and signature logo embroidered on the left chest. Machine wash cold; imported."}} |
link | Direct link to the product – non-trackable URL (including http or https), ASCII characters only RFC 3986 compliant 1–2,000 characters |
{"product_basic":{"link":"https://www.example.com/writing/pens"}} |
image_link | Direct link to the product image URL (including http or https), ASCII characters only RFC 3986 compliant 1–2,000 characters |
{"product_basic":{"image_link":"http://www.example.com/image1.jpg"}} |
additional_image link - Optional | Direct links to additional product images Json Array of String
RFC 3986 compliant 1–2,000 characters |
{"product_basic":{"additional_image_link":[ "http://www.example.com/image1.jpg", "http://www.example.com/image2.jpg" ]}} |
mobile_link - Optional | A mobile-optimised version of advertiser’s landing page link – non-trackable URL (including http or https), ASCII characters only RFC 3986 compliant 1–2,000 characters |
{"product_basic":{"mobile_link":"https://www.m.example.com/writing/pens"}} |
aw_deep_link | Direct link to the product – trackable 1-2,000 characters |
{"product_basic":{"aw_deep_link":" https://www.awin1.com/cread.php?awinmid=12345&awinaffid=6789&ued=https://www.example.com/product/17290"}} |
aw_mobile_link | A mobile-optimised version of advertiser’s landing page link - trackable 1–2,000 characters |
{"product_basic":{"aw_mobile_link": "https://www.awin1.com/cread.php?awinmid=12345&awinaffid=6789&ued=https://www.m.example.com/writing/pens"}} |
virtual_model_link | When provided by an advertiser, use to promote 3D or AR models of the products. 1–2,000 characters |
{"product_basic":{"avirtual_model_link: "https://www.awin1.com/cread.php?awinmid=12345&awinaffid=6789&ued=https://www.m.example.com/writing/pens"}} |
Price and Availability
availability | Product Availability Supported values are available in English only
If 'preorder' or 'backorder' are set, the 'availability_date' will be provided |
{"price_and_availability":{"availability":"in_stock"}} |
availability_date | Date a product set to 'preorder' or 'backorder' becomes available YYYY-MM-DDThh:mm[±hhmm], or YYYY-MM-DDThh:mmZ |
{"price_and_availability":{"availability_date":"2023-12-25T13:00-0800"}} |
expiration_date - Optional | The date the product will stop being available YYYY-MM-DDThh:mm[±hhmm], or YYYY-MM-DDThh:mmZ |
{"price_and_availability": "expiration_date":"2023-12-26T13:00-0800"}} |
price | Product price Number plus currency (ISO 4217) |
{"price_and_availability":{"price":"15.00 GBP"}} |
sale_price | Product price during sale periods Number plus currency (ISO 4217) |
{"price_and_availability":{"sale_price":"5.00 GBP"}} |
sale_price_effective_date | To indicate the date range the sale will run for when using the sale_price attribute YYYY-MM-DDThh:mm[±hh:mm]/YYYY-MM-DDThh:mm[±hh:mm]/, or YYYY-MM-DDThh:mmZ/YYYY-MM-DDThh:mmZ |
{"price_and_availability":{"sale_price_effective_date":"2022-02-24T13:00-0800/2022-03-29T15:30-0800"}} |
unit_pricing_measure - Optional | The measure and dimension of the product
Supported units:
|
{"price_and_availability":{"unit_pricing_measure":"750 ml"}} |
unit_pricing_base_measure - Optional | The product’s base measure for pricing (for example, ‘100ml’ means the price is calculated based on a 100ml units) Positive number or positive number plus unit Supported units:
Additional supported metric integer + unit combinations:
|
{"price_and_availability":{"unit_pricing_base_measure":"100 ml"}} |
installment - Optional | The installment payment plan available for the product.
Integer
ISO 4217 |
{"price_and_availability":{"installment":{ "months":6, "amount":"50 BRL" }}} |
subscription_cost - Optional | The details of a monthly or annual payment plan that bundles a communications service contract with a wireless product (mobile phone or tablet Supported values:
|
{"price_and_availability":{"subscription_cost":{ "period":"month", "period_length":12, "amount":"35.00 EUR" }}} |
loyalty_program | Specifies how many and what type of loyalty points a customer receives when buying the product. String (Unicode characters, Recommend: ASCII only) JSON array of objects:
|
{"price_and_availability":{"loyalty_program":[ { "program_label":"Progamme A" "tier_label":"silver" "price":"100 USD" "loyalty_points":"0.5" } ]}} |
Product Category
google_product_category_id - Recommended | Google-defined product ID for the product Refer to the Google product category [google_product_category] - Google Merchant Center Help |
{"product_category":{"google_product_category_id ":1234}} |
google_product_category - Recommended | Google-defined product category for the product Refer to the Google product category [google_product_category] - Google Merchant Center Help The full category path. Currently, we only support Google categories in English. |
{"product_category":{"google_product_category":"Apparel & Accessories > Clothing > Dresses"}} |
product_type | Advertiser's product category
1–750 characters |
{"product_category":{"product_type":"Home > Women > Dresses > Maxi Dresses"}} |
Product Identifiers
brand | Name of the product's brand Unicode characters (Recommended: ASCII only) 1–70 characters |
{"product_identifiers":{"brand":"Google"}} |
gtin - Required/Optional for products that don’t have a GTIN | Global Trade Item Number (GTIN), a unique and internationally recognised identifier for a product. UPC (in North America / GTIN-12) EAN (in Europe / GTIN-13) JAN (in Japan / GTIN-13) ISBN (for books) ITF-14 (for multipacks / GTIN-14) Each product and variant of a product (different colours or sizes) has its own GTIN. If the product doesn't have a GTIN (e.g. vintage clothing or handmade goods), advertiser will provide the 'MPN' and 'brand' attributes. |
{"product_identifiers":{"gtin":"3243567980126"}} |
mpn | Product's Manufacturer Part Number (MPN), a unique number issued by manufacturers to identify individual products String (Alphanumeric, Unicode characters. Recommended: ASCII only) 1–70 characters |
{"product_identifiers":{"mpn":"EXA12345MPLE"}} |
identifier_exists | Indicates that unique product identifiers (GTIN, MPN, Brand) aren’t available for the product. Values is in English:
If no value is submitted, the default is ‘yes’ |
{"product_identifiers":{"identifier_exists":”yes”}} |
Detailed product description
condition | Condition of the product
|
{"product_detailed":{"condition":"new"}} |
certification | If your products target any of the EU or EFTA member states or the UK, consult EU energy efficiency regulations or any applicable local law to determine if you need to provide this attribute. This includes products covered by rescaled EU energy labels Json Array containing Json Object with keys: Authority [certification_authority] (Required) - The authority or certification body responsible for issuing the certification. At this time, we support the following values:
Name [certification_name] (Required): The name of the certification. At this time, we support the following values:
Code [certification_code] (Sometimes Required): The code of the certification. For example, for the EPREL certificate with the link https://eprel.ec.europa.eu/screen/product/dishwashers2019/123456 the code is 123456. The code is required for European Energy Labels. Not required for Vehicle ads. Value [certification_value] (Sometimes Required): The value of the certification. This field is ignored for certifications that require a certification code, like EPREL, but can be provided for specific certifications where a code isn't applicable. Specifically, the value of the appropriate CO2 Emission Class is required when listing vehicles in some countries. For details, refer to the Vehicle ads overview. |
{"certification":{ |
adult | Indicates that the product is for adults only because it contains adult content such as nudity, sexually suggestive content, or is intended to enhance sexual activity.
|
{"product_detailed":{"adult":true}} |
multipack | Indicates that multiple identical products have been grouped for sale as one product
|
{"product_detailed":{"multipack":20}} |
is_bundle | Indicates that a main product is grouped with other, different products, sold together as one package for a single price.
|
{"product_detailed":{"is_bundle":false}} |
energy_efficiency_class | The energy efficiency label of the product. In combination with ‘min_energy_efficiency_class’ and ‘max_energy_efficiency_class’ creates an energy efficiency label, for example, A+ (A+++ to G) Values:
|
{"product_detailed":{"energy_efficiency_class":"A+"}} |
min_energy_efficiency_class | The minimum energy efficiency label of the product. In combination with ‘energy_efficiency_class’ and 'max_energy_efficiency_class' creates an energy efficiency label, for example, A+ (A+++ to D) Values:
|
{"product_detailed":{"min_energy_efficiency_class":"A+"}} |
max_energy_efficiency_class | The maximum energy efficiency label of the product. In combination with ‘energy_efficiency_class’ and ‘min_energy_efficiency_class’ creates an energy efficiency label, for example, A+ (A+++ to D) Values:
|
{"product_detailed":{"max_energy_efficiency_class":"D"}} |
age_group | The demographic the product is designed for
|
{"product_detailed":{"age_group":"adult"}} |
color | The product’s colour 1–100 characters total If the product is made up of more than one colour, the primary colour is followed by up to two secondary colours that are each separated by slash. |
{"product_detailed":{"color":"yellow"}} |
gender | The gender the product is designed for Supported values are available in English only:
|
{"product_detailed":{"gender":"unisex"}} |
material | The main fabric or material the product is made of Max 200 characters
|
{"product_detailed":{"material":"Cotton/polyester/elastane"}} |
pattern | The pattern or graphic print on the product Max 100 characters |
{"product_detailed":{"pattern":"Striped"}} |
size | The standardised size of the product String (Alphanumeric, Unicode characters) 1–100 characters |
{"product_detailed":{"size":"L"}} |
size_type | The product’s size type or cut Json Array of String Supported values are available in English only:
Advertisers can submit up to 2 values per product |
{"product_detailed":{"size_type":[ "regular", "plus" ]}} |
size_system | The country’s sizing system the product uses Supported values are available in English only:
|
{"product_detailed":{"size_system":"UK"}} |
item_group_id | The product’s group ID. If the product is one variation of a set of products (e.g. the same shoes in multiple sizes and colours), this attribute is the ID/SKU of the product. String (Alphanumeric, Unicode characters) 1–50 characters |
{"product_detailed":{"item_group_id":"AB12345"}} |
product_length | Length of the product
Units:
Values between 1–3,000 Decimal values are supported (.) |
{"product_detailed":{"product_length":"14 cm"}} |
product_width | Width of the product Number plus measurement unit Units:
Values between 1–3,000 Decimal values are supported (.) |
{"product_detailed":{"product_width":"14 cm"}} |
product_height | Length of the product Number plus measurement unit Units:
Values between 1–3,000 Decimal values are supported (.) |
{"product_detailed":{"product_height":"14 cm"}} |
product_weight | Weight of the product Number plus measurement unit Supported units: g kg lb oz Values between 0–2,000 Decimal values are supported (.) |
{"product_detailed":{"product_weight":"173 g"}} |
product_detail - Optional | Technical specifications or additional details of the product not explicitly covered by other attributes Json Array containing Json Object with keys:
String (Alphanumeric, Unicode characters) |
{"product_detailed":{"product_detail":[ { "section_name":"General", "attribute_name":"Product Type", "attribute_value":"Digital player" }, { "attribute_name":"Product Type", "attribute_value":"Digital Video" } ]}} |
product_highlight - Optional | A short, bulleted lists of the most relevant highlights of the products Json Array of String String (Alphanumeric, Unicode characters) 1–150 characters per highlight Minimum 2, Maximum of 100 highlights |
{"product_detailed":{“product_highlight":[ "Supports thousands of apps, including Netflix, YouTube, HBO Now, Spotify, Showtime, Pandora, Google Play Movies", "Supports thousands of apps, including Netflix, YouTube, HBO Now, Spotify, Showtime, Pandora, Google Play Movies", "Supports thousands of apps, including Netflix, YouTube, HBO Now, Spotify, Showtime, Pandora, Google Play Movies" ]}} |
Shopping Campaigns and other configurations
This section is optional, and some advertisers may omit it.
lifestyle_image_link - Optional | The URL for a lifestyle image to showcase the product in a real-world context 1–2,000 characters |
{"shopping_campaign":{"lifestyle_image_link":"https://www.example.com/image1.jpg"}} |
Delivery
This section is optional, and some advertisers may omit it.
shipping - Optional | Shipping speed and cost for the product. The ‘shipping’ attribute uses sub-attributes to define country, delivery area, service, price, handling time, and transit time. Json Array containing Json Object with keys:
|
{"delivery":{"shipping": [ { "country":"US", "region":"US", "postal_code":"80302", "location_id":21137, "location_group_name":"Outback", "service":"Overnight", "price":"16.00 USD", "min_handling_time":1, "max_handling_time":1, "min_transit_time":3, "max_transit_time":3 } ]}} |
shipping_weight - Optional | The weight of the product used to calculate shipping costs Number plus measurement unit Units:
Values between 1–1,000 for metric and 1–2,000 for imperial Decimal points (e.g. 1.5 kg) are supported |
{"delivery":{"shipping_weight":"3 kg"} |
shipping_length - Optional | Length dimensions of the package for the product Number plus measurement unit Units:
Values between 1–400 for metric and 1–150 for imperial |
{"delivery":{"shipping_length":"20 in"} |
shipping_width - Optional | Width dimensions of the package for the product Number plus measurement unit Units:
Values between 1–400 for metric and 1–150 for imperial |
{"delivery":{"shipping_width":"40 cm"} |
shipping_ height - Optional | Height dimensions of the package for the product Number plus measurement unit Units:
Values between 1–400 for metric and 1–150 for imperial |
{"delivery":{"shipping_height":"20 in"} |
ships_from_country - Optional | The country from which the product will usually be dispatched from
ISO 3166-1 Alpha-2 country code |
{"delivery":{"ships_from_country":"DE"} |
min_handling_time - Optional | The shortest amount of time between when an order is placed for a product and when the product ships Number (whole number), greater than or equal to 0 Integer, greater than or equal to 0 |
{"delivery":{"min_handling_time":1} |
max_handling_time - Optional | The longest amount of time between when an order is placed for a product and when the product ships Number (whole number), greater than or equal to 0 |
{"delivery":{"max_handling_time":10} |
Tax
This section is optional, and some advertisers may omit it.
Tax fields are required for US Tax only, otherwise they’re optional.
tax - Required for the United States/Optional | The product’s sales tax. Google only support this for US sales tax. Json Array containing Json Object with keys:
|
{"tax":{ "tax":[ { "country":"US", "region":"CA", "postal_code":"94043", "rate":8.75, "tax_ship":"yes" } ] }} |