This integration guide describes the ideal implementation of our API and sketches out the process of updating the product data in any client that wants to synchronise with Fashion Cloud data.


Table of contents

Workflow

The process of updating the data would happen as shown in the attached process workflow diagram. There is no difference in the initial run and the update runs. In this description the endpoints themselves are not described in detail. Please refer to https://fashioncloudv2.docs.apiary.io/ for further information on the endpoints.

  1. Query the /brands endpoint This returns information on all brands that share their product data on FASHION CLOUD. Via the GLN the match to the stored brands in the client system can be done. The matching brands need to be updated with this information and the attributes fcId, prodcutDataDownloadable, ecomPermission have to be set.
  2. For each brand, update the product data and create/update entries in image entity For each brand which has productDataDownloadable set to true, the /products endpoint with the according fcId needs to be queried. By sending the timestamp lastSync from the brand entity as a query parameter you will retrieve only those products which have changed since the last successful synchronisation. By using the hash of the images you need to update the according entries. For new images, imageDownloaded has to be set to false. If the brand at the point of synchronisation in the API in the permissions.products object has neither ecommerce or digitalWindow set to true, the downloaded images will be watermarked and the watermarked attribute for that images has to be set to true. After successfully retrieving the data, lastSync has to be updated for the specific brand.
  3. Download the product images After iterating the available brands, the image entity will likely have a lot of new entries with imageDownloaded=false . These images need to be iterated and downloaded via the Load product image endpoint.

In the initial run, this update will take very long. But every succeeding update will be significantly shorter since only changed data will be transferred and updated. By always first querying the /brands endpoint, brands for which the retailer has received access rights are automatically added to the update queue without the user having to input anything.

Be aware that when the client has access to watermarked images and then gets the permission to download unwatermarked images, the images have to be redownloaded without the watermark.

Delete images with limited usage rights

If there are images that only have limited usage rights, the client needs to make sure that they get deleted. The attribute expiresAt in the /products endpoint provides this information. It only exists if there is an expiration date.


Entities

The client's database needs to have brand entities, product entities image entities. Additional to the already attributes in the client system it needs the following attributes