> For the complete documentation index, see [llms.txt](https://docs.ipaper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipaper.io/flipbook-backend-api/ecommerce/get-orders-for-license.md).

# GetLicenseOrdersByType

## Description

Returns an XML document listing all orders completed over the last 3 months. Dates returned in the response are UTC time zone.

## Parameters

| Name         | Values                                                                                                                                                                                                                                                                    |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| checkoutType | <p>The name of the checkout action that resulted in the orders.<br>Parameter can be omitted to return orders of any origin.<br>Supported checkout types:</p><ul><li>CheckoutByEmail</li><li>CheckoutByExport</li><li>CheckoutByPrint</li><li>CheckoutByWhatsApp</li></ul> |

Orders will be returned for the license the authenticated user belongs to.

## Sample Response

```xml
<result>
	<code>
		<![CDATA[ SUCCESS ]]>
	</code>
	<message>
		<![CDATA[ Orders returned. ]]>
	</message>
	<data>
		<flipbooks>
			<flipbook id="1337" name="Sample Flipbook" url="/ipaper/sample-flipbook/">
				<orders count="1" earliestOrderDate="2020-06-25 11:57:35" latestOrderDate="2020-06-25 11:57:35">
					<order orderId="a1B2c3" orderDate="2020-06-25 11:57:35" checkoutType="CheckoutByEmail" orderLinesCount="2" totalOrderValue="5351,8">
						<orderLine>
							<productId>
								<![CDATA[ A123 ]]>
							</productId>
							<productName>
								<![CDATA[ Sample product 1 ]]>
							</productName>
							<productDescription>
								<![CDATA[ A description for Sample product 1 ]]>
							</productDescription>
							<productPrice>
								<![CDATA[ 1337,95 ]]>
							</productPrice>
							<amount>
								<![CDATA[ 2 ]]>
							</amount>
						</orderLine>
						<orderLine>
							<productId>
								<![CDATA[ A456 ]]>
							</productId>
							<productName>
								<![CDATA[ Sample product 2 ]]>
							</productName>
							<productDescription>
								<![CDATA[ A description for Sample product 2 ]]>
							</productDescription>
							<productPrice>
								<![CDATA[ 1337,95 ]]>
							</productPrice>
							<amount>
								<![CDATA[ 2 ]]>
							</amount>
						</orderLine>
					</order>
				</orders>
			</flipbook>
		</flipbooks>
	</data>
</result>
```

## Sample Error Response

If an invalid checkout type is sent the following error code will be returned.

```xml
<?xml version="1.0" encoding="utf-8"?>
<result>
  <code><![CDATA[UNSUPPORTED_CHECKOUT_TYPE]]></ code>
  <message><![CDATA[Checkout type is not supported]]></message>
  <data>
    <![CDATA[ Value of 'checkoutType' is not supported. Supported values: "", "CheckoutByEmail", "CheckoutByExport", "CheckoutByPrint", "CheckoutByWhatsApp" ]]>
  </data>
</result>
```

## Return Codes

* SUCCESS
* ERROR
* READONLY
* LOGIN\_SECURITY\_VIOLATION
* UNSUPPORTED\_CHECKOUT\_TYPE


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ipaper.io/flipbook-backend-api/ecommerce/get-orders-for-license.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
