> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.warelycorp.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.warelycorp.com/_mcp/server.

# List Transactions

POST https://dev.warelypos.com/api/sp/transactions/list

Returns a normalized loyalty transaction ledger across wallet, points, vouchers, and sales.

Example curl:

```bash
curl --request POST '{{base_url}}/sp/transactions/list' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "location_id": {{location_id}},
    "contact_id": {{contact_id}},
    "event_types": ["wallet_adjustment"],
    "start_date": "2026-01-01",
    "end_date": "2026-12-31",
    "per_page": 25,
    "page": 1
  }'
```

Example success response shape:

```json
{
  "success": true,
  "message": "OK",
  "data": [
    {
      "event_type": "wallet_adjustment",
      "contact_id": 456,
      "reference_id": "SP-WALLET-001",
      "amount": 20,
      "balance_after": 95,
      "created_at": "2026-04-06 12:00:00"
    }
  ],
  "meta": {
    "pagination": {
      "total": 1,
      "per_page": 25,
      "current_page": 1,
      "last_page": 1,
      "from": 1,
      "to": 1
    }
  }
}
```

Example error response shape:

```json
{
  "success": false,
  "message": "Unauthorized.",
  "error": {
    "code": "unauthorized",
    "details": {}
  }
}
```

Common platform errors:

* `sp_scope_not_granted`
* `sp_token_scope_missing`
* `sp_location_not_allowed`
* `legacy_field_not_allowed`
* `query_parameters_not_allowed`
* `invalid_content_type`

Reference: https://docs.warelycorp.com/api-reference/transactions/list-transactions

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Headers

- `Authorization` (string, optional)

## Response

### 200

200 OK Example

- `success` (boolean, optional)
- `message` (string, optional)
- `data` (list of SpTransactionsListPostResponsesContentApplicationJsonSchemaDataItems, optional)
- `meta` (SpTransactionsListPostResponsesContentApplicationJsonSchemaMeta, optional)

## Types

### SpTransactionsListPostResponsesContentApplicationJsonSchemaDataItems

- `event_type` (string, optional)
- `contact_id` (integer, optional)
- `reference_id` (string, optional)
- `amount` (integer, optional)
- `balance_after` (integer, optional)
- `created_at` (string, optional)

### SpTransactionsListPostResponsesContentApplicationJsonSchemaMeta

- `pagination` (SpTransactionsListPostResponsesContentApplicationJsonSchemaMetaPagination, optional)

### SpTransactionsListPostResponsesContentApplicationJsonSchemaMetaPagination

- `total` (integer, optional)
- `per_page` (integer, optional)
- `current_page` (integer, optional)
- `last_page` (integer, optional)
- `from` (integer, optional)
- `to` (integer, optional)

## Examples

**Response**

```json
{
  "success": true,
  "message": "OK",
  "data": [
    {
      "event_type": "wallet_adjustment",
      "contact_id": 456,
      "reference_id": "SP-WALLET-001",
      "amount": 20,
      "balance_after": 95,
      "created_at": "2026-04-06 12:00:00"
    }
  ],
  "meta": {
    "pagination": {
      "total": 1,
      "per_page": 25,
      "current_page": 1,
      "last_page": 1,
      "from": 1,
      "to": 1
    }
  }
}
```

**SDK Code**

```python Transactions_listTransactions_example
import requests

url = "https://dev.warelypos.com/api/sp/transactions/list"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Transactions_listTransactions_example
const url = 'https://dev.warelypos.com/api/sp/transactions/list';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Transactions_listTransactions_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://dev.warelypos.com/api/sp/transactions/list"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Transactions_listTransactions_example
require 'uri'
require 'net/http'

url = URI("https://dev.warelypos.com/api/sp/transactions/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Transactions_listTransactions_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://dev.warelypos.com/api/sp/transactions/list")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Transactions_listTransactions_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://dev.warelypos.com/api/sp/transactions/list', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Transactions_listTransactions_example
using RestSharp;

var client = new RestClient("https://dev.warelypos.com/api/sp/transactions/list");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Transactions_listTransactions_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://dev.warelypos.com/api/sp/transactions/list")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```