Products API
Simple Examples
Storing details of a new product
{ "Description": "Vege Deluxe Pizza", "Price": 7.99 }
Website Specific Information
Against each product is a range of fields used by Websites. While many eCommerce websites often have their own content management systems, these fields are designed to transfer from Fieldpine into those fields so that you do not need to alter product information in multiple places.
The field "Publish" is used to indicate if a product has been marked as "send to website", and it is possible to have 30 different target websites. Each of these is a bit in the Publish field.
- A value of 0 (or null) means not published to any website
- A value of 1 means publish to the primary website (aka Website #1)
- A value of 5 (which is bits 1 + 4 in binary) means publish to website #1 and #3
- A value of 46 (which is 32 + 8 + 4 + 2 in binary) means publish to websites 2,3,4 and 6
Why do retailers have multiple websites? Some have a "retail" and "Trade" website, or an additional "bulk brand" outlet. Sometimes the decision is around where the products are listed, such as Shopify and custom designed site.
The website specific fields may change according to the target website. For example you might set "On Special" and "Blurb" to be different. When this is done, the specific fields are contained in a sub array, one for each store defined.
{ "Description": "Vege Deluxe Pizza", "Price": 7.99, "Publish": 5, "StoreData_5": [ { "OnSpecial": 1, "WebBlurb", "The ultimate pizza for vege lovers" }], "StoreData_802": [ { "OnSpecial": 0, "WebBlurb", "Vegetable pizza. Contains fresh seasonal vegetables" }] ] }
The product definiton contains additional StoreData_NNN where NNN is the store id.
The StoreData_NNNN values will only be returned if your data request includes "want=storedata", they are not present by default due to processing time to extract and transmit what can be quite large amounts of information