Managing Order Invoices

Retrieving Order Invoices

You can retrieve all of your order invoices by sending a GET request to /order-invoices.

This endpoint provides you all order invoices of which you are the seller.

Example request:

GET https://sellerapi.kaufland.com/v2/order-invoices

In the response you will get an array of order invoice like the following:

{
	"data": [
		{
			"id_invoice": 155,
			"id_order": "MXE5BY1",
			"storefront": "de",
			"is_marketplace_deemed_supplier": false,
			"original_name": "invoice20190604.pdf",
			"mime_type": "application/pdf",
			"url": "https://kaufland.de/dynamic/files/order_invoices/155/?access_token=f31ac55d337500edff7be20ae14e0bf3",
			"ts_created_iso": "2019-06-04T13:44:02Z"
		},
		{
			"id_invoice": 156,
			"id_order": "MXE5BY1",
			"storefront": "de",
			"is_marketplace_deemed_supplier": false,
			"original_name": "invoice20190605.pdf",
			"mime_type": "application/pdf",
			"url": "https://kaufland.de/dynamic/files/order_invoices/156/?access_token=f31ac55d337500edff7be20ae14e0bf3",
			"ts_created_iso": "2019-06-05T13:44:02Z"
		},
		{
			"id_invoice": 157,
			"id_order": "MXE5BY1",
			"storefront": "de",
			"is_marketplace_deemed_supplier": false,
			"original_name": "invoice20190606.pdf",
			"mime_type": "application/pdf",
			"url": "https://kaufland.de/dynamic/files/order_invoices/157/?access_token=f31ac55d337500edff7be20ae14e0bf3",
			"ts_created_iso": "2019-06-06T13:44:02Z"
		}
	],
	"pagination": {
		"offset": 0,
		"limit": 0,
		"total": 0
	}
}

Note: The result is limited by default - please read how to handle pagination.

Retrieving an Invoice of an Order

You can retrieve a specific order invoice by sending a GET request to /order-invoices/{id_order}/{id_invoice}.

This endpoint provides you an order invoice specified by the order ID as well as its invoice ID. The response holds the url to download the file. The url contains a parameter (either access_token or key) which is a unique, random token to prevent unauthorized access.

Note: DO NOT reveal the token to anyone who is not authorized to access the files.

Example request:

GET https://sellerapi.kaufland.com/v2/orders-invoices/MXE5BY1/155

You will get a JSON response that looks as follows:

{
	"data": {
		"id_invoice": 155,
		"id_order": "MXE5BY1",
		"storefront": "de",
		"is_marketplace_deemed_supplier": false,
		"original_name": "invoice20190604.pdf",
		"mime_type": "application/pdf",
		"url": "https://kaufland.de/dynamic/files/order_invoices/155/?access_token=f31ac55d337500edff7be20ae14e0bf3",
		"ts_created_iso": "2019-06-04T13:44:02Z"
	}
}

Upload an Invoice to an Order

You can upload an order invoice to an order by sending a POST request to /order-invoices/{id_order}.

This endpoint allows you to upload an order invoice to an order over the API. Please make sure that the data field holds a base64 encoded string of the file content.

Example request:

POST https://sellerapi.kaufland.com/v2/order-invoices/MXE5BY1

Request body:

{
	"original_name": "MyNewInvoice.pdf",
	"mime_type": "application/pdf",
	"data": "UmVhbC5EaWdpdGFs"
}
    Valid Mime Types:
  • application/pdf - PDF

A successful response includes the newly created order invoice entity:

{
	"data": {
		"id_invoice": 155,
		"id_order": "MXE5BY1",
		"storefront": "de",
		"is_marketplace_deemed_supplier": false,
		"original_name": "invoice20190604.pdf",
		"mime_type": "application/pdf",
		"url": "https://kaufland.de/dynamic/files/order_invoices/155/?access_token=f31ac55d337500edff7be20ae14e0bf3",
		"ts_created_iso": "2019-06-04T13:44:02Z"
	}
}

Delete an Invoice of an Order

You can delete an order invoice from an order by sending a DELETE request to /order-invoices/{id_order}/{id_invoice}/.

Example request:

DELETE https://sellerapi.kaufland.com/v2/order-invoices/MXE5BY1/156

A successful response returns a 204 status code without a payload.