> For the complete documentation index, see [llms.txt](https://docs.live-eo.com/tradeaware/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.live-eo.com/tradeaware/using-the-tradeaware-api/api-reference/attachments.md).

# Attachments

## Retrieve an attachment.

> Retrieve an attachment by its ID.

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.56.0"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetAttachmentDto":{"type":"object","properties":{"id":{"type":"string","description":"id of this entity"},"updatedAt":{"type":"string","description":"ISO 8601"},"createdAt":{"type":"string","description":"ISO 8601"},"fileUrl":{"type":"string","description":"Absolute URL to download the file that this attachment is representing. Usage example: curl <fileUrl>"},"filename":{"type":"string","description":"Name of file, including extension"},"fileSizeKb":{"type":"number","description":"File size in kilobytes (KB)"},"uploadedByUserId":{"type":"string","description":"The Auth0 user ID of the user who uploaded the file. Null if the attachment was uploaded by an M2M client.","nullable":true}},"required":["id","updatedAt","createdAt","filename","fileSizeKb","uploadedByUserId"]}}},"paths":{"/attachments/{id}":{"get":{"description":"Retrieve an attachment by its ID.","operationId":"AttachmentsController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the retrieved attachment.","schema":{"type":"string","format":"uuid"}},{"name":"presign","required":false,"in":"query","description":"When set to \"true\", adds the \"fileUrl\" field to the response object.\n    \"fileUrl\" enables you to download the uploaded file associated with this attachment.\n    If the file has not been malware-scanned and identified as clean yet, \n    it will ignore the \"presign\" query string parameter and not set the \"fileUrl\" field.\n    Any other value than \"true\" will be ignored.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAttachmentDto"}}}},"400":{"description":""},"401":{"description":""},"403":{"description":"Returned for a supplier's attachment when the caller has no Enterprise or Professional plan."},"404":{"description":""},"501":{"description":"501 Not Implemented when the feature is not enabled on this environment."}},"summary":"Retrieve an attachment.","tags":["File Upload (Attachments)"]}}}}
```

## Upload a file.

> Create an attachment which represents the upload of an individual file.\
> \
> Allowed file types are: pdf, doc, docx, xls, xlsx, jpeg, jpg, png, tif, tiff, heic, csv, txt, rtf.\
> \
> Filenames must be less than 200 characters (including the file extension),and must no contain any of the following characters: % { } < > / \ " \` '

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.56.0"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateAttachmentDto":{"type":"object","properties":{"file":{"type":"string","description":"File data","format":"binary"}},"required":["file"]},"GetAttachmentDto":{"type":"object","properties":{"id":{"type":"string","description":"id of this entity"},"updatedAt":{"type":"string","description":"ISO 8601"},"createdAt":{"type":"string","description":"ISO 8601"},"fileUrl":{"type":"string","description":"Absolute URL to download the file that this attachment is representing. Usage example: curl <fileUrl>"},"filename":{"type":"string","description":"Name of file, including extension"},"fileSizeKb":{"type":"number","description":"File size in kilobytes (KB)"},"uploadedByUserId":{"type":"string","description":"The Auth0 user ID of the user who uploaded the file. Null if the attachment was uploaded by an M2M client.","nullable":true}},"required":["id","updatedAt","createdAt","filename","fileSizeKb","uploadedByUserId"]}}},"paths":{"/attachments":{"post":{"description":"Create an attachment which represents the upload of an individual file.\n\nAllowed file types are: pdf, doc, docx, xls, xlsx, jpeg, jpg, png, tif, tiff, heic, csv, txt, rtf.\n\nFilenames must be less than 200 characters (including the file extension),and must no contain any of the following characters: % { } < > / \\ \" ` '","operationId":"AttachmentsController_create","parameters":[],"requestBody":{"required":true,"description":"File to be uploaded.","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateAttachmentDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAttachmentDto"}}}},"400":{"description":""},"401":{"description":""},"403":{"description":""},"415":{"description":""},"501":{"description":"501 Not Implemented when the feature is not enabled on this environment."}},"summary":"Upload a file.","tags":["File Upload (Attachments)"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.live-eo.com/tradeaware/using-the-tradeaware-api/api-reference/attachments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
