> 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/get-methods/orders-document/request.md).

# Request and Response

## Get documents previously attached to an order

<mark style="color:blue;">`GET`</mark> `https://api.alephcrm.com/v2/orders/{orderId}/documents`

#### Query Parameters

| Name                                             | Type    | Description    |
| ------------------------------------------------ | ------- | -------------- |
| API\_KEY<mark style="color:red;">\*</mark>       | String  | (default=none) |
| accountId <mark style="color:red;">\*</mark>     | Integer | (default=none) |
| documentFormat<mark style="color:red;">\*</mark> | String  |                |
| documentType<mark style="color:red;">\*</mark>   | Integer |                |

{% tabs %}
{% tab title="200: OK File with the requested invoice" %}

{% endtab %}

{% tab title="400: Bad Request {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="401: Unauthorized {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="403: Forbidden {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="404: Not Found {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="412: Precondition Failed {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="429: Too Many Requests {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="500: Internal Server Error String" %}

{% endtab %}
{% endtabs %}

## Parameters details

### API\_KEY

The API\_KEY that was provided.

### accountId

The Alephee account ID of the documents you are trying to get.

### orderId

The Alephee order ID of the documents you are trying to get.

### documentType

Specify the requested document type.\
Available values are:\
0 = Invoice\
1 = Receipt\
2 = Electronic fiscal invoice\
7 = Shipping label (not available yet)

### documentFormat

Specify the download format of the requested document.\
Available values are “pdf”, “xml” (without quotes)\
DO NOT send the documentFormat parameter when using the following document types:\
1 = Receipt\
IT IS MANDATORY to send the documentFormat parameter when using the following document types:\
0 = Invoice
