Error codes

The following error codes are supplied for all API functions.

Error code Description
1 The contentDock API request format is not valid. Please check the JSON structure.
2 The API contentDock command not exist.
3 This contentDock subdomain has not a open API or the API key is not valid. Please check in your user account if the API is activated and if you are using the correct API key.
4 The DataContainer ID is not existing in your user account. Please check the ID of your DataContainer in the developer area of your user account. Open the configuration of your DataContainer and scroll to the JSON Examples area.
9 An unexpected error has occurred. Please check the error message that was returned. [Contact us](https://www.contentdock.com/en/get-in-touch) if you cannot solve the error message.
Example
<?php

    # Your source code before
    # ...

    switch ( intval ( $json['error'] ) )
      {
        case 1:
          echo "The contentDock API request format is not valid.";
          break;
        case 2:
          echo "The API contentDock command not exist.";
          break;
        case 3:
          echo "This contentDock subdomain has not a open API or the API key is not valid.";
          break;
        case 4:
          echo "The contentDock DataContainer Table ID does not exist.";
          break;
        case 9:
          echo $json['message'];
        default:
          echo "Unexpected contentDock API error.";  
      }
?>

When saving a record, the following errors may occur

The following error messages are generated for the request function pushToDataContainerTable and can be retrieved using the getProgressOperationID function. The error message and the error code itself are transferred in the Response Array per record in the [errorcode] and [message] fields.

Error code [errorcode] Error message [message] Description
10 The DataContainer ID is not existing in your user account. Please check the ID of your DataContainer in the developer area of your user account. Open the configuration of your DataContainer and scroll to the JSON Examples area. contentDock checks the DataContainer table ID directly at the API request. If the ID is not valid for your user account, the error code 4 will be returned directly.
11 No data records have been sent for processing. Please check if any records have been sent for processing.
12 The JSON format for the data part is wrong. Please check the JSON format. Please also use our API examples on Github.
100 Data record stored with errors. File https://domain.tld/file.jpg does not exist or header information invalid. The record has been saved, but the API has detected that the file does not exist. The error message also appears if the file exists but the header information for the file size or file extension could can not be read.
101 Data record stored with errors. Host name does not exist - https://domain.tld/file.jpg The record was saved, but the API detected that the domain name could not be found.
102 Data record stored with errors. The file extension is not allowed - https://domain.tld/file.php The record was saved, but the API detected that the file could not be imported because the file extension is not allowed.
103 Data record stored with errors. The maximum file size limit for uploads has exceeded - https://domain.tld/file.pdf The record was saved, but the API detected that the file could not be imported because the file is> = 20MB.
104 Data record stored with errors. The disk quota was exceeded. The record was saved but the file was not imported. This error message only exists during the beta test phase of contentDock® and means that the limit for the file storage per account is limited to 2GB.
105 Data record stored with errors. The JSON format for a file field is wrong. Please check the JSON format for the used file fields.
106 Data record stored with errors. The file URL is empty. Please check that file value is not empty.
200 Data record not saved. Error message: Field name - format error. The record was NOT saved because one or more field format errors were found.
201 Data record not saved. Error message: Field name - Field required. The record was NOT saved because one or more required fields are empty.
202 Data record not saved. Language code is missing. The record was NOT saved because the language code is empty.
203 Data record not saved. The referenceUid was not found with the value from the parentReferenceUid field. The record was NOT saved because the referenceUid was not found with the value from the parentReferenceUid field.
204 Data record not saved. The referenceUid is not unique. The record was NOT saved because the record already exists with the referenceUid.
205 Data record not saved. Field(s) not exist in the DataContainerTable. The record was NOT saved because one or more fields do not exist in the DataContainerTable.
300 The record condition has not found any records. Please check the condition for the record.
301 The condition is incorrect, the fields in the condition are not existing. Please check the condition and whether you are using the correct fields.

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