Product Assets (images, pdfs, documents and videos)
This page describes the handling of product assets.
The asset call links an actual file or url to the product!
URL
This call only adds the assets to the product. All assets that are linked remain linked. If you have fluctuation in your assets you can also choose to update all asset links. In this case you have to send a PATCH to the product API. See appendix 1
PUT /api/asset/<key>/
Request
{
"key": "unique-identifier",
"name": "things.pdf",
"ident": "https://someurl.com/things.pdf",
"ident_org": "https://someurl.com/things.pdf",
"sequence": 1,
"video_provider": "",
"video_embed": false,
"type": "url",
"language": "nl_NL",
"shop": 1,
"product": {
"key": "10193",
"origin": "CLOUDSUITE"
}
}
{
"key": "unique-identifier",
"name": "Some video",
"ident": "dQw4w9WgXcQ",
"ident_org": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"sequence": 1,
"video_provider": "youtube",
"video_embed": true,
"type": "video",
"language": "nl_NL",
"shop": 1,
"product": {
"key": "10193",
"origin": "CLOUDSUITE"
}
}
Mapping imagetypes
Type of asset | Type | Ident | Ident_org | Video_provider | Video_embed |
---|---|---|---|---|---|
Primary image | product_image | filename | If the image comes from an external URL, save this in ident_org (archive purposes only) | empty | false |
Primary image from external URL | product_image | full url |
| empty | false |
Secondary images | additional_product_image | filename | If the image comes from an external URL, save this in ident_org (archive purposes only) | empty | false |
Secondary images from external URL | additional_product_image | full url |
| empty | false |
External url | url | full url | Empty | empty | false |
Video file | video | YouTube code | Full URL | YouTube | true |
Product image for in confirmation email | email_product_image | filename | If the image comes from an external URL, save this in ident_org (archive purposes only) | empty | false |
Appendix 1
Update assets of a product
Request
© 2024 CloudSuite BV, All rights reserved