products.update
Update already existing product within flipsnack
The products.update method allows external systems (such as a PIM or ERP) to send full or partial product data directly to Flipsnack. Each request has a limitation of 500 products per request and must include an apiKey, signature for authentication, a sourceHash to know exactly which feeds products to update and the product list with the updated fields there is no need to send full products it’s enough to send only the updated fields.The last step is data validation and if all goes well the updated products will be available under the Automation tab in the Design Studio.
Note: Requests must be made to https://api.flipsnack.com/v1.
Request parameters
Name
Type
Description
apiKey (required)
string
The API key provided for your user. If it is not specified, the request will return the error code "30 - Missing mandatory parameter". If the key is incorrect the request returns the error code "41 - Invalid credentials".
signature (required)
string
The signature must be calculated by you and added to the request. See How to sign a request for more information.If the parameter is missing the request will return the error code "30 - Missing mandatory parameter". If the signature is incorrect the request will return the error code "44 - Invalid signature".
action (required)
string
The API method that should be called. In this case the value should be products.update . If it is not specified, the request will return the error code "30 - Missing mandatory parameter".
sourceHash (required)
string
This needs to be a unique identifier within flipsnack to be able to update based on it the products and also to have the possibility to create multiple feeds from the same API
products(required)
JSON
It’s a JSON containing all the products that are going to pe created
Products example as JSON type
This is an example of how one structure of product with one variant (if needed) should look like.
[
{
"type": string, // required
"code": string, // required
"title": string,
"description": string,
"image_link": string,
"sell_price": number,
"currency": string,
"discount_price": number,
"quantity": boolean,
"purchasable_qty": {
"min": number,
"max": number
},
"attribute": {
"name1": string,
"options1": string,
"name2": string,
"options2": string,
"name3": string,
"options3": string
},
"image_attribute": string,
"shop_element": string,
"area_element": {
"tooltip": string,
"color": string,
"opacity": number
},
"shop_button": {
"color": string,
"label": string,
"label_color": string
},
"website": {
"button": boolean,
"button_label": string,
"link": string
},
"customizable_product": {
"product": boolean,
"instructions": string,
"flat_fee": number,
"per_character": number,
"character_length": number,
"mandatory": boolean
},
"variants": [
{
"code": string,
"parent_code": string,
"image_link": string,
"visible": boolean,
"attribute": {
"options1": string,
"options2": string,
"options3": string
},
"price": number,
"discount_price": number
}
]
}
]
Products JSON Example
In the next example there is only one product but you can send a maximum of 500 products per request also the required fields have a comment “// required” all the rest of the fields are optional and need to be sent only if they change
[
{
"type": "Product", // required
"code": "SKU-01-WFW", // required
"title": "Women Fine Watch",
"description": "Imported japanese quartz movement keeps time accurate.",
"image_link": "https://cdn.flipsnack.com/images/automation/women-fine-watch-black.jpg;",
"sell_price": 35,
"currency": "USD",
"discount_price": 0,
"quantity": true,
"purchasable_qty": {
"min": 100,
"max": 100
},
"attribute": {
"name1": "Color",
"options1": "Silver/Black;Gold/Brown;Gold/Green",
"name2": "size",
"options2": "s;m",
"name3": "",
"options3": ""
},
"image_attribute": "Color",
"shop_element": "AREA",
"area_element": {
"tooltip": "Click to view this product",
"color": "#7BC2FF",
"opacity": 20
},
"shop_button": {
"color": "#0362FC",
"label": "Add to cart",
"label_color": "#ffffff"
},
"website": {
"button": false,
"button_label": "",
"link": ""
},
"customizable_product": {
"product": false,
"instructions": "",
"flat_fee": 100,
"per_character": 100,
"character_length": 100,
"mandatory": false
},
"variants": [
{
"code": "SKU-01-WFW-SB",
"parent_code": "SKU-01-WFW",
"image_link": "https://cdn.flipsnack.com/collections/uploads/01793059c4a88ae3d80eb24f45752982",
"visible": true,
"attribute": {
"options1": "Silver/Black",
"options2": "s",
"options3": ""
},
"price": 120,
"discount_price": 110
}
]
}
]
Response parameters
Name
Type
Description
code
string
Possible values:
200: When all goes well and action is executed correctly
400: When data submitted has invalid data of wrong format
51: When the mac number of products sent is exceeded
30: Missing a mandatory parameter
status
string
Message related to code
data
JSON
It's a JSON with more details about the response it has a more detailed message about the outcome, errors or data which is an array of exact messages
Error codes
For complete list of error codes and messages go to API status codes section.
Examples
Request
# GET
curl -X POST https://api.flipsnack.com/v1/ \
-F action=products.create \
-F apiKey=<YOUR-API-KEY> \
-F signature=<YOUR-REQUEST-SIGNATURE> \
-F sourceHash=<YOUR-SOURCE-HASH> \
-F products="<YOUR-PRODUCTS>”
Response
{
"code":200,
"status":"",
"data": {
"message":"Products updated successfully",
"Errors":[]
}
{
"code": 30
"status": "Missing mandatory parameter”
"Data": [
Feed name parameter is missing,
Products parameter is missing
Source hash parameter is missing
Products hashes parameter is missing
]
}
Last updated