Upload an Internal Attachment

Example Use Case: Upload an attachment to a Quote

The example used in this article details how to upload an attachment to a Quote. However, this logic can be applied to upload attachments to other Sales Transactions.

When applying this logic to a Request or Order, please choose the appropriate endpoint. All supported endpoints are listed in the API Documentation.

To upload an attachment to a Quote, use the Create a Quote-Attachment endpoint. Make sure to use the correct service_id and quote_id in the URL. Attach the file, and add isInternal flag as a query parameter.

import requests files = { "file": open("file.txt", "rb"), } params = { "isInternal": True, } url = "https://my-platform.com/api/v2.0/service-panel/services/1/quotes/1/attachments/" requests.post( url, files=files, params=params, headers={"Authorization": "Token my-super-secure-token"}, )

Python Example