> For the complete documentation index, see [llms.txt](https://docs.hos.accessacloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hos.accessacloud.com/atreemo-api/get-started/introduction/paging.md).

# Paging

Operation-specific paging, batching and continuation in Atreemo

{% hint style="warning" %}
**Beta, runtime validation pending.** Atreemo has no one established paging convention. Do not import generic cursors, pagination headers or retry loops into this contract.
{% endhint %}

## Choose the operation's mechanism

| Operation family                  | Request controls                                                    | Response or progression                                                           |
| --------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Transaction/GetOrdersByCustomer   | `pageNumber`, `pageSize`                                            | `PageNumber`, effective `PageSize`, `TotalOrders`, `Orders`, `Response`, `Errors` |
| CustomerAsset                     | `BatchID` plus `BatchSize`, or filter-body record-size/batch fields | Returned `BatchID`, `Remaining` and an operation-specific asset collection        |
| SalesLeads/GetLeads               | Body `PageSize`, `Offset`                                           | `_Leads`, `Remaining`; rows include `TotalCounts`                                 |
| BIDWHouse fact reads              | `PageSize`; extraction state is configured separately               | Fact-specific list and server-side extraction state                               |
| Selection/GetSelectionResult\_Ext | Body `OFFSET`, returned `TableName`                                 | Open `Result` rows plus `TableName`; cleanup affects continuation                 |

Native casing is part of the contract. `Offset`, `OFFSET` and `pageNumber` are different names.

## Numbered order pages

The inspected action defaults to page 1 and 50 orders, caps page size at 500 and rejects page/size below 1. At least one customer identifier is required.

```http
GET /api/Transaction/GetOrdersByCustomer?ctcID=1&pageNumber=1&pageSize=50
Authorization: Bearer <synthetic-access-token>
Accept: application/json
```

The request is synthetic. Input validation can return HTTP 400 with the output model; an out-of-range page can return HTTP 200 with `Response=false`; no history can return a successful empty list. Use returned values and do not assume a stable snapshot under concurrent changes (`TransactionController.cs:28,133–351`).

## Batch IDs and offsets

For CustomerAsset operations, continue from the returned `BatchID`; do not increment an assumed page number. Ordering, consistency under concurrent updates and replay remain runtime questions (`CustomerAssetController.cs:775–805,928–936,1118–1130,1339–1350`).

`SalesLeads/GetLeads` requires positive `PageSize`, forwards `Offset` and returns `_Leads`. Its `Remaining` calculation depends on procedure count semantics, so it is not yet a universal end-of-stream guarantee.

```json
{
  "CtcID": 1,
  "BrandID": 1,
  "PageSize": 50,
  "Offset": 0
}
```

## Stateful BI extraction

BIDWHouse setup and reads are stateful, not page-number calls. The published default is 5,000 and it describes extension to 100,000, but the controller itself forwards the value without establishing every database-enforced maximum. An error is not end-of-data. Do not reset or replay automatically. See [BI extraction](file:///8924120/bi-extraction.md).

## Selection continuation

`GetSelectionResult_Ext.OFFSET` is a **one-based page ordinal** in source: SQL offset is `100000 * (OFFSET - 1)`. Use 1 initially. A blank `TableName` creates an export; a later call can use the returned name and next ordinal. The action can drop the table after a short/empty result.

Do not fabricate a table name, assume snapshot durability or replay a terminal page without an agreed recovery plan. `Result` remains an array of open row objects because columns depend on `FormatID` and database logic (`SelectionController.cs:710–852`).

No universal ordering, maximum rate, retry delay or idempotency key is established. Define bounded iteration and failure recovery before testing, and check both HTTP and business outcomes. See [Errors](broken://pages/39a2078b7d2d75ec17a08218d306d0d51ed89775).


---

# 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.hos.accessacloud.com/atreemo-api/get-started/introduction/paging.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.
