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

# Search transactions

POST https://api.shipbob.com/Experimental/transactions:query
Content-Type: application/json

Search transactions with filters (date, invoice, fee type, etc.)

Reference: https://developer.shipbob.com/experimental/api/billing/search-transactions

## Authentication

- `Authorization` header (bearer token, required) — Authentication using Personal Access Token (PAT) token
- `Authorization` header (bearer token, required) — OAuth2 authentication using JWT tokens

## Servers

- `https://api.shipbob.com` (https://api.shipbob.com, default)
- `https://sandbox-api.shipbob.com` (https://sandbox-api.shipbob.com)

## Request

### Query parameters

- `cursor` (string, optional) — [Optional] A pagination token used to jump to first, last, next or previous pages. When supplied, it overrides all other filter parameters.

### Body (application/json)

This endpoint expects an object.

- `fromDate` (datetime, optional, nullable) — Start date for filtering transactions by transaction charge date. Default is current – 7 days
- `invoiceIds` (list of string, optional, nullable) — List of invoice IDs to filter transactions
- `invoicedStatus` (boolean, optional, nullable) — Filter Transactions by invoicing status: - True(Billed Transactions) - False(Unbilled Transactions) - null (Billed + Unbilled Transactions)
- `pageSize` (integer, optional) — Number of transactions to return per page (default is 100, to be entered when API is called for first time). Must be between 1 and 1000.
- `referenceIds` (list of string, optional, nullable) — List of reference IDs (like Shipment ID, WRO id) to filter transactions (can be numeric or string identifiers).
- `referenceTypes` (list of string, optional, nullable) — The type of reference associated with the ReferenceId. Available options: - Shipment - Return - WRO - URO
- `sortOrder` (enum, optional)
  - Allowed values: `Ascending`, `Descending`
- `toDate` (datetime, optional, nullable) — End date for filtering transactions by transaction charge date. Default is current date.
- `transactionFees` (list of string, optional, nullable) — To get all the available transaction fees use this endpoint:- '/transaction-fees'
- `transactionTypes` (list of string, optional, nullable) — The classification or nature of the transaction Transaction Types - Charge, Refund, Credit, Payment, BalanceAdjustment

## Response

### 200

Success

- `first` (string, optional, nullable) — Go to the first page
- `items` (list of object, optional, nullable)
  - `additionalDetails` (map from string to any, optional, nullable) — Any additional details related to the transaction in a key-value pair format.
  - `amount` (double, optional, nullable) — Charge Amount for the transaction
  - `chargeDate` (string, optional, nullable) — The Charge date of transaction
  - `chargeEndDate` (string, optional, nullable) — The end of the billing period for which the charge applies. Null when not applicable.
  - `chargeStartDate` (string, optional, nullable) — The start of the billing period for which the charge applies. Null when not applicable.
  - `currencyCode` (string, optional, nullable) — The ISO currency code (e.g., USD, EUR) for the transaction
  - `fulfillmentCenter` (string, optional, nullable) — The name or code of the fulfillment center involved in the transaction.
  - `invoiceDate` (string, optional, nullable) — The date the invoice was generated
  - `invoiceId` (integer, optional, nullable) — The unique identifier of the related invoice.
  - `invoiceType` (string, optional, nullable) — The type or category of the invoice. Available options: - Shipping - Inbound Fee - WarehouseStorage - AdditionalFee - Return - Credits - BalanceAdjustment - Payment
  - `invoicedStatus` (boolean, optional, nullable) — Indicates whether the transaction has been invoiced.
  - `referenceId` (string, optional, nullable) — A unique reference identifier associated with the transaction
  - `referenceType` (string, optional, nullable) — The type of reference associated with the ReferenceId. Available options: - Shipment - Return - WRO - URO - Ticket Number - FC - LPN Reference - Transfer Plan
  - `taxes` (list of object, optional, nullable) — A list of tax details applied to the transaction if exists.
    - `taxAmount` (double, optional) — Tax amount charged for the tax type.
    - `taxRate` (double, optional) — Rate of Tax charged for the tax type
    - `taxType` (string, optional, nullable) — Type of tax charged for eg. GST
  - `transactionFee` (string, optional, nullable) — The fee type associated with the transaction for eg. Shipping fees To get all the available transaction fees use the endpoint - '/transaction-fees'
  - `transactionId` (string, optional, nullable) — The unique identifier for transaction
  - `transactionSubType` (string, optional, nullable) — The subtype label for the charge (e.g., labor role or packaging type). Null when the transaction has no subtype.
  - `transactionType` (string, optional, nullable) — The classification or nature of the transaction Transaction Types - Charge, Refund, Credit, Payment, BalanceAdjustment
- `last` (string, optional, nullable) — Go to the Last page
- `next` (string, optional, nullable) — Go to the Next page
- `prev` (string, optional, nullable) — Go to the Previous page

## Errors

### 400 Bad Request Error

Bad Request

- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `title` (string, optional, nullable)
- `type` (string, optional, nullable)

### 401 Unauthorized Error

Authorization missing or invalid

- `any`

### 403 Forbidden Error

The provided credentials are not authorized to access this resource

- `any`

### 500 Internal Server Error

Server Error

- `any`

## Examples

**Request**

```json
{
  "fromDate": "2019-08-24",
  "invoiceIds": [
    "123",
    "456"
  ],
  "invoicedStatus": true,
  "pageSize": 0,
  "referenceIds": [
    "11553288",
    "43-12000928-Pallet00"
  ],
  "referenceTypes": [
    "FC"
  ],
  "sortOrder": "Ascending",
  "toDate": "2019-08-24",
  "transactionFees": [
    "Kitting Fee",
    "Warehousing Fee"
  ],
  "transactionTypes": [
    "Charge"
  ]
}
```

**Response**

```json
{
  "first": "f8cUk/xJkbeYp2L8oHqxL2hFiGz3qjre",
  "items": [
    {
      "additionalDetails": {
        "Comment": "TestInvoice"
      },
      "amount": 0.09,
      "chargeDate": "2025-01-01",
      "chargeEndDate": "2025-01-12",
      "chargeStartDate": "2025-01-06",
      "currencyCode": "USD",
      "fulfillmentCenter": "Altona VIC",
      "invoiceDate": "2025-01-01",
      "invoiceId": 12345,
      "invoiceType": "Shipping",
      "invoicedStatus": true,
      "referenceId": "12345",
      "referenceType": "Shipment",
      "taxes": [
        {
          "taxAmount": 0.01,
          "taxRate": 10,
          "taxType": "GST"
        }
      ],
      "transactionFee": "Shipping",
      "transactionId": "01AN4Z07BY79KA1307SR9X4MV3",
      "transactionSubType": "WarehouseLeads",
      "transactionType": "Charge"
    }
  ],
  "last": "f8cUk/xJkbeYp2L8oHqxL2hFiGz3qjqt",
  "next": "f8cUk/xjhyEYp2L8oHqxL2hFiGz3qjqt",
  "prev": "f8cUk/xJkbeYp2L8oHqxL2hFiGz3qjcc"
}
```

**SDK Code**

```python default
import requests

url = "https://api.shipbob.com/Experimental/transactions:query"

querystring = {"cursor":"f8cUk/xJkbeYp2fCr3yJJvL8oHqxL2hFiGz3qjqtkQ5Q0+BVMffFoIfoqzOkEsAw"}

payload = {
    "fromDate": "2019-08-24",
    "invoiceIds": ["123", "456"],
    "invoicedStatus": True,
    "pageSize": 0,
    "referenceIds": ["11553288", "43-12000928-Pallet00"],
    "referenceTypes": ["FC"],
    "sortOrder": "Ascending",
    "toDate": "2019-08-24",
    "transactionFees": ["Kitting Fee", "Warehousing Fee"],
    "transactionTypes": ["Charge"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript default
const url = 'https://api.shipbob.com/Experimental/transactions:query?cursor=f8cUk%2FxJkbeYp2fCr3yJJvL8oHqxL2hFiGz3qjqtkQ5Q0%2BBVMffFoIfoqzOkEsAw';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"fromDate":"2019-08-24","invoiceIds":["123","456"],"invoicedStatus":true,"pageSize":0,"referenceIds":["11553288","43-12000928-Pallet00"],"referenceTypes":["FC"],"sortOrder":"Ascending","toDate":"2019-08-24","transactionFees":["Kitting Fee","Warehousing Fee"],"transactionTypes":["Charge"]}'
};

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

```go default
package main

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

func main() {

	url := "https://api.shipbob.com/Experimental/transactions:query?cursor=f8cUk%2FxJkbeYp2fCr3yJJvL8oHqxL2hFiGz3qjqtkQ5Q0%2BBVMffFoIfoqzOkEsAw"

	payload := strings.NewReader("{\n  \"fromDate\": \"2019-08-24\",\n  \"invoiceIds\": [\n    \"123\",\n    \"456\"\n  ],\n  \"invoicedStatus\": true,\n  \"pageSize\": 0,\n  \"referenceIds\": [\n    \"11553288\",\n    \"43-12000928-Pallet00\"\n  ],\n  \"referenceTypes\": [\n    \"FC\"\n  ],\n  \"sortOrder\": \"Ascending\",\n  \"toDate\": \"2019-08-24\",\n  \"transactionFees\": [\n    \"Kitting Fee\",\n    \"Warehousing Fee\"\n  ],\n  \"transactionTypes\": [\n    \"Charge\"\n  ]\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://api.shipbob.com/Experimental/transactions:query?cursor=f8cUk%2FxJkbeYp2fCr3yJJvL8oHqxL2hFiGz3qjqtkQ5Q0%2BBVMffFoIfoqzOkEsAw")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"fromDate\": \"2019-08-24\",\n  \"invoiceIds\": [\n    \"123\",\n    \"456\"\n  ],\n  \"invoicedStatus\": true,\n  \"pageSize\": 0,\n  \"referenceIds\": [\n    \"11553288\",\n    \"43-12000928-Pallet00\"\n  ],\n  \"referenceTypes\": [\n    \"FC\"\n  ],\n  \"sortOrder\": \"Ascending\",\n  \"toDate\": \"2019-08-24\",\n  \"transactionFees\": [\n    \"Kitting Fee\",\n    \"Warehousing Fee\"\n  ],\n  \"transactionTypes\": [\n    \"Charge\"\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.shipbob.com/Experimental/transactions:query?cursor=f8cUk%2FxJkbeYp2fCr3yJJvL8oHqxL2hFiGz3qjqtkQ5Q0%2BBVMffFoIfoqzOkEsAw")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fromDate\": \"2019-08-24\",\n  \"invoiceIds\": [\n    \"123\",\n    \"456\"\n  ],\n  \"invoicedStatus\": true,\n  \"pageSize\": 0,\n  \"referenceIds\": [\n    \"11553288\",\n    \"43-12000928-Pallet00\"\n  ],\n  \"referenceTypes\": [\n    \"FC\"\n  ],\n  \"sortOrder\": \"Ascending\",\n  \"toDate\": \"2019-08-24\",\n  \"transactionFees\": [\n    \"Kitting Fee\",\n    \"Warehousing Fee\"\n  ],\n  \"transactionTypes\": [\n    \"Charge\"\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.shipbob.com/Experimental/transactions:query?cursor=f8cUk%2FxJkbeYp2fCr3yJJvL8oHqxL2hFiGz3qjqtkQ5Q0%2BBVMffFoIfoqzOkEsAw', [
  'body' => '{
  "fromDate": "2019-08-24",
  "invoiceIds": [
    "123",
    "456"
  ],
  "invoicedStatus": true,
  "pageSize": 0,
  "referenceIds": [
    "11553288",
    "43-12000928-Pallet00"
  ],
  "referenceTypes": [
    "FC"
  ],
  "sortOrder": "Ascending",
  "toDate": "2019-08-24",
  "transactionFees": [
    "Kitting Fee",
    "Warehousing Fee"
  ],
  "transactionTypes": [
    "Charge"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp default
using RestSharp;

var client = new RestClient("https://api.shipbob.com/Experimental/transactions:query?cursor=f8cUk%2FxJkbeYp2fCr3yJJvL8oHqxL2hFiGz3qjqtkQ5Q0%2BBVMffFoIfoqzOkEsAw");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"fromDate\": \"2019-08-24\",\n  \"invoiceIds\": [\n    \"123\",\n    \"456\"\n  ],\n  \"invoicedStatus\": true,\n  \"pageSize\": 0,\n  \"referenceIds\": [\n    \"11553288\",\n    \"43-12000928-Pallet00\"\n  ],\n  \"referenceTypes\": [\n    \"FC\"\n  ],\n  \"sortOrder\": \"Ascending\",\n  \"toDate\": \"2019-08-24\",\n  \"transactionFees\": [\n    \"Kitting Fee\",\n    \"Warehousing Fee\"\n  ],\n  \"transactionTypes\": [\n    \"Charge\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift default
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "fromDate": "2019-08-24",
  "invoiceIds": ["123", "456"],
  "invoicedStatus": true,
  "pageSize": 0,
  "referenceIds": ["11553288", "43-12000928-Pallet00"],
  "referenceTypes": ["FC"],
  "sortOrder": "Ascending",
  "toDate": "2019-08-24",
  "transactionFees": ["Kitting Fee", "Warehousing Fee"],
  "transactionTypes": ["Charge"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.shipbob.com/Experimental/transactions:query?cursor=f8cUk%2FxJkbeYp2fCr3yJJvL8oHqxL2hFiGz3qjqtkQ5Q0%2BBVMffFoIfoqzOkEsAw")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```