Skip to main content
Skip to navigation

Developer API (2.0.0)

Download OpenAPI specification:Download

Customer Resources

Part of the REST API v2 Reference. More Customer endpoints: Customer.

Operations about customers.

Endpoints

Get customer center configuration

This endpoint requires the following permission(s): customer_information:customers:read. This endpoint belongs to the Customer Information domain, which has a default rate limit of 480 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

customer_id
required
string [ 1 .. 1500 ] characters
Example: 19b8de26-77c1-49f1-aa18-019a391603e2

ID of the customer

query Parameters
platform
string
Enum: "app_store" "play_store" "mac_app_store" "stripe" "amazon"
Example: platform=app_store

The platform to process the Customer Center configuration for. When provided, returns the locale-selected, platform-filtered configuration the customer would see. When omitted, returns the full unprocessed configuration for all platforms. Must match a store configured on this project.

locale
string
Example: locale=en_US

BCP 47 locale string (e.g. en_US) used to select the appropriate localization when platform is provided. When omitted, the configuration's default locale is used. Has no effect if platform is not provided.

Responses

Response samples

Content type
application/json
{
  • "object": "customer_center_config",
  • "customer_center": { }
}

Get a list of subscriptions associated with a customer

This endpoint requires the following permission(s): customer_information:subscriptions:read. This endpoint belongs to the Customer Information domain, which has a default rate limit of 480 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

customer_id
required
string [ 1 .. 1500 ] characters
Example: 19b8de26-77c1-49f1-aa18-019a391603e2

ID of the customer

query Parameters
environment
string
Enum: "sandbox" "production"
Example: environment=production

Filter by environment, omit to include both.

starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

expand
Array of strings[ items [ 1 .. 5000 ] characters ]
Items Value: "items.redemption"
Example: expand=items.redemption

Specifies which fields in the response should be expanded. Accepted values are: items.redemption (requires customer_information:subscriptions:read permission).

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/subscriptions?starting_after=sub1a2b3c4d",
  • "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/subscriptions"
}

Get a list of purchases associated with a customer

This endpoint requires the following permission(s): customer_information:purchases:read. This endpoint belongs to the Customer Information domain, which has a default rate limit of 480 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

customer_id
required
string [ 1 .. 1500 ] characters
Example: 19b8de26-77c1-49f1-aa18-019a391603e2

ID of the customer

query Parameters
environment
string
Enum: "sandbox" "production"
Example: environment=production

Filter by environment, omit to include both.

starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

expand
Array of strings[ items [ 1 .. 5000 ] characters ]
Items Value: "items.redemption"
Example: expand=items.redemption

Specifies which fields in the response should be expanded. Accepted values are: items.redemption (requires customer_information:purchases:read permission).

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/purchases?starting_after=purc1a2b3c4d5e",
  • "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/purchases"
}

Get a list of customer's active entitlements

This endpoint requires the following permission(s): customer_information:customers:read. This endpoint belongs to the Customer Information domain, which has a default rate limit of 480 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

customer_id
required
string [ 1 .. 1500 ] characters
Example: 19b8de26-77c1-49f1-aa18-019a391603e2

ID of the customer

query Parameters
starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements?starting_after=entlab21dac",
  • "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements"
}

Get a list of the customer's events

This endpoint requires the following permission(s): customer_information:customers:read. This endpoint belongs to the Customer Information domain, which has a default rate limit of 480 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

customer_id
required
string [ 1 .. 1500 ] characters
Example: 19b8de26-77c1-49f1-aa18-019a391603e2

ID of the customer

query Parameters
environment
string
Enum: "sandbox" "production"
Example: environment=production

Filter by environment, omit to include both.

starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/events?starting_after=2e4ff4cd-27e5-4632-a236-5963c22f36b9&limit=20",
  • "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/events"
}

Get a list of customer's in-app currency (virtual currency) balances

This endpoint requires the following permission(s): customer_information:purchases:read. This endpoint belongs to the In-App Currencies (Virtual Currencies) domain, which has a default rate limit of 480 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

customer_id
required
string [ 1 .. 1500 ] characters
Example: 19b8de26-77c1-49f1-aa18-019a391603e2

ID of the customer

query Parameters
include_empty_balances
boolean
Example: include_empty_balances=true

Whether to include in-app currencies (virtual currencies) with a zero balance (default false).

starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/virtual_currencies?starting_after=9fjeja8fjed",
  • "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/virtual_currencies"
}

Create an in-app currency (virtual currency) transaction

This endpoint requires the following permission(s): customer_information:purchases:read_write. This endpoint belongs to the In-App Currencies (Virtual Currencies) domain, which has a default rate limit of 480 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

customer_id
required
string [ 1 .. 1500 ] characters
Example: 19b8de26-77c1-49f1-aa18-019a391603e2

ID of the customer

query Parameters
include_empty_balances
boolean
Example: include_empty_balances=true

Whether to include in-app currencies (virtual currencies) with a zero balance (default false).

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1234-5678-9101-1121

This is an optional idempotency key to ensure exactly once execution of the request. Maximum length is 255 characters.

Request Body schema: application/json
required
required
object

The adjustments to the in-app currencies (virtual currencies)

property name*
additional property
integer
reference
string or null

The reference of the transaction

Responses

Request samples

Content type
application/json
{
  • "adjustments": {
    },
  • "reference": "string"
}

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/virtual_currencies?starting_after=9fjeja8fjed",
  • "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/virtual_currencies"
}

Update an in-app currency (virtual currency) balance without creating a transaction

This endpoint requires the following permission(s): customer_information:purchases:read_write. This endpoint belongs to the In-App Currencies (Virtual Currencies) domain, which has a default rate limit of 480 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

customer_id
required
string [ 1 .. 1500 ] characters
Example: 19b8de26-77c1-49f1-aa18-019a391603e2

ID of the customer

query Parameters
include_empty_balances
boolean
Example: include_empty_balances=true

Whether to include in-app currencies (virtual currencies) with a zero balance (default false).

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1234-5678-9101-1121

This is an optional idempotency key to ensure exactly once execution of the request. Maximum length is 255 characters.

Request Body schema: application/json
required
required
object

The adjustments to the in-app currencies (virtual currencies)

property name*
additional property
integer
reference
string or null

The reference of the transaction

Responses

Request samples

Content type
application/json
{
  • "adjustments": {
    },
  • "reference": "string"
}

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/virtual_currencies?starting_after=9fjeja8fjed",
  • "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/virtual_currencies"
}

Endpoint Reference

All API v2 resources, one page each. General concepts (authentication, pagination, rate limits, error handling) live on the API v2 overview.