Here is a python code snippet example to generate the content and content_hash:
When the code is executed it gives the required values for making a post call:
The data can then be uploaded to the files endpoint (in this case I'm using postman to make the request):
Then a request of type post/put/patch can be made. In this example, a patch to the customer with the id 111720 (again using postman) using the same transaction_id that was previously specified (123) with the GUID (ffffb2a5c-7624-ed11-b7b0-c858c0c3d605) that was returned in the previous request:
When the request is successful, it will be loaded at the customer under the Files tab:
Things to keep in mind:
- Images last 10 minutes.
- If you have loaded multiple images with the same transaction ID and you have made one call using that transaction, then all images that were not part of the call with the same transaction will be discarded.
- In other words, if you used the transaction ID somewhere (customers or products), then files not specified with the same transaction ID are removed.
- The transaction ID is something you can specify and can be anything.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article