Upload Thumbnail API

Upload thumbnail of component in the catalog.

HTTP Method / Path: POST /configwise/api/components/:productNumber|:componentId/thumbnail

Authorization: Request must include 'x-token' header, eg: 'x-token': '755c0fadf29146c3b65778528a3abb12'. See Setup API token to generate or retrieve the API token defined in the ConfigWise Portal.

Required HTTP headers:

  • x-token: YOUR_API_TOKEN

  • Content-Type: multipart/form-data

  • Accept: application/json

As a URL parameter you can use 'product number' or 'internal component id'.

Uploading of file is executed through HTTP multipart/form-data. The body of your request must contain one file field (field name must be file). Here is the curl example how to invoke this API method:

$ curl -L -v -X POST https://manage.configwise.io/configwise/api/components/PR-01004/thumbnail \
-H 'x-token: YOUR_API_TOKEN' \
-H 'Accept: application/json' \
-F file=@/path/to/your/file.png

An example of success response:

200 HTTP response code

{
    "id": "6Yz5Q7AGkh",
    "productNumber": "PR-01004",
    "name": "YourProduct",
    "appName": "YourProduct (app)",
    "createdAt": "2019-12-06T15:12:42.092Z",
    "updatedAt": "2019-12-06T15:18:44.922Z",
    "isFloating": true,
    "description": "Description of YourProduct",
    "productLink": "https://my.store.com/product/YOUR_PRODUCT",
    "isVariance": true,
    "parentProductNumber": "PR-01001",
    "published": true,
    "thumbnail": "https://manage.configwise.io/configwise/files/companies/EZVEjkaKiH/catalog/components/6Yz5Q7AGkh/thumbnail/smuravev-avatar.jpeg",
    "iosModel": null,
    "iosModelAssets": [],
    "androidModel": null,
    "androidModelAssets": [],
    "originalModel": null,
    "originalModelAssets": [],
    "fileSizes": [],
    "nodesToTags": [],
    "tagsToMaterials": []
}

Examples of error responses:

404 HTTP response code (if requested component not found)

{
   "error": "Not Found."
}

403 HTTP response code (if incorrect 'x-token' header in the response)

{
   "error": "Forbidden."
}

500 HTTP response code (if server side error occurs)

{
   "error": "Internal Server Error"
}