> For the complete documentation index, see [llms.txt](https://developers.accesstrade.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.accesstrade.vn/api-accesstrade-tai-lieu-tich-hop/get-the-list-of-transaction.md).

# Get the list of transaction

#### **1.API Information**

<table><thead><tr><th width="122"></th><th width="408.6666259765625"></th></tr></thead><tbody><tr><td>Endpoint</td><td><a href="
https://api.accesstrade.vn/v1/transactions"><br>https://api.accesstrade.vn/v1/transactions</a></td></tr><tr><td>Method</td><td>GET</td></tr></tbody></table>

Note:

* **Limit: 10 requests / 1 minute**

Query Parameters

The parameters are passed into HTTP Request according to Key-Value pairs, begin the parameters with the sign “?” and separate the parameters with the sign “&”. Ex:

```
https://api.accesstrade.vn/v1/transactions?since=2021-01-01T00:00:00Z&until=2021-01-03T00
```

<table data-header-hidden><thead><tr><th width="165.66668701171875"></th><th width="113.99997965494794"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Required</td><td>Description</td></tr><tr><td>since</td><td>Required</td><td>Start of the sale-time range in ISO 8601 format, for example <code>2023-01-01T00:00:00Z</code>. <code>since</code> must be earlier than or equal to <code>until</code>. The range must not exceed one year (366 days).</td></tr><tr><td>until</td><td>Required</td><td>End of the sale-time range in ISO 8601 format, for example <code>2023-01-02T00:00:00Z</code>. The range from <code>since</code> to <code>until</code> must not exceed one year (366 days). For faster responses, query one day or one week at a time.</td></tr><tr><td>page</td><td>Optional</td><td>Page order. Starting from 1. Default 1</td></tr><tr><td>offset</td><td>Optional</td><td>Offset value, default 0.</td></tr><tr><td>limit</td><td>Optional</td><td>Number of orders returned per page. Default 100.</td></tr><tr><td>merchant</td><td>Optional</td><td>Merchant name. ex: tikivn.</td></tr><tr><td>utm_source</td><td>Optional</td><td>Ex: facebook</td></tr><tr><td>utm_campaign</td><td>Optional</td><td></td></tr><tr><td>utm_medium</td><td>Optional</td><td>Ex: email</td></tr><tr><td>utm_content</td><td>Optional</td><td></td></tr><tr><td>status</td><td>Optional</td><td><p>Status</p><ul><li>0: hold</li><li>1: approved</li><li>2: rejected</li></ul></td></tr><tr><td>is_confirmed</td><td>Optional</td><td><p>Transaction status:</p><ul><li>0: unapproved</li><li>1: approved (If there is is_confirmed parameter but no status, the default field status=1)</li></ul></td></tr><tr><td>transaction_id</td><td>Optional</td><td>Transaction codes, can filter 1 (transaction_id=1234567) or multiple (transaction_id=1234567,7654321) using commas "," to separate codes.</td></tr><tr><td>update_time_start</td><td>Optional</td><td>Start of the transaction update-time range in ISO 8601 format, for example <code>2023-08-01T00:00:00Z</code>. <code>update_time_start</code> must be earlier than or equal to <code>update_time_end</code>. The range must not exceed one month (31 days). When both update-time parameters are provided, filtering by transaction update time takes precedence over filtering by <code>since</code> and <code>until</code>.</td></tr><tr><td>update_time_end</td><td>Optional</td><td>End of the transaction update-time range in ISO 8601 format, for example <code>2023-08-05T00:00:00Z</code>. The range from <code>update_time_start</code> to <code>update_time_end</code> must not exceed one month (31 days).</td></tr></tbody></table>

API response returns:

```
"total": 4147,
    "data": [
        {
            "merchant": "tikivn",
            "status": 1,
            "update_time": "2022-07-19T17:32:35",
            "click_url": "https://ti.ki/add/TNWGVSKG?utm_term=TAPM.Yr8FIzkUqtxX6WDq6wmjdLH9nzfwPYBgD8nSkKOaR8B3lolr_TAPP.684099_TAPT.TI3&TIKI_URI=https%3A%2F%2Ftiki.vn&atnct1=44f683a84163b3523afe57c2e008bc8c&atnct2=Yr8FIzkUqtxX6WDq6wmjdLH9nzfwPYBgD8nSkKOaR8B3lolr&atnct3=PkIKY0000nw00enur",
            "conversion_platform": "mobile_app",
            "utm_campaign": "4348614231480407268",
            "product_category": "1520_app",
            "utm_content": "",
            "transaction_time": "2022-05-03T02:31:19",
            "product_image": "",
            "utm_source": "123488589",
            "transaction_value": 442000.0,
            "_extra": {
                "parameters": {
                    "utm_campaign": "4348614231480407268",
                    "click_url": "https://ti.ki/add/TNWGVSKG?utm_term=TAPM.Yr8FIzkUqtxX6WDq6wmjdLH9nzfwPYBgD8nSkKOaR8B3lolr_TAPP.684099_TAPT.TI3&TIKI_URI=https%3A%2F%2Ftiki.vn&atnct1=44f683a84163b3523afe57c2e008bc8c&atnct2=Yr8FIzkUqtxX6WDq6wmjdLH9nzfwPYBgD8nSkKOaR8B3lolr&atnct3=PkIKY0000nw00enur",
                    "click_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1",
                    "at_unique_id": "7sFsxcWKOWYPunC3BCfg6Znxat",
                    "utm_tool": "deeplink",
                    "utm_source": "123488589"
                },
                "device_model": "iPhone",
                "device_family": "iPhone",
                "device_brand": "Apple",
                "device_type": "mobile",
                "device": "Apple iPhone",
                "os": "iOS",
                "browser": "Mobile Safari"
            },
            "reason_rejected": "",
            "category_name": "Sức khỏe và làm đẹp_app",
            "utm_term": "",
            "product_id": "9446586652188@tikivn@9446586652188",
            "is_confirmed": 0,
            "confirmed_time": "2022-06-30T23:59:59",
            "product_price": 442000.0,
            "id": "9591ccbef06080a1dd8f98d9b371537e",
            "commission": 53040.0,
            "customer_type": "",
            "conversion_id": 115157422,
            "utm_medium": "",
            "product_quantity": 1,
            "click_time": "2022-05-03T02:18:56",
            "product_name": "",
            "transaction_id": "602528593"
        }
```

Description of results:

| Parametter                | Description                                                                                             |
| ------------------------- | ------------------------------------------------------------------------------------------------------- |
| total                     | Number of conversions, calculated by product.                                                           |
| data.status               | <p>Status of conversion</p><ul><li>0: Pending or hold</li><li>1: Approved</li><li>2:Rejected.</li></ul> |
| data.merchant             | Merchant name                                                                                           |
| data.click\_time          | Click time                                                                                              |
| data.transaction\_id      | Transaction ID (Order).                                                                                 |
| data.transaction\_time    | Transaction time, according to ISODate.                                                                 |
| data.update\_time         | Time to update transaction information, according to ISODate.                                           |
| data.confirmed\_time      | Transaction approval time, according to ISODate.                                                        |
| data.is\_confirmed        | Transaction status: 0 - unapproved, 1 - approved                                                        |
| data.transaction\_value   | Transaction value.                                                                                      |
| data.commission           | Commissions for publishers.                                                                             |
| data.product\_id          | Product ID.                                                                                             |
| data.product\_price       | Price of the product.                                                                                   |
| data.product\_quantity    | The quantity of products.                                                                               |
| data.\_extra              | Information related to the operating system and browser.                                                |
| data.\_utm\*              | Utm parameter values.                                                                                   |
| data.category\_name       | Category name                                                                                           |
| data.conversion\_id       | ID of conversion                                                                                        |
| data.conversion\_platform | The foundations of conversion                                                                           |
| data.customer\_type       | Customer type                                                                                           |
| data.product\_category    | Category of product                                                                                     |
| data.product\_image       | Image of product                                                                                        |
| data.product\_name        | Product name                                                                                            |
| data.reason\_reject       | Reason reject                                                                                           |

#### **2.Error Responses and Overload Handling**

<table><thead><tr><th width="94.33331298828125">HTTP Status</th><th width="125">Condition</th><th width="186.3333740234375">Cause</th><th>Example Response</th><th>Recommended Client Action</th></tr></thead><tbody><tr><td><strong>400 Bad Request</strong></td><td>Invalid query parameters</td><td>The timestamp is not in ISO 8601 format.<br>`since` is later than <code>until</code>, or the range exceeds one year (366 days).<br>`update_time_start` is later than <code>update_time_end</code>, or the range exceeds one month (31 days).<br>`limit &#x3C; 1`, <code>offset &#x3C; 0</code>, <code>page &#x3C; 1</code>, or <code>status</code> or <code>conversion_id</code> has an invalid format.</td><td><code>{"success": false, "message": "sales date range (since to until) must not exceed 1 year (366 days)."}</code><br><br>`{"success": false, "message": "update_time range (update_time_start to update_time_end) must not exceed 1 month (31 days)."}`</td><td>Check the timestamp format and narrow the query range to the applicable limit before resubmitting the request.</td></tr><tr><td><strong>403 Forbidden</strong></td><td>Authentication or authorization failure</td><td>The <code>Authorization</code> header is missing, the token is invalid, or the caller lacks access.</td><td><code>{"message": "Invalid token"}</code></td><td>Verify the authorization header uses the format <code>Authorization: Token &#x3C;access_key></code>.</td></tr><tr><td><strong>429 Too Many Requests</strong></td><td>Rate limit exceeded</td><td>The client sent more requests than allowed within the rate-limit window.</td><td><code>{"success": false, "message": "Rate limit exceeded", "retry_after": 1.0}</code><br>Includes a <code>Retry-After</code> response header.</td><td>Wait for the interval specified by <code>retry_after</code> (in seconds) or the <code>Retry-After</code> header before retrying.</td></tr><tr><td><strong>502 Bad Gateway</strong>, <strong>503 Service Unavailable</strong>, or <strong>504 Gateway Timeout</strong><br>Query timeouts can also return <code>"success": false</code> in the response body.</td><td>Server overload or query timeout</td><td>Traffic spikes during peak hours or major sales campaigns can overload database or gateway connections. Broad query ranges can cause the database query to exceed its execution time limit.</td><td><code>{"success": false, "message": "Query exceeded maximum execution time. Please narrow your date range or filters."}</code><br>The gateway may return HTTP 502, 503, or 504.</td><td>Verify that the HTTP status is <code>200</code> and that the response body does not report <code>"success": false</code> before reading <code>data</code>.<br>Use exponential backoff with delays of 2, 4, and 8 seconds, with a maximum of three retries.<br>Split the date range into daily or weekly windows and keep <code>limit</code> at or below 300.</td></tr></tbody></table>

#### JSON Response Examples

Display these examples and the publisher integration guidance below the error response table in GitBook.

**Sale-time range exceeds the maximum**

```
{
  "success": false,
  "message": "sales date range (since to until) must not exceed 1 year (366 days)."
}
```

**Transaction update-time range exceeds the maximum**

```
{
  "success": false,
  "message": "update_time range (update_time_start to update_time_end) must not exceed 1 month (31 days)."
}
```

**Rate limit exceeded**

```
{
  "success": false,
  "message": "Rate limit exceeded",
  "retry_after": 1.0
}
```

**Query execution time exceeded**

```
{
  "success": false,
  "message": "Query exceeded maximum execution time. Please narrow your date range or filters."
}
```

#### <sup>*Publisher Integration Guidance for Server Overload*</sup>

* <sup>*Validate the HTTP status and response body. Process the transaction list in*</sup><sup>*&#x20;*</sup><sup>*`data`*</sup><sup>*&#x20;*</sup><sup>*only when the HTTP status is*</sup><sup>*&#x20;*</sup><sup>*`200`*</sup><sup>*&#x20;*</sup><sup>*and the JSON response does not report*</sup><sup>*&#x20;*</sup><sup>*`"success": false`*</sup><sup>*.*</sup>
* <sup>*Use exponential backoff. For HTTP*</sup><sup>*&#x20;*</sup><sup>*`429`*</sup><sup>*,*</sup><sup>*&#x20;*</sup><sup>*`502`*</sup><sup>*,*</sup><sup>*&#x20;*</sup><sup>*`503`*</sup><sup>*, or*</sup><sup>*&#x20;*</sup><sup>*`504`*</sup><sup>*, or when the response reports that the query exceeded its maximum execution time, space out retry attempts. For example, wait 2, 4, and 8 seconds before successive retries, with a maximum of three retries. If the response specifies a retry interval via*</sup><sup>*&#x20;*</sup><sup>*`retry_after`*</sup><sup>*&#x20;*</sup><sup>*or*</sup><sup>*&#x20;*</sup><sup>*`Retry-After`*</sup><sup>*, wait for that interval.*</sup>
* <sup>*Use smaller query windows and pagination. Split the sale-time range (*</sup><sup>*`since`*</sup><sup>*&#x20;*</sup><sup>*and*</sup><sup>*&#x20;*</sup><sup>*`until`*</sup><sup>*) into daily or weekly windows. Split the transaction update-time range (*</sup><sup>*`update_time_start`*</sup><sup>*&#x20;*</sup><sup>*and*</sup><sup>*&#x20;*</sup><sup>*`update_time_end`*</sup><sup>*) into hourly or daily windows. Use*</sup><sup>*&#x20;*</sup><sup>*`page`*</sup><sup>*&#x20;*</sup><sup>*and*</sup><sup>*&#x20;*</sup><sup>*`limit`*</sup><sup>*&#x20;*</sup><sup>*to paginate results, with*</sup><sup>*&#x20;*</sup><sup>*`limit`*</sup><sup>*&#x20;*</sup><sup>*set to 300 or less.*</sup>
