Discussions
Sample command / payload structure to update a document in Corrigo . I am using Location Entity to Fetch the document id and Document API to create a new document however i am confused on how to update the document or replace with new image.
{
"level": "DEBUG",
"location": "_upload_to_corrigo:607",
"message": "POST payload: {'Properties': ['Title', 'Blob.*'], 'Entity': {'Id': 904917, 'Title': 'file_1.jpg', 'DocType': {'Description': 'System defined type associated automatically with recognized image files.', 'DisplayAs': 'Picture', 'ConcurrencyId': 1, 'Id': 3}, 'StorageTypeId': 'Cloud', 'ActorId': 660523, 'ActorTypeId': 'Asset', 'Blob': {'Body': '<base64_content_hidden>', 'FileName': 'file_1.jpg'}}}",
"timestamp": "2025-07-13 12:25:29,151+0000",
"service": "gref_corrigo_asset_management",
"xray_trace_id": "1-6873a5b3-b00e6e2601481f7e9b5668dd"
}
{
"level": "ERROR",
"location": "_upload_to_corrigo:612",
"message": "Corrigo API error 400: {"ErrorMessage":"Storage Type for existing Document record cannot be modified","ErrorCode":"BUSINESS_LOGIC_ERROR","TimeStamp":"2025-07-13T12:25:29.5767781Z"}",
"timestamp": "2025-07-13 12:25:29,679+0000",
"service": "gref_corrigo_asset_management",
"xray_trace_id": "1-6873a5b3-b00e6e2601481f7e9b5668dd"
}
{
"level": "ERROR",
"location": "upload_file_to_asset:520",
"message": "Error uploading file /tmp/tmpy0cqz5pg/file_1.jpg to asset g00068583",
"timestamp": "2025-07-13 12:25:29,679+0000",
"service": "gref_corrigo_asset_management",
"exception": "Traceback (most recent call last):\n File "/var/task/gref_corrigo_asset_management/services/asset_api_client.py", line 513, in upload_file_to_asset\n document_id = self._upload_to_corrigo(file_path, asset_details)\n File "/var/task/gref_corrigo_asset_management/services/asset_api_client.py", line 613, in _upload_to_corrigo\n response.raise_for_status()\n File "/var/task/requests/models.py", line 1026, in raise_for_status\n raise HTTPError(http_error_msg, response=self)\nrequests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://az-am-ent-f8.corrigo.com/api/v1/base/Document",
"exception_name": "HTTPError",
"stack_trace": {
"type": "HTTPError",
"value": "400 Client Error: Bad Request for url: https://az-am-ent-f8.corrigo.com/api/v1/base/Document",
"module": "requests.exceptions",
"frames": [
{
"file": "/var/task/gref_corrigo_asset_management/services/asset_api_client.py",
"line": 513,
"function": "upload_file_to_asset",
"statement": "document_id = self._upload_to_corrigo(file_path, asset_details)"
},
{
"file": "/var/task/gref_corrigo_asset_management/services/asset_api_client.py",
"line": 613,
"function": "_upload_to_corrigo",
"statement": "response.raise_for_status()"
},
{
"file": "/var/task/requests/models.py",
"line": 1026,
"function": "raise_for_status",
"statement": "raise HTTPError(http_error_msg, response=self)"
}
]
},
Can you help on this? when i a, retrieving the details of existing asset and trying to update i get error fr BUSINESS LOGIC