# Upload and manage invoices with Channable API

If you have an order connection, you can upload and manage your invoices in PDF format for supported marketplaces via the Channable API. This feature is available for Amazon, Kaufland, bol, and all Mirakl-based marketplaces (e.g. MediaMarkt, Decathlon, Leroy Merlin etc.)

### Before you start

To make the most of this feature, make sure you’ve considered the following:

**You’ll need**

* An active order connection with existing orders
* A Channable API access token
* [An understanding of how Channable's API works](/list-advertise/orders/order-connections/supported-ecommerce-platforms-for-order-connections/how-to-set-up-the-channable-api-for-an-order-connection.md)
* Existing orders from a supported marketplace

**Good to know**

* Currently, you can only upload and manage your webshops with the Channable API (not webshop-based platforms)
* The API allows us to **receive** invoice information. Currently, we can’t automatically retrieve invoices from order connection platforms.
* This setup involves connecting your system to Channable using our API. This is a technical process that typically requires a developer or someone with programming knowledge.

<details>

<summary>All Mirakl-based marketplaces</summary>

* MediaMarkt
* Leroy Merlin
* Bricoman
* Decathlon
* Debenhams
* Vtwonen
* ANWB
* INNO
* But
* Conrad
* La Redoute
* Praxis
* Le BHV Marais
* Home24
* Galeries LaFayette
* fonQ
* BlokkerConnect!
* Carrefour France
* Carrefour Spain
* Maisons du Monde
* Kruidvat
* Obelink
* Worten
* Douglas
* FNAC Darty Offers
* Manor
* Leen Bakker
* Conforama
* PcComponentes
* ePrice

</details>

{% stepper %}
{% step %}

### Generate Channable API access token

{% hint style="success" %}
Tip: You can skip this step if you’ve already generated an access token.
{% endhint %}

1. In Channable, go to your **Company Settings**.
2. In the Tools section, select **Channable API**.
3. Make note of your **Company ID**, as you will need it later.
4. Click **Generate token** to generate a Company token.

{% hint style="warning" %}
Important: Once your token is generated, save it in a safe place. For security reasons, we don’t display the token again after you generate it. If you lose it, you’ll need to generate a new one.
{% endhint %}
{% endstep %}

{% step %}

### Find and note your product and order ids

{% stepper %}
{% step %}

#### OPTION 1: Retrieve order IDs using the Channable API (recommended for developers)

{% hint style="info" %}
Note: If you save the Channable order ID when initially fetching and processing open orders, you won't need to re-fetch orders when sending invoices. You can use the ID from the data you already have.
{% endhint %}

1. Use [All Orders V2](https://api.channable.com/v1/docs#tag/orders/operation/all_orders_v2_v2_companies__company_id__projects__project_id__orders_get) to fetch orders from Channable.
2. Each order contains an id attribute — this is the id you need to provide when uploading invoices for a specific order.
   {% endstep %}

{% step %}

#### OPTION 2: Find Order IDs manually in Channable (recommended for non-developers)

1. In Channable, open the project with your order connection.
2. In the sidebar, go to **Settings**. This will take you to your **Project settings**.
3. Make note of your **Project ID**, as you will need it in your API request.
4. Go to **Orders**. You’ll see a list of your imported orders.
5. Make note of the specific order IDs you want to upload invoices for.
   {% endstep %}
   {% endstepper %}
   {% endstep %}

{% step %}

### Integrate for Invoices (developer)

In this step, you/your developer will write code that communicates directly with Channable to send the invoice data to the correct order.

1. Convert your invoice file from a PDF into a Base64 encoded string.
2. Build your request:
   1. Create a POST request to the order\_attachment\_upload endpoint.
   2. Embed your API access token in the Authorization: Bearer your\_api\_token header.
   3. Fill in the request body. It should contain:
      * attachment\_type: Set to **“INVOICE”**
      * file: the Base64 encoded string of your invoice file
      * order\_item\_ids (optional, **bol only**): an array of order item IDs. If you don’t add them, the invoice will be linked to all items in the order.

For detailed instructions, refer to our [Order Attachments API documentation](https://api.channable.com/v1/docs#tag/order_attachments/operation/order_attachment_upload_companies__company_id__projects__project_id__orders__order_id__attachments_post).

{% hint style="info" %}
**Note:** You can submit multiple invoices per order. However, some channels (like Amazon) only keep a record of the latest invoice, removing previous ones. For specific information about channel behavior, it’s best to contact your marketplace’s support team.
{% endhint %}
{% endstep %}

{% step %}

### Check your uploaded invoices

After you/your developer sends an invoice via our Channable API, check it was attached correctly within Channable.

* In Channable, open the project with your order connection.
* Go to **Orders**.
* Click on the order you uploaded the invoice for.
* Go to the **Order attachments** tab.
* Click **Download Invoice**.

<figure><img src="/files/1965072fd0a5270678b8b9239e07e4daf3f6df49" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpcenter.channable.com/list-advertise/orders/configure-order-setup/upload-and-manage-invoices-with-channable-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
