Skip to main content
GET
/
external
/
customers
/
external-id
/
{externalId}
/
transactions
Get customer transactions
curl --request GET \
  --url https://platform.runonatlas.com/external/customers/external-id/{externalId}/transactions \
  --header 'x-api-key: <api-key>'
{
  "results": [
    {
      "allocationBlockId": "atlas-internal-allocation-block-id-123",
      "createdAt": "2021-01-01T00:00:00.000Z",
      "id": "atlas-internal-transaction-id-123",
      "merchantId": "atlas-internal-merchant-id-123",
      "type": "planAllocation",
      "updatedAt": "2021-01-01T00:00:00.000Z",
      "amount": 100,
      "billable": {
        "id": "atlas-internal-billable-id-123",
        "name": "AI Generation"
      },
      "allocationBlock": {
        "id": "atlas-internal-allocation-block-id-123",
        "amount": 100,
        "customPricingUnitId": "atlas-internal-custom-pricing-unit-id-123",
        "customPricingUnit": {
          "displayName": "API Credits"
        },
        "invoice": {
          "id": "atlas-internal-invoice-id-123",
          "vanityId": 123456
        },
        "subscription": {
          "billingCadence": "monthly",
          "plan": {
            "name": "Basic Plan"
          }
        }
      },
      "billableId": "atlas-internal-billable-id-123",
      "eventId": "atlas-internal-event-id-123",
      "operationId": "atlas-internal-operation-id-123"
    }
  ],
  "count": 100,
  "pages": 10,
  "currentPage": 1
}

Authorizations

x-api-key
string
header
required

You can obtain this key from the Atlas dashboard. It must be of type secret

Path Parameters

externalId
string
required

The external ID of the customer (e.g. the customer ID in your system)

Minimum string length: 1
Example:

"external-customer-id-123"

Query Parameters

order
enum<string>
default:asc

The order of the results.

Available options:
asc,
desc
Example:

"asc"

page
integer
default:1

The page number of the results.

Required range: x >= 1
Example:

1

pageSize
integer
default:10

The number of results per page.

Required range: 1 <= x <= 100
Example:

10

Response

The transactions that have been retrieved.

results
object[]
required
count
number
required

The total number of results.

Example:

100

pages
number
required

The total number of pages.

Example:

10

currentPage
number
required

The current page number.

Example:

1