For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://developer-stage.shipbob.dev/api/billing/llms.txt. For full documentation content, see https://developer-stage.shipbob.dev/api/billing/llms-full.txt.

# Search Transactions

POST https://sandbox-api.shipbob.com/2026-01/transactions:query
Content-Type: application/json

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

Reference: https://developer-stage.shipbob.dev/api/billing/search-transactions

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-2026-01
  version: 1.0.0
paths:
  /2026-01/transactions:query:
    post:
      operationId: search-transactions
      summary: Search Transactions
      description: Search transactions with filters (date, invoice, fee type, etc.)
      tags:
        - subpackage_billing
      parameters:
        - name: Cursor
          in: query
          description: >
            [Optional] A pagination token used to jump to first, last, next or
            previous pages. When supplied, it overrides all other filter
            parameters.
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          description: Authentication using Personal Access Token (PAT) token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Billing.TransactionDtoCursorPagedResponseV3
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Billing.ProblemDetails'
        '401':
          description: Authorization missing or invalid
          content:
            application/json:
              schema:
                description: Any type
        '403':
          description: The provided credentials are not authorized to access this resource
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        description: >-
          Used to filter transactions based on search criteria. Required if
          cursor is not provided. Ignored when cursor is present (i.e., for
          paginated requests).
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Billing.TransactionRequestFilterV3'
servers:
  - url: https://sandbox-api.shipbob.com
components:
  schemas:
    BillingTransactionRequestFilterV3ReferenceTypesItems:
      type: string
      enum:
        - Shipment
        - Return
        - WRO
        - URO
      title: BillingTransactionRequestFilterV3ReferenceTypesItems
    Billing.SortOrder:
      type: string
      enum:
        - Ascending
        - Descending
      default: Descending
      description: >-
        Sort order for results. Ascending sorts from lowest to highest,
        Descending sorts from highest to lowest.
      title: Billing.SortOrder
    BillingTransactionRequestFilterV3TransactionTypesItems:
      type: string
      enum:
        - Charge
        - Refund
        - Credit
        - Payment
        - BalanceAdjustment
      title: BillingTransactionRequestFilterV3TransactionTypesItems
    Billing.TransactionRequestFilterV3:
      type: object
      properties:
        from_date:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Start date for filtering transactions by charge date. Defaults to 7
            days before the current date if not specified.
        invoice_ids:
          type:
            - array
            - 'null'
          items:
            type: string
          description: List of invoice IDs to filter transactions by.
        invoiced_status:
          type:
            - boolean
            - 'null'
          description: >-
            Filter transactions by invoicing status. True returns billed
            transactions, false returns unbilled transactions, and null returns
            both billed and unbilled transactions.
        page_size:
          type: integer
          description: >-
            Number of transactions to return per page. Default is 100. Must be
            between 1 and 1000.
        reference_ids:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            List of reference IDs (such as Shipment IDs, WRO IDs) to filter
            transactions. Can be numeric or string identifiers.
        reference_types:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/BillingTransactionRequestFilterV3ReferenceTypesItems
          description: >-
            The types of references associated with the reference IDs to filter
            by.
        sort_order:
          $ref: '#/components/schemas/Billing.SortOrder'
        to_date:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            End date for filtering transactions by charge date. Defaults to the
            current date if not specified.
        transaction_fees:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            List of transaction fee types to filter by. To get all available
            transaction fees, use the '/transaction-fees' endpoint.
        transaction_types:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/BillingTransactionRequestFilterV3TransactionTypesItems
          description: The classification or nature of the transactions to filter by.
      title: Billing.TransactionRequestFilterV3
    BillingTransactionDtoV3InvoiceType:
      type: string
      enum:
        - Shipping
        - Inbound Fee
        - WarehouseStorage
        - AdditionalFee
        - Return
        - Credits
        - BalanceAdjustment
        - Payment
      description: The type or category of the invoice.
      title: BillingTransactionDtoV3InvoiceType
    BillingTransactionDtoV3ReferenceType:
      type: string
      enum:
        - Shipment
        - Return
        - WRO
        - URO
        - Ticket Number
        - FC
        - LPN Reference
        - Transfer Plan
      description: The type of reference associated with the reference ID.
      title: BillingTransactionDtoV3ReferenceType
    Billing.InvoiceTaxDtoV3:
      type: object
      properties:
        tax_amount:
          type: number
          format: double
          description: Tax amount charged for this tax type.
        tax_rate:
          type: number
          format: double
          description: Tax rate applied as a percentage.
        tax_type:
          type:
            - string
            - 'null'
          description: Type of tax applied.
      description: Tax information associated with a transaction or invoice.
      title: Billing.InvoiceTaxDtoV3
    BillingTransactionDtoV3TransactionType:
      type: string
      enum:
        - Charge
        - Refund
        - Credit
        - Payment
        - BalanceAdjustment
      description: The classification or nature of the transaction.
      title: BillingTransactionDtoV3TransactionType
    Billing.TransactionDtoV3:
      type: object
      properties:
        additional_details:
          type:
            - object
            - 'null'
          additionalProperties:
            description: Any type
          description: >-
            Any additional details related to the transaction in a key-value
            pair format.
        amount:
          type:
            - number
            - 'null'
          format: double
          description: The charge amount for the transaction.
        charge_date:
          type:
            - string
            - 'null'
          description: The date when the transaction was charged.
        currency_code:
          type:
            - string
            - 'null'
          description: The ISO currency code (e.g., USD, EUR) for the transaction.
        fulfillment_center:
          type:
            - string
            - 'null'
          description: >-
            The name or code of the fulfillment center involved in the
            transaction.
        invoice_date:
          type:
            - string
            - 'null'
          description: The date the invoice was generated.
        invoice_id:
          type:
            - integer
            - 'null'
          description: >-
            The unique identifier of the invoice associated with this
            transaction.
        invoice_type:
          oneOf:
            - $ref: '#/components/schemas/BillingTransactionDtoV3InvoiceType'
            - type: 'null'
          description: The type or category of the invoice.
        invoiced_status:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether the transaction has been invoiced. True if billed,
            false if unbilled.
        reference_id:
          type:
            - string
            - 'null'
          description: A unique reference identifier associated with the transaction.
        reference_type:
          oneOf:
            - $ref: '#/components/schemas/BillingTransactionDtoV3ReferenceType'
            - type: 'null'
          description: The type of reference associated with the reference ID.
        taxes:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Billing.InvoiceTaxDtoV3'
          description: A list of tax details applied to the transaction, if any exist.
        transaction_fee:
          type:
            - string
            - 'null'
          description: >-
            The fee type associated with the transaction. To get all available
            transaction fees, use the '/transaction-fees' endpoint.
        transaction_id:
          type:
            - string
            - 'null'
          description: The unique identifier for the transaction.
        transaction_type:
          oneOf:
            - $ref: '#/components/schemas/BillingTransactionDtoV3TransactionType'
            - type: 'null'
          description: The classification or nature of the transaction.
      description: Represents a transaction data object.
      title: Billing.TransactionDtoV3
    Billing.TransactionDtoCursorPagedResponseV3:
      type: object
      properties:
        first:
          type:
            - string
            - 'null'
          description: Go to the first page
        items:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Billing.TransactionDtoV3'
        last:
          type:
            - string
            - 'null'
          description: Go to the Last page
        next:
          type:
            - string
            - 'null'
          description: Go to the Next page
        prev:
          type:
            - string
            - 'null'
          description: Go to the Previous page
      title: Billing.TransactionDtoCursorPagedResponseV3
    Billing.ProblemDetails:
      type: object
      properties:
        detail:
          type:
            - string
            - 'null'
        instance:
          type:
            - string
            - 'null'
        status:
          type:
            - integer
            - 'null'
        title:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
      title: Billing.ProblemDetails
  securitySchemes:
    PAT:
      type: http
      scheme: bearer
      description: Authentication using Personal Access Token (PAT) token
    OAuth2:
      type: http
      scheme: bearer
      description: OAuth2 authentication using JWT tokens

```

## SDK Code Examples

```python Billing_searchTransactions_example
import requests

url = "https://sandbox-api.shipbob.com/2026-01/transactions:query"

payload = {
    "from_date": "2019-08-24",
    "invoice_ids": ["12345"],
    "invoiced_status": True,
    "page_size": 10,
    "reference_ids": ["11553288", "43-12000928-Pallet00"],
    "reference_types": ["Shipment"],
    "sort_order": "Ascending",
    "to_date": "2019-08-24",
    "transaction_fees": ["Kitting Fee", "Warehousing Fee"],
    "transaction_types": ["Charge"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Billing_searchTransactions_example
const url = 'https://sandbox-api.shipbob.com/2026-01/transactions:query';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"from_date":"2019-08-24","invoice_ids":["12345"],"invoiced_status":true,"page_size":10,"reference_ids":["11553288","43-12000928-Pallet00"],"reference_types":["Shipment"],"sort_order":"Ascending","to_date":"2019-08-24","transaction_fees":["Kitting Fee","Warehousing Fee"],"transaction_types":["Charge"]}'
};

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

```go Billing_searchTransactions_example
package main

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

func main() {

	url := "https://sandbox-api.shipbob.com/2026-01/transactions:query"

	payload := strings.NewReader("{\n  \"from_date\": \"2019-08-24\",\n  \"invoice_ids\": [\n    \"12345\"\n  ],\n  \"invoiced_status\": true,\n  \"page_size\": 10,\n  \"reference_ids\": [\n    \"11553288\",\n    \"43-12000928-Pallet00\"\n  ],\n  \"reference_types\": [\n    \"Shipment\"\n  ],\n  \"sort_order\": \"Ascending\",\n  \"to_date\": \"2019-08-24\",\n  \"transaction_fees\": [\n    \"Kitting Fee\",\n    \"Warehousing Fee\"\n  ],\n  \"transaction_types\": [\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 Billing_searchTransactions_example
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.shipbob.com/2026-01/transactions:query")

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  \"from_date\": \"2019-08-24\",\n  \"invoice_ids\": [\n    \"12345\"\n  ],\n  \"invoiced_status\": true,\n  \"page_size\": 10,\n  \"reference_ids\": [\n    \"11553288\",\n    \"43-12000928-Pallet00\"\n  ],\n  \"reference_types\": [\n    \"Shipment\"\n  ],\n  \"sort_order\": \"Ascending\",\n  \"to_date\": \"2019-08-24\",\n  \"transaction_fees\": [\n    \"Kitting Fee\",\n    \"Warehousing Fee\"\n  ],\n  \"transaction_types\": [\n    \"Charge\"\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://sandbox-api.shipbob.com/2026-01/transactions:query")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from_date\": \"2019-08-24\",\n  \"invoice_ids\": [\n    \"12345\"\n  ],\n  \"invoiced_status\": true,\n  \"page_size\": 10,\n  \"reference_ids\": [\n    \"11553288\",\n    \"43-12000928-Pallet00\"\n  ],\n  \"reference_types\": [\n    \"Shipment\"\n  ],\n  \"sort_order\": \"Ascending\",\n  \"to_date\": \"2019-08-24\",\n  \"transaction_fees\": [\n    \"Kitting Fee\",\n    \"Warehousing Fee\"\n  ],\n  \"transaction_types\": [\n    \"Charge\"\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox-api.shipbob.com/2026-01/transactions:query', [
  'body' => '{
  "from_date": "2019-08-24",
  "invoice_ids": [
    "12345"
  ],
  "invoiced_status": true,
  "page_size": 10,
  "reference_ids": [
    "11553288",
    "43-12000928-Pallet00"
  ],
  "reference_types": [
    "Shipment"
  ],
  "sort_order": "Ascending",
  "to_date": "2019-08-24",
  "transaction_fees": [
    "Kitting Fee",
    "Warehousing Fee"
  ],
  "transaction_types": [
    "Charge"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Billing_searchTransactions_example
using RestSharp;

var client = new RestClient("https://sandbox-api.shipbob.com/2026-01/transactions:query");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from_date\": \"2019-08-24\",\n  \"invoice_ids\": [\n    \"12345\"\n  ],\n  \"invoiced_status\": true,\n  \"page_size\": 10,\n  \"reference_ids\": [\n    \"11553288\",\n    \"43-12000928-Pallet00\"\n  ],\n  \"reference_types\": [\n    \"Shipment\"\n  ],\n  \"sort_order\": \"Ascending\",\n  \"to_date\": \"2019-08-24\",\n  \"transaction_fees\": [\n    \"Kitting Fee\",\n    \"Warehousing Fee\"\n  ],\n  \"transaction_types\": [\n    \"Charge\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Billing_searchTransactions_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "from_date": "2019-08-24",
  "invoice_ids": ["12345"],
  "invoiced_status": true,
  "page_size": 10,
  "reference_ids": ["11553288", "43-12000928-Pallet00"],
  "reference_types": ["Shipment"],
  "sort_order": "Ascending",
  "to_date": "2019-08-24",
  "transaction_fees": ["Kitting Fee", "Warehousing Fee"],
  "transaction_types": ["Charge"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/2026-01/transactions:query")! 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()
```