# GetInvoice

**Description**

This method returns the invoice in PDF format.

## SOAP API:

**Action**

http://shoxl.com/ShoxlService/GetInvoice

{% hint style="info" %}
Please note: this is not a working url, but a combination of namespace and method. Do not expect the url to return a result.
{% endhint %}

**Style**

Document

## Input (Literal)

The input of this method is the document element tns:GetInvoice having the structure defined by the following table.

<table data-header-hidden><thead><tr><th width="172">Element</th><th>Type</th><th width="150">Occurs</th><th>Description</th></tr></thead><tbody><tr><td>Element</td><td>Type</td><td>Occurs</td><td>Description</td></tr><tr><td>Sequence</td><td></td><td>1..1</td><td></td></tr><tr><td>request</td><td>tns:GetInvoiceRequest</td><td>0..1</td><td></td></tr></tbody></table>

### _Complex Type: tns:GetInvoiceRequest_

**Description**

The GetInvoiceRequest contains all the information needed to get the

order details of a single order.

<table data-header-hidden><thead><tr><th>Component</th><th width="150">Type</th><th width="150">Occurs</th><th>Description</th></tr></thead><tbody><tr><td>Component</td><td>Type</td><td>Occurs</td><td>Description</td></tr><tr><td>Sequence</td><td></td><td>1..1</td><td></td></tr><tr><td>InvoiceNumber</td><td>s:string</td><td>1..1</td><td>A unique invoice number</td></tr><tr><td>CustomerNumber</td><td>s:string</td><td>1..1</td><td>A unique customer number</td></tr></tbody></table>

## Output (Literal)

The output of this method is the document element tns:GetInvoiceResponse having the structure defined by the following table.

<table data-header-hidden><thead><tr><th>Element</th><th width="188">Type</th><th width="150">Occurs</th><th>Description</th></tr></thead><tbody><tr><td>Element</td><td>Type</td><td>Occurs</td><td>Description</td></tr><tr><td>Sequence</td><td></td><td>1..1</td><td></td></tr><tr><td>GetInvoiceResult</td><td>tns:GetInvoiceResult</td><td>0..1</td><td></td></tr></tbody></table>

### _Complex Type: tns:GetInvoiceResult_

**Description**

The GetInvoiceResult returns the invoice details of the given invoice number, including the invoice itself as an embedded PDF..

<table data-header-hidden><thead><tr><th width="192">Component</th><th>Type</th><th width="150">Occurs</th><th>Description</th></tr></thead><tbody><tr><td>Component</td><td>Type</td><td>Occurs</td><td>Description</td></tr><tr><td>Sequence</td><td></td><td>1..1</td><td></td></tr><tr><td>ErrorCode</td><td>s:string</td><td>0..1</td><td>An error code returned by the ERP system</td></tr><tr><td>ErrorDescription</td><td>s:string</td><td>0..1</td><td>The error description related to the error code returned by the ERP system</td></tr><tr><td>InvoicePDF</td><td><a href="broken-reference">s:</a>base64Binary</td><td>1..1</td><td>The PDF containing the invoice</td></tr><tr><td>Request</td><td>tns:GetInvoiceRequest</td><td>1..1</td><td>The sent request by Shoxl Shop.</td></tr></tbody></table>



## REST API:

**URL:** /Shoxl/v1/GetInvoice\
**Method:** POST

**Request body:**

### &#x20;GetInvoiceRequest{

| **parameter**  | type                      |
| -------------- | ------------------------- |
| invoiceNumber  | <p>string<br>required</p> |
| customerNumber | <p>string<br>required</p> |

}

#### Example:

```
{
  "invoiceNumber": "string",
  "customerNumber": "string"
}
```

###

**Response body:**

### &#x20;GetInvoiceResult{

| **parameter**    | type                             |
| ---------------- | -------------------------------- |
| errorCode        | <p>string<br>nullable: true</p>  |
| errorDescription | <p>string<br>nullable: true</p>  |
| invoicePDF       | <p>string($byte)<br>required</p> |
| request          | GetInvoiceRequest                |

}

#### GetInvoiceRequest{

| **parameter**  | type                            |
| -------------- | ------------------------------- |
| invoiceNumber  | <p>string<br>nullable: true</p> |
| customerNumber | <p>string<br>nullable: true</p> |

}

#### Example:

```
{
  "errorCode": "string",
  "errorDescription": "string",
  "invoicePDF": "string",
  "request": {
    "invoiceNumber": "string",
    "customerNumber": "string"
  }
}
```
