Resources
Open API endpoints return a structured JSON response wrapping one or more resource objects. This page documents the shape of each resource the API returns. Most endpoints return the Customer resource; the others are returned by their respective endpoints (and several are also embedded inside the Customer resource).
Site resource
Returned by GET /site — the entry point for any integration. It carries your site's configuration: feature flags, default currency/locale, integration keys, payment-gateway settings, and your catalog (products, plans, paywalls, newsletters). Load it first so your front end knows which flows to render.
| Attribute | Description |
|---|---|
account_id | The account the site belongs to. |
name / link / slug | Site name, URL, and slug. |
default_currency / default_locale | Default currency and locale. |
security_key | The site’s Google reCAPTCHA Enterprise public site key. Present only when fraud prevention (Risk Assessment) is enabled; otherwise null. Use it to load reCAPTCHA on your front end and generate the security_token sent with sensitive requests (e.g. register/login). |
ecommerce_enabled | Whether e-commerce is enabled. |
email_verify_enabled | Whether email verification is required. |
passwordless_enabled / passwordless_token_duration | Passwordless login toggle and token lifetime (minutes). |
auth_token_ttl_days | Lifetime of customer auth tokens, in days. |
taxes_enabled / tax_inclusive | Tax configuration. |
restrictive_paywall_metatags_enabled | Whether restrictive paywall metatags are on. |
google_analytics_id, google_app_id, google_app_id_ios, google_app_id_android, facebook_app_id, klaviyo_api_key, auth0_base_url, auth0_client_id | Third-party integration identifiers/keys (null when unset). |
braintree_tokenization / braintree_currency / braintree_gateway_settings | Braintree client settings. |
vantiv_gateway_settings / tap_gateway_settings / cybersource_gateway_settings | Per-gateway client settings (null when the gateway isn't active). |
products | Available products, each with nested plans, paywall, and paywalls (see the sample below). |
newsletters | Newsletter lists available on the site. |
logo / banner_url / custom_css / design_settings | Branding and design configuration. |
settings / antiadblock | Misc. site settings objects. |
cancel_settings / cancellation_reasons | Self-serve cancellation configuration. |
billing_settings | Billing toggles (e.g. vendor_tip). |
Sample payload
{
"error": false,
"data": {
"account_id": "acct_1A2b3C4d5E6f7G8h",
"security_key": null,
"ecommerce_enabled": true,
"email_verify_enabled": false,
"passwordless_enabled": 0,
"passwordless_token_duration": 15,
"auth_token_ttl_days": 60,
"google_analytics_id": null,
"google_app_id": null,
"google_app_id_ios": "",
"google_app_id_android": "",
"facebook_app_id": null,
"klaviyo_api_key": null,
"auth0_base_url": null,
"auth0_client_id": null,
"taxes_enabled": false,
"tax_inclusive": false,
"default_currency": "usd",
"braintree_tokenization": "",
"braintree_currency": "",
"vantiv_gateway_settings": null,
"tap_gateway_settings": null,
"cybersource_gateway_settings": null,
"braintree_gateway_settings": null,
"name": "Example Publication",
"link": "https://example.com",
"slug": "example-publication",
"logo": null,
"banner_url": null,
"custom_css": null,
"settings": {},
"default_locale": "en_US",
"antiadblock": null,
"products": [
{
"id": 1024,
"address_required": true,
"name": "Premium Digital",
"description": "Try 2 weeks free, then only $9.95 / month",
"entitlements": ["premium1"],
"image": "https://uploads.pelcro.com/images/site/product/image/690.png",
"plans": [
{
"id": 1025,
"product_id": 1024,
"amount": 995,
"amount_formatted": "$9.95",
"currency": "usd",
"interval": "month",
"interval_count": 1,
"auto_renew": true,
"trial_period_days": 14,
"nickname": "2 Week Free Trial, then $9.95/month",
"type": "regular"
}
],
"paywall": { "id": 1026, "product_id": 1024, "frequency_limit": 2, "tags": "premium1", "auto_trigger": true },
"paywalls": []
}
],
"newsletters": [
{ "id": 12, "title": "Daily Briefing", "subtitle": "The day in five minutes", "status": "active", "addToRegistration": true, "onlySubscribers": false }
],
"restrictive_paywall_metatags_enabled": false,
"design_settings": null,
"cancel_settings": { "status": false, "refund": false, "countries": false, "states": false },
"cancellation_reasons": [],
"billing_settings": { "vendor_tip": false }
}
}Customer resource
Returned by most endpoints. It carries the customer's profile, a set of relationships, and the authentication token. Relationships are only populated when present.
| Attribute | Description |
|---|---|
id | Unique customer identifier. |
name / full_name | The customer's full name. |
first_name / last_name | Given and family names. |
display_name | Optional public-facing name. |
username | Optional unique username. |
email | The customer's email address. |
organization | Associated organization ({id, name}), if any. |
phone | Phone number. |
language | Two-letter language code. |
balance | Account credit balance, in the smallest currency unit. |
currency | The customer's currency (set on first paid subscription). |
email_confirm / phone_confirm | Whether email / phone are verified. |
tin | Tax identification number. |
metadata | Arbitrary key-value pairs stored on the customer. |
subscriptions | Active or extended subscriptions. |
memberships | Active membership subscriptions. |
expired_memberships | Expired membership subscriptions. |
gift_recipients | Gift subscriptions given by this customer. |
expired_subscriptions | Expired subscriptions. |
addresses | The customer's addresses. |
invoices | The customer's invoices. |
charges | Payments made by the customer. |
orders | E-commerce orders. |
source | The default payment method. |
sources | All payment methods. |
last_login_method | How the customer last signed in (e.g. email). |
auth_token / token | The authentication token (see below). |
The authentication token
A customer resource always contains the customer's identity as a JWT. This token must be sent in the authorization header to access protected endpoints. It can be read from either data.auth_token or data.token (both hold the same value).
Sample payload
{
"data": {
"id": 1017,
"name": "Zakary Bernier",
"full_name": "Zakary Bernier",
"first_name": "Zakary",
"last_name": "Bernier",
"display_name": "Zakary Bernier",
"username": "zakary-bernier",
"email": "[email protected]",
"organization": { "id": 1039, "name": "Carroll - Schumm" },
"phone": "5555550123",
"language": "en",
"balance": 0,
"email_confirm": false,
"email_hardbounce": false,
"phone_confirm": false,
"tin": null,
"salutation": "Mr.",
"title": "Administrator",
"profile_photo": null,
"currency": null,
"subscriptions": null,
"memberships": null,
"expired_memberships": null,
"gift_recipients": null,
"expired_subscriptions": null,
"addresses": null,
"invoices": null,
"charges": null,
"orders": null,
"source": {
"id": 1040,
"object_id": "card_xxxxxxxxxxxx",
"status": "chargeable",
"deletable": false,
"is_default": true,
"properties": { "id": "card_xxxxxxxxxxxx", "brand": "Visa", "last4": "4242", "exp_year": 2030, "exp_month": 3 }
},
"sources": [
{
"id": 1040,
"object_id": "card_xxxxxxxxxxxx",
"status": "chargeable",
"deletable": false,
"is_default": true,
"properties": { "id": "card_xxxxxxxxxxxx", "brand": "Visa", "last4": "4242", "exp_year": 2030, "exp_month": 3 }
}
],
"metadata": { "key1": "value_for_metadata_key1", "key2": "value_for_metadata_key2" },
"is_created": false,
"last_login_method": "email",
"last_active_at": null,
"auth_token": "eyJ0xxx",
"token": "eyJ0xxx"
},
"status": "success"
}Subscription resource
Embedded in the Customer resource (subscriptions, memberships, …) and returned by the membership authorization endpoints.
| Attribute | Description |
|---|---|
id | Unique subscription identifier. |
status | Lifecycle status (e.g. active, trialing, canceled, extended). |
billing | Collection method (charge_automatically or send_invoice). |
quantity | Number of units / seats. |
current_period_start / current_period_end | Current billing period (YYYY-MM-DD). |
start | Subscription start date. |
trial_start / trial_end | Trial window, if any. |
cancel_at / cancel_at_period_end / canceled_at | Cancellation schedule and timestamp. |
cancel_reason | Reason supplied at cancellation. |
renews_at / expires_at / end_date | Next renewal / expiry timestamps. |
address_id / address_required | Linked shipping address and whether one is required. |
domains / ip_addresses | Authorized email domains / IP ranges (membership subscriptions). |
seats_occupied / seat_capacity / pending_members | Membership seat usage. |
is_gift_donor / is_gift_recipient / gift_code / is_redeemed | Gift attributes. |
shipments_remaining / shipments_suspended_until | Shipment tracking for physical plans. |
payment_method | Human-readable description of the charging method. |
plan | The associated plan. |
schedule | The active subscription schedule (phases), if any. |
metadata | Arbitrary key-value pairs. |
Address resource
Embedded in the Customer resource (addresses) and returned by the address endpoints.
| Attribute | Description |
|---|---|
id | Unique address identifier. |
type | shipping or billing. |
is_default | Whether this is the default address of its type. |
first_name / last_name | Recipient name. |
company / title / department | Optional organizational fields. |
line1 / line2 | Street address. |
city / state / state_name | City and state/region (code + full name). |
country / country_name | Two-letter country code + full name. |
postal_code | Postal / ZIP code. |
phone | Contact phone number. |
delivery_instructions / delivery_sequence_number | Optional delivery metadata. |
vendor_id | Assigned vendor, when vendor delivery is used. |
created_at / updated_at | Timestamps. |
Invoice resource
Embedded in the Customer resource (invoices) and returned by the invoice endpoints.
| Attribute | Description |
|---|---|
id | Unique invoice identifier. |
status | Invoice status (e.g. paid, open, draft, void). |
amount_due / amount_paid / amount_remaining | Amounts in the smallest currency unit. |
total | Total amount including tax. |
tax / tax_percent | Tax amount and rate. |
discount | Applied discount, if any. |
currency | Three-letter currency code. |
billing | Collection method. |
paid | Whether the invoice is paid. |
due_date | Payment due date. |
hosted_invoice_url / invoice_pdf | Links to the hosted invoice and PDF. |
plan | The plan this invoice is for. |
subscription_id | The related subscription. |
default_source | The payment method used. |
pelcro_vendor_tip_amount | Vendor tip, if any. |
created_at / updated_at | Timestamps. |
Order resource
Embedded in the Customer resource (orders) and returned by the e-commerce order endpoints.
| Attribute | Description |
|---|---|
id | Unique order identifier. |
user_id | The customer who placed the order. |
address_id | Shipping address. |
amount | Order total, in the smallest currency unit. |
shipping_rate | Shipping cost. |
currency | Three-letter currency code. |
coupon | Applied coupon, if any. |
status | Order status. |
payment_method | Payment method used. |
items | The ordered line items (SKU + quantity). |
metadata | Arbitrary key-value pairs. |
created | Creation timestamp. |
Payment method resource
Returned by the payment methods endpoints, and embedded as source / sources in the Customer resource.
| Attribute | Description |
|---|---|
id | Unique payment-method identifier. |
object_id | The gateway's identifier for the method. |
status | e.g. chargeable. |
is_default | Whether this is the customer's default method. |
deletable | Whether it can be removed. |
properties | Card details: brand, last4, exp_month, exp_year. |
setup_intent | Present when the gateway requires 3D Secure confirmation. |
Sample payload
{
"data": {
"id": 1043,
"object_id": "card_xxxxxxxxxxxx",
"status": "chargeable",
"deletable": false,
"is_default": true,
"properties": { "id": "card_xxxxxxxxxxxx", "brand": "Visa", "last4": "4242", "exp_year": 2030, "exp_month": 3 },
"setup_intent": { "id": "seti_xxxxxxxxxxxx", "client_secret": "seti_xxxxxxxxxxxx", "status": "succeeded" }
}
}Newsletter resource
Returned by the newsletter endpoints.
| Attribute | Description |
|---|---|
email | The subscriber's email address. |
first_name / last_name | Subscriber name. |
postal_code | Postal / ZIP code. |
source | Where the subscription originated (e.g. web). |
lists | The newsletter lists subscribed to. |
consent_url / consent_text / consent_type / consent_ip | Consent capture details. |
status | Subscription status. |
site_id | The site the subscription belongs to. |
created_at / updated_at | Timestamps. |
Sample payload
{
"data": {
"id": 1050,
"email": "[email protected]",
"first_name": "Zakary",
"last_name": "Bernier",
"postal_code": "10022",
"source": "web",
"lists": ["weekly-digest"],
"consent_url": "https://www.example.com/newsletter",
"consent_text": "I agree to receive the newsletter.",
"consent_type": "opt_in",
"consent_ip": "203.0.113.10",
"status": "subscribed",
"site_id": 1025,
"created_at": 1677088109,
"updated_at": 1677088109
}
}Plan resource
Returned by the Eligible plans endpoint, as part of the Segments feature.
| Attribute | Description |
|---|---|
id | Unique plan identifier. |
nickname | Display name. |
description | Plan description. |
interval / interval_count | Billing interval (e.g. month × 1). |
amount / currency | Price in the smallest currency unit + currency. |
is_donation | Whether the plan is a donation. |
auto_renew | Whether it renews automatically. |
type | Plan type (e.g. regular, membership). |
entitlements | Associated entitlements, if any. |
segments | The customer segments the plan is eligible for. |
Sample payload
{
"error": false,
"data": [
{
"id": 1041,
"nickname": "Monthly @ 9.95 USD",
"description": null,
"interval": "month",
"interval_count": 1,
"is_donation": false,
"amount": 995,
"currency": "usd",
"auto_renew": true,
"type": "regular",
"entitlements": null,
"segments": [ { "id": 3, "name": "Subscriber Prospects" } ]
}
]
}Coupon resource
Returned by the Eligible coupons endpoint, as part of the Segments feature.
| Attribute | Description |
|---|---|
id | Unique coupon identifier. |
code | The coupon code to apply. |
type | What the coupon applies to (e.g. subscription). |
duration | How long the discount lasts (e.g. forever, once). |
segments | The customer segments the coupon is eligible for. |
Sample payload
{
"error": false,
"data": [
{
"id": 1042,
"code": "5DOLLAROFF",
"type": "subscription",
"duration": "forever",
"segments": [ { "id": 3, "name": "Subscriber Prospects" } ]
}
]
}Product SKU resource
Returned by the Eligible product SKUs endpoint, as part of the Segments feature.
| Attribute | Description |
|---|---|
id | Unique SKU identifier. |
name | SKU name. |
price / currency | Price in the smallest currency unit + currency. |
image | SKU image path. |
inventory_type / inventory_quantity / inventory_description | Inventory tracking. |
expires_at | Expiry date, if any. |
entitlements | Associated entitlements, if any. |
segments | The customer segments the SKU is eligible for. |
Sample payload
{
"error": false,
"data": [
{
"id": 1031,
"name": "SKU #1",
"price": 995,
"image": "/images/site/ecommerce/product/sku/image/1031-1708523419.png",
"currency": "usd",
"inventory_type": 0,
"inventory_quantity": 1,
"inventory_description": null,
"expires_at": null,
"entitlements": null,
"segments": [ { "id": 3, "name": "Subscriber Prospects" } ]
}
]
}