Conditions for Update, Delete or load Records

To ensure that you can update, delete or load records with the API accurately, you can add "conditions" to each record. In the "conditions" you can use the following fields:

Field Description
referenceUid The original record ID from your database. However, this should have been transferred when adding with the contentDock® API. The refrenceUid is unique for each DataContainerTable and you select only this data record.
contentdockRecordUid The unique ID of the record in the contentDock® DataContainer table.
parentReferenceUid With this you can select the translations for a refrenceUid. Please note that the parentReferenceUid can only be used in conjunction with the refrenceUid. Please read the paragraph on "Languages & Translations".
language Herewith you can select records for a language. Please read the paragraph on "Languages & Translations".
fieldname You can also use a field name from the DataContainer table definition. Please note that the contentDock® API only checks the if the values are at par.
Example JSON structure with contentdockRecordUid condition
{
    "command": "update",
    "data": {
        "name": "My product name",
        "shortDescription": "My product description text",
        "height": "76,65",
        "width": "37,63",
        "category": "76",
        "packshotColor": "#f457b2",
        "packshot": {
            "file": "http://www.my-company-domain.com/my-product-packshot.jpg", 
            "tags": ["tag1", "tag2"]
        }  
    },
    "conditions": {
        "contentdockRecordUid": 1
    }
} 
Example JSON structure with refrenceUid condition
{
    "command": "delete",
    "conditions": {
        "referenceUid": "101"
    }
}    
Example JSON structure with language condition
{
    "command": "delete",
    "conditions": {
        "language": "EN"
    }
} 
Example JSON structure for the parameter condition in the getDataContainerTableRecords command
{
    "language": "EN"
}

Combined conditions

Conditions can be combined from all the above options.

Example JSON structure with language and fieldname condition
{
    "command": "delete",
    "conditions": {
        "language": "EN",
        "color": "#8120fc"        
    }
} 
Example JSON structure for the parameter condition in the getDataContainerTableRecords command
{
    "language": "EN",
    "color": "#8120fc"        
}

More information


Feedback or Questions

We are always happy to help you with questions about the code or other questions.

Was this page helpful? Yes No

Topics on this page