How to manage externalIds on content

On some cases, companies use a specific classification system to identify their products (e.g. SKU). This kind of classification can be mapped in THRON thanks to externalIds on content in order to allow an easier retrieval of assets related to a specific product.

An externalId is a key-value pair which uniquely identifies a specific content (e.g.: "SKU:1409221"). Such externalId can be used to search a specific asset which identify your product (with a findByProperties request) by providing the exact pair key - value.

 

How to add externalId

 

Users with the write access right on a specific content will be able to add an externalId to such content. In order to do so, they must invoke an addExternalId request, which is located in the content package of xcontents. Each content can have up to 100 externalIds.

The URL of the request is structured as follows:

//<clientId>-view.thron.com/api/xcontents/resources/content/addExternalId/<clientId>/<xcontentId>

In the body of the request you can paste the following JSON, filling required parameters:


{
  "externalId": {
    "key": "",
    "value": ""
  }
}    

 Where:

  • key: string, mandatory; Constraints:
    • can not contain §/$&#<>"?*:\|
    • can not contain spaces
    • max length = 50
    • lowercase
  • value: string, mandatory; Constraints:
    • max length = 200

 

How to remove externalId

 

Users with the write access right on a specific content will be able to remove an externalId from such content. In order to do so, they must invoke a removeExternalId request, which is located in the content package of xcontents.

The URL of the request is structured as follows:

//<clientId>-view.thron.com/api/xcontents/resources/content/removeExternalId/<clientId>/<xcontentId>

In the body of the request you can paste the following JSON, filling required parameters:


{
  "externalId": {
    "key": "",
    "value": ""
  }
}    
Was this article helpful?
0 out of 0 found this helpful

Have any question?

Open a ticket
Comments