> For the complete documentation index, see [llms.txt](https://developers.alephee.com/v2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.alephee.com/v2/orders/post-methods/attach-a-document-to-an-order/examples.md).

# Examples

### Request (via form-data)

{% code overflow="wrap" %}

```bash
curl --location --request POST 'http://api.alephcrm.com/v2/orders/ZZZZ/documents? API_KEY=AAAAAAAA-XXX-XXX-XXX-XXXXXXXXXXXX ' \
--header 'Content-Type: multipart/form-data; ' \
--form 'file=@/C:/document.pdf' \
--form 'documentType=0'
--form 'documentNumber=1234'
--form 'documentDate=yyyy-MM-dd'
--form 'messageText=We attached the invoice. Thanks for your purchase.'
```

{% endcode %}

### Response

```json
{“ Successfully attached ”}
```

See more examples with POSTMAN images included

[Via FORM-DATA](/v2/orders/post-methods/attach-a-document-to-an-order/examples-1.md)

[Via JSON BODY](/v2/orders/post-methods/attach-a-document-to-an-order/examples-2.md)
