> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
