Update Component Details API
Update existing component in the catalog.
HTTP Method / Path: PUT /configwise/api/components/:productNumber|:componentId
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: application/json
Accept: application/json
As a URL parameter you can use 'product number' or 'internal component id'.
Request body:
{ (required) "name": "YourProduct", (optional, null by default) "appName": "YourProduct (app)", (optional, false by default) "isFloating": false, (optional, null by default) "description": "Description of YourProduct", (optional, null by default) "productLink": "https://my.store.com/product/YOUR_PRODUCT", (optional, null by default) "parentProductNumber": "PR-01001" }
NOTICE: 'parentProductNumber' field is used to configure variances of created components (products). If this field exists in the request JSON then created component will be attached as a variance of existing product (which productNumber you set in the 'parentProductNumber' field). If you set there incorrect or non existing productNumber, then such configuration will be ignored.
An example of success response:
201 HTTP response code
{ "id": "x5V6RNtqGO", "productNumber": "PR-01004", "name": "YourProduct", "createdAt": "2019-12-05T11:51:23.571Z", "updatedAt": "2019-12-05T11:51:23.571Z", "isFloating": false, "description": "Description of YourProduct", "isVariance": true, "parentProductNumber": "PR-01001", "published": true, "thumbnail": null, "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." }
400 HTTP response code (if requested component not found)
{ "error": "'name' must not be blank." }
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" }