billing_read scope. This guide details the four available endpoints, including sample requests and responses.
Authentication
To access the Billing API endpoints, you must use a valid Personal Access Token (PAT) with thebilling_read scope. If you encounter access issues (e.g., 403 Forbidden errors), follow these steps:
-
Verify
billing_readScope:- Make a request to the
GET /2025-07/channelsendpoint to confirm your PAT includes thebilling_readscope. - Sample Request:
- If the response indicates the
billing_readscope is missing, generate a new PAT.
- Make a request to the
-
Generate a New PAT:
- Log in to the ShipBob Dashboard and navigate to Settings > API > Personal Access Tokens.
- Create a new PAT with the
billing_readscope enabled. - Update your API requests with the new PAT.
Get Invoices
Retrieves a list of invoices within a specified date range. EndpointGET /2025-07/invoices
API Reference ↗
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
FromDate | string | Yes | Start date (YYYY-MM-DD) |
ToDate | string | Yes | End date (YYYY-MM-DD) |
Page | number | No | Page number for pagination (default: 1) |
PageSize | number | No | Number of invoices per page (default: 100, max: 100) |
| Header | Value |
|---|---|
Authorization | Bearer <your_PAT> |
Content-Type | application/json |
Search Transactions
Queries transactions based on specified criteria, such as date range or transaction type. EndpointPOST /2025-07/transactions:query
API Reference ↗
Headers
| Header | Value |
|---|---|
Authorization | Bearer <your_PAT> |
Content-Type | application/json |
| Field | Type | Required | Description |
|---|---|---|---|
from_date | string | Yes | Start date (YYYY-MM-DD) |
to_date | string | Yes | End date (YYYY-MM-DD) |
page | number | No | Page number (default: 1) |
page_size | number | No | Transactions per page (default: 100, max: 100) |
transaction_types | array | No | Filter by transaction types (e.g., [“Charge”, “Refund”]) |
invoice_statuses | array | No | Filter by invoice status (e.g., [true, false]) |
Get Transactions by Invoice ID
Retrieves all transactions associated with a specific invoice ID. EndpointGET /2025-07/invoices/{invoiceId}/transactions
API Reference ↗
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invoiceId | number | Yes | The ID of the invoice |
| Parameter | Type | Required | Description |
|---|---|---|---|
Page | number | No | Page number for pagination (default: 1) |
PageSize | number | No | Number of transactions per page (default: 100, max: 100) |
| Header | Value |
|---|---|
Authorization | Bearer <your_PAT> |
Content-Type | application/json |
Get Transaction Fees
Retrieves a list of available transaction fee types. EndpointGET /2025-07/transaction-fees
API Reference ↗
Headers
| Header | Value |
|---|---|
Authorization | Bearer <your_PAT> |
Content-Type | application/json |
Notes
- Date Format: All dates must be in
YYYY-MM-DDformat. - Pagination: Endpoints that support pagination use
PageandPageSizeparameters (default: 100, max: 100). - Scopes: The
billing_readscope is required for all endpoints. Requests without it will fail with an authorization error. - API Specification: For full details, refer to the ShipBob API Specification.
- Support: For issues, contact ShipBob support via the dashboard or review the API documentation for updates.
