SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Private API reference
Docs
Information
    Base URLAuthenticationPaginationErrors
Customer
    Get list of customersCreate a customerGet customer by IDUpdate a customerDelete a customerChange a customer's store credit balanceCreate a customer noteUpdate a customer noteDelete a customer note
Address
    Create an addressUpdate an addressDelete an address
Pickup Info
    Get list of pickup infoCreate pickup infoUpdate pickup infoDelete pickup info
Subscription
    Get list of subscriptionsCreate a subscriptionGet subscription by IDUpdate a subscriptionCancel a subscriptionUndo cancellationPause a subscriptionResume a subscriptionSkip renewals until a dateReactivate a cancelled or expired subscriptionSwitch the subscription to another plan by starting overChange the plans of the subscription's itemsUpdate a subscription's shipping address and methodUpdate a subscription's payment methodUpdate a subscription's survey preferencesCreate a subscription itemShow a subscription itemUpdate a subscription itemRemove a subscription itemUpdate a subscription item's preferencesUpdate a subscription item's bundleChange the plan of a subscription itemChange the variant of a one-time itemApply a discount to a subscription itemRemove a subscription item discountApply a discount to a subscriptionRemove a subscription discount
Invoice
    Get list of invoicesGet invoice by IDSchedule the next payment for invoiceVoid an invoiceForgive an invoiceMark an invoice as paid
Order
    Get list of ordersGet order by IDUpdate an orderShip an orderCancel an orderMark an order as pendingArchive an orderMark an order as a future shipmentSync order shipping items
Payment Method
    Create a payment methodGet payment method by IDDelete a payment method
Transaction
    Get list of transactionsGet transaction by ID
Cancellation
    Get shop cancellation reasons
Product
    Get list of productsGet product by IDGet variant by IDUpdate variantGet plan by IDUpdate planCreate subscription productUpdate subscription productPublish subscription productUnpublish subscription productArchive subscription productSync subscription product metadataCreate one-time productUpdate one-time productPublish one-time productUnpublish one-time productArchive one-time productSync one-time product metadataCreate variantArchive variantBatch create/update/archive variantsCreate planArchive plan
Survey
    Get survey by IDGet list of surveys
Bundle
    Get list of bundlesCreate a new bundleGet bundle by IDUpdate a bundleGet list of bundle itemsCreate a bundle itemBatch create bundle itemsGet bundle item by IDUpdate a bundle itemDelete a bundle itemGet list of bundle groupsPublish a bundleUnpublish a bundleArchive a bundleSync bundle metadataCreate a bundle planGet bundle plan by IDUpdate a bundle planArchive a bundle plan
Tag
    Get list of tags
Metafield
    Get shop's metafieldsCreate a new metadataUpdate the metadata
Funnel
    Get list of funnelsGet funnel by ID
Option
    Get list of options
Country
    Get list of countries
Inventory
    Get list of inventory itemsCreate a new inventory itemGet inventory item by IDUpdate an inventory itemArchive an inventory itemGet list of inventory groupsCreate a new inventory groupGet inventory group by IDUpdate an inventory group
Coupon
    Get list of couponsCreate a couponGet coupon by IDUpdate a couponArchive a coupon
Product Collection
    Get list of product collectionsCreate a product collectionGet product collection by IDUpdate a product collectionPublish a product collectionUnpublish a product collectionArchive a product collectionGet list of collection groups with itemsSync collection items

Customer

Private Customer API endpoints

Endpoints
  • GET/customers
  • POST/customers
  • GET/customers/{customer_id}
  • PATCH/customers/{customer_id}
  • DELETE/customers/{customer_id}
  • POST/customers/{customer_id}/balance
  • POST/customers/{customer_id}/notes
  • PATCH/customers/{customer_id}/notes/{note_id}
  • DELETE/customers/{customer_id}/notes/{note_id}

Get list of customers

GET /customers

An API endpoint to get list of customers. Results are always ordered by customer ID, newest first.

Query parameters

pageoptionalinteger

Page number

per_pageoptionalinteger

Items per page

idsoptionalinteger[]

Filter by customer IDs

emailsoptionalstring[]

Keep only customers with one of these email addresses. Each match is exact, not a partial search, and ignores letter case.

has_active_subscriptionoptionalinteger

1 keeps only customers with at least one active subscription, 0 keeps only customers without any active subscription. Send 1 or 0, not true/false.

Possible values: 0, 1.

tagsoptionalinteger[]

Keep only customers tagged with at least one of these tag IDs. Every ID must be a tag of your shop.

countryoptionalstring

Keep only customers with an address in this country. The value is the country name (for example United States), not a country code, and must match a known shipping country.

orders_countoptionalinteger

Keep only customers whose total order count equals this number exactly.

balanceoptionalobject

Filter on the customer's store credit balance, in minor units. Both keys are required as soon as balance is sent. Customers with no balance record are treated as 0 and are matched whenever the comparison holds for zero.

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

Returnsobject

Customers list response

Error responses

422object

One or more query parameters failed validation, for example a malformed emails entry, a tag ID that does not belong to the shop, an unknown country name, or a balance filter missing its value or operator.

curl https://api.subbly.co/private/v1/customers \ -H 'X-API-KEY: <api-key>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" }, "payment_methods": [ { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" } ], "subscriptions": [ { "id": 1, "customer_id": 1, "customer": {}, "referred_by": 1, "product_id": 1, "product": {}, "quantity": 1, "shipping_address_id": 1, "shipping_address": {}, "shipping_method_id": 1, "shipping_method": {}, "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "billing_address_id": 1, "billing_address": {}, "payment_method_id": 1, "payment_method": {}, "currency_code": "USD", "survey": {}, "preferences": {}, "bundle": {}, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "active": true, "paused": false, "paused_at": null, "skipping_until": null, "waiting_until": null, "past_due": false, "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ {} ], "discounts": [ {} ], "addons": [ {} ], "items": [ {} ], "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "cancelled_at": null, "reactivated_at": null, "switched_at": null, "previous_subscription_id": null, "auto_collecting": true, "metadata": [ {} ], "tags": [ "tags" ], "tags_meta": [], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ { "id": 12, "value": "VIP" } ], "notes": [ { "id": 91, "customer_id": 8435732, "note": "Called about the missing box.", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addresses": [ { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z" } ] }

Create a customer

POST /customers

Create a customer in your shop. When a user account already exists for the email it is reused and only the shop customer record is created, so first_name and last_name are ignored in that case; otherwise a new user account is registered with those names. The email must not already belong to a customer of this shop.

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

Request body

emailRequiredstring

Must not already belong to a customer of this shop. When a user account with this email already exists (for example because the person is a customer of another shop) that account is reused and first_name/last_name are ignored.

Format: email.

first_nameRequiredstring
last_nameRequiredstring
marketing_consentoptionalinteger

Marketing opt-in. Send 1 or 0 (JSON true is coerced to 1; false is rejected). Defaults to 0 when omitted.

Possible values: 0, 1.

external_idoptionalstring | null

Your own identifier for this customer.

ReturnsCustomer

Customer object response

Error responses

422object

Validation failed, for example the email already belongs to a customer of this shop, or a required name is missing or longer than 50 characters.

curl -X POST https://api.subbly.co/private/v1/customers \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "email": "test@test.com", "first_name": "John", "last_name": "Smith", "marketing_consent": 0, "external_id": "external_id" }'
Response
{ "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" }, "payment_methods": [ { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" } ], "subscriptions": [ { "id": 1, "customer_id": 1, "customer": {}, "referred_by": 1, "product_id": 1, "product": {}, "quantity": 1, "shipping_address_id": 1, "shipping_address": {}, "shipping_method_id": 1, "shipping_method": {}, "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "billing_address_id": 1, "billing_address": {}, "payment_method_id": 1, "payment_method": {}, "currency_code": "USD", "survey": {}, "preferences": {}, "bundle": {}, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "active": true, "paused": false, "paused_at": null, "skipping_until": null, "waiting_until": null, "past_due": false, "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ {} ], "discounts": [ {} ], "addons": [ {} ], "items": [ {} ], "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "cancelled_at": null, "reactivated_at": null, "switched_at": null, "previous_subscription_id": null, "auto_collecting": true, "metadata": [ {} ], "tags": [ "tags" ], "tags_meta": [], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ { "id": 12, "value": "VIP" } ], "notes": [ { "id": 91, "customer_id": 8435732, "note": "Called about the missing box.", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addresses": [ { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z" }

Get customer by ID

GET /customers/{customer_id}

A detailed description of the customer.

Path parameters

customer_idRequiredinteger

Customer ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

ReturnsCustomer

Customer object response

Error responses

404object

The customer does not exist or belongs to another shop.

curl https://api.subbly.co/private/v1/customers/{customer_id} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" }, "payment_methods": [ { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" } ], "subscriptions": [ { "id": 1, "customer_id": 1, "customer": {}, "referred_by": 1, "product_id": 1, "product": {}, "quantity": 1, "shipping_address_id": 1, "shipping_address": {}, "shipping_method_id": 1, "shipping_method": {}, "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "billing_address_id": 1, "billing_address": {}, "payment_method_id": 1, "payment_method": {}, "currency_code": "USD", "survey": {}, "preferences": {}, "bundle": {}, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "active": true, "paused": false, "paused_at": null, "skipping_until": null, "waiting_until": null, "past_due": false, "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ {} ], "discounts": [ {} ], "addons": [ {} ], "items": [ {} ], "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "cancelled_at": null, "reactivated_at": null, "switched_at": null, "previous_subscription_id": null, "auto_collecting": true, "metadata": [ {} ], "tags": [ "tags" ], "tags_meta": [], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ { "id": 12, "value": "VIP" } ], "notes": [ { "id": 91, "customer_id": 8435732, "note": "Called about the missing box.", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addresses": [ { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z" }

Update a customer

PATCH /customers/{customer_id}

Partially update a customer. Only the keys present in the body are applied, every other field is left untouched. marketing_consent and tos_consent are grant-only - once either is granted, sending it again (with any value) is rejected with a validation error - and default_payment_method_id must reference a payment method of this customer.

Path parameters

customer_idRequiredinteger

Customer ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

Request body

marketing_consentoptionalinteger

Marketing opt-in, grant-only. Send 1 or 0 (JSON true is coerced to 1; false is rejected). 1 records the opt-in. Once it is granted the field can no longer be sent at all - any further marketing_consent in the body, 1 or 0, is rejected with a validation error (422). While it is still ungranted, 0 stores an explicit refusal (marketing_consent: false). It is independent of tos_consent; neither one requires the other.

Possible values: 0, 1.

tos_consentoptionalinteger

Terms-of-service consent, grant-only. Send 1 or 0, not true/false. 1 requires tos_consent_at and stores that date as the consent date. Once tos_consent_at is set the field can no longer be sent at all - any further tos_consent in the body, 1 or 0, is rejected with a validation error (422), so an existing consent date is never overwritten and consent cannot be withdrawn. While it is still unset, 0 is accepted and does nothing.

Possible values: 0, 1.

tos_consent_atoptionalstring

The date and time the customer accepted the terms of service. Required when tos_consent is 1 and not accepted otherwise. Any parsable date is accepted and the value is normalised to UTC before it is stored.

Format: date-time.

default_payment_method_idoptionalinteger | null

Must be a payment method belonging to this customer. null clears the default.

tagsoptionalobject

Tag changes to apply to the customer.

metadataoptionalMetadataUpdate

Customer metadata.

ReturnsCustomer

Customer object response

Error responses

404object

The customer does not exist or belongs to another shop.

422object

Validation failed, for example a default_payment_method_id that is not a payment method of this customer, a tags.delete ID that is not a tag of this shop, a duplicated tags.create value, or an invalid metadata entry.

curl -X PATCH https://api.subbly.co/private/v1/customers/{customer_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "marketing_consent": 0, "tos_consent": 0, "tos_consent_at": "2026-08-01T10:00:00Z", "default_payment_method_id": 1, "tags": { "create": [ { "value": "VIP" } ], "delete": [ { "id": 1 } ] }, "metadata": [ { "id": 1, "values": [ { "id": 10 } ] }, { "id": 2, "values": [ { "value": "Leave at the door" } ] } ] }'
Response
{ "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" }, "payment_methods": [ { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" } ], "subscriptions": [ { "id": 1, "customer_id": 1, "customer": {}, "referred_by": 1, "product_id": 1, "product": {}, "quantity": 1, "shipping_address_id": 1, "shipping_address": {}, "shipping_method_id": 1, "shipping_method": {}, "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "billing_address_id": 1, "billing_address": {}, "payment_method_id": 1, "payment_method": {}, "currency_code": "USD", "survey": {}, "preferences": {}, "bundle": {}, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "active": true, "paused": false, "paused_at": null, "skipping_until": null, "waiting_until": null, "past_due": false, "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ {} ], "discounts": [ {} ], "addons": [ {} ], "items": [ {} ], "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "cancelled_at": null, "reactivated_at": null, "switched_at": null, "previous_subscription_id": null, "auto_collecting": true, "metadata": [ {} ], "tags": [ "tags" ], "tags_meta": [], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ { "id": 12, "value": "VIP" } ], "notes": [ { "id": 91, "customer_id": 8435732, "note": "Called about the missing box.", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addresses": [ { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z" }

Delete a customer

DELETE /customers/{customer_id}

Permanently delete the customer and return its last state. Abandoned cart tracking for the email is cleared, and the underlying user account is deleted as well when this was their only customer record and they are not a merchant, which also removes the account's addresses and pickup info. Stored payment methods and store credit balance rows are left untouched. The endpoint is only available while GDPR handling is enabled for the shop.

Path parameters

customer_idRequiredinteger

Customer ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

ReturnsCustomer

The deleted customer object, serialised as it was just before deletion.

Error responses

400object

GDPR handling is disabled for the shop.

404object

The customer does not exist or belongs to another shop.

curl -X DELETE https://api.subbly.co/private/v1/customers/{customer_id} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" }, "payment_methods": [ { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" } ], "subscriptions": [ { "id": 1, "customer_id": 1, "customer": {}, "referred_by": 1, "product_id": 1, "product": {}, "quantity": 1, "shipping_address_id": 1, "shipping_address": {}, "shipping_method_id": 1, "shipping_method": {}, "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "billing_address_id": 1, "billing_address": {}, "payment_method_id": 1, "payment_method": {}, "currency_code": "USD", "survey": {}, "preferences": {}, "bundle": {}, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "active": true, "paused": false, "paused_at": null, "skipping_until": null, "waiting_until": null, "past_due": false, "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ {} ], "discounts": [ {} ], "addons": [ {} ], "items": [ {} ], "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "cancelled_at": null, "reactivated_at": null, "switched_at": null, "previous_subscription_id": null, "auto_collecting": true, "metadata": [ {} ], "tags": [ "tags" ], "tags_meta": [], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ { "id": 12, "value": "VIP" } ], "notes": [ { "id": 91, "customer_id": 8435732, "note": "Called about the missing box.", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addresses": [ { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z" }

Change a customer's store credit balance

POST /customers/{customer_id}/balance

Add or remove store credit and return the customer with the updated balance. amount is signed: positive credits the balance, negative debits it. A debit that would take the balance below 0 is rejected with insufficient_balance and nothing changes. Every change is recorded in the customer's balance history and flagged as made by the shop owner.

Path parameters

customer_idRequiredinteger

Customer ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

Request body

amountRequiredinteger

Signed change to the customer's store credit balance, in minor units. Positive credits, negative debits, 0 is rejected.

ReturnsCustomer

Customer object response, with the updated balance

Error responses

400object

The debit is larger than the customer's current balance, or the customer has no balance yet. Nothing is changed.

404object

The customer does not exist or belongs to another shop.

422object

Validation failed, for example amount is missing, is not an integer, is 0, or is outside -9999999 to 9999999.

curl -X POST https://api.subbly.co/private/v1/customers/{customer_id}/balance \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "amount": -500 }'
Response
{ "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" }, "payment_methods": [ { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" } ], "subscriptions": [ { "id": 1, "customer_id": 1, "customer": {}, "referred_by": 1, "product_id": 1, "product": {}, "quantity": 1, "shipping_address_id": 1, "shipping_address": {}, "shipping_method_id": 1, "shipping_method": {}, "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "billing_address_id": 1, "billing_address": {}, "payment_method_id": 1, "payment_method": {}, "currency_code": "USD", "survey": {}, "preferences": {}, "bundle": {}, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "active": true, "paused": false, "paused_at": null, "skipping_until": null, "waiting_until": null, "past_due": false, "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ {} ], "discounts": [ {} ], "addons": [ {} ], "items": [ {} ], "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "cancelled_at": null, "reactivated_at": null, "switched_at": null, "previous_subscription_id": null, "auto_collecting": true, "metadata": [ {} ], "tags": [ "tags" ], "tags_meta": [], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ { "id": 12, "value": "VIP" } ], "notes": [ { "id": 91, "customer_id": 8435732, "note": "Called about the missing box.", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addresses": [ { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z" }

Create a customer note

POST /customers/{customer_id}/notes

Add an internal note to the customer. Notes are only visible through the private API. Returns the customer object with notes expanded, plus any expand[] requested.

Path parameters

customer_idRequiredinteger

Customer ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

Request body

noteRequiredstring

Note body.

ReturnsCustomer

The customer object with notes included.

Error responses

404object

The customer does not exist or belongs to another shop.

422object

Validation failed, for example note is missing or longer than 65535 characters.

curl -X POST https://api.subbly.co/private/v1/customers/{customer_id}/notes \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "note": "Called about the missing box." }'
Response
{ "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" }, "payment_methods": [ { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" } ], "subscriptions": [ { "id": 1, "customer_id": 1, "customer": {}, "referred_by": 1, "product_id": 1, "product": {}, "quantity": 1, "shipping_address_id": 1, "shipping_address": {}, "shipping_method_id": 1, "shipping_method": {}, "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "billing_address_id": 1, "billing_address": {}, "payment_method_id": 1, "payment_method": {}, "currency_code": "USD", "survey": {}, "preferences": {}, "bundle": {}, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "active": true, "paused": false, "paused_at": null, "skipping_until": null, "waiting_until": null, "past_due": false, "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ {} ], "discounts": [ {} ], "addons": [ {} ], "items": [ {} ], "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "cancelled_at": null, "reactivated_at": null, "switched_at": null, "previous_subscription_id": null, "auto_collecting": true, "metadata": [ {} ], "tags": [ "tags" ], "tags_meta": [], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ { "id": 12, "value": "VIP" } ], "notes": [ { "id": 91, "customer_id": 8435732, "note": "Called about the missing box.", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addresses": [ { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z" }

Update a customer note

PATCH /customers/{customer_id}/notes/{note_id}

Replace the body of a note. The note must belong to the customer in the path. Returns the customer object with notes expanded, plus any expand[] requested.

Path parameters

customer_idRequiredinteger

Customer ID

Format: integer.

note_idRequiredinteger

Note ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

Request body

noteRequiredstring

Note body.

ReturnsCustomer

The customer object with notes included.

Error responses

404object

The customer or the note does not exist, the customer belongs to another shop, or the note belongs to another customer.

422object

Validation failed, for example note is missing or longer than 65535 characters.

curl -X PATCH https://api.subbly.co/private/v1/customers/{customer_id}/notes/{note_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "note": "note" }'
Response
{ "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" }, "payment_methods": [ { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" } ], "subscriptions": [ { "id": 1, "customer_id": 1, "customer": {}, "referred_by": 1, "product_id": 1, "product": {}, "quantity": 1, "shipping_address_id": 1, "shipping_address": {}, "shipping_method_id": 1, "shipping_method": {}, "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "billing_address_id": 1, "billing_address": {}, "payment_method_id": 1, "payment_method": {}, "currency_code": "USD", "survey": {}, "preferences": {}, "bundle": {}, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "active": true, "paused": false, "paused_at": null, "skipping_until": null, "waiting_until": null, "past_due": false, "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ {} ], "discounts": [ {} ], "addons": [ {} ], "items": [ {} ], "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "cancelled_at": null, "reactivated_at": null, "switched_at": null, "previous_subscription_id": null, "auto_collecting": true, "metadata": [ {} ], "tags": [ "tags" ], "tags_meta": [], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ { "id": 12, "value": "VIP" } ], "notes": [ { "id": 91, "customer_id": 8435732, "note": "Called about the missing box.", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addresses": [ { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z" }

Delete a customer note

DELETE /customers/{customer_id}/notes/{note_id}

Permanently delete a note and return the customer it belonged to, with notes expanded (null once the last note is gone) plus any expand[] requested. The note must belong to the customer in the path.

Path parameters

customer_idRequiredinteger

Customer ID

Format: integer.

note_idRequiredinteger

Note ID

Format: integer.

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

ReturnsCustomer

The customer object with notes included.

Error responses

404object

The customer or the note does not exist, the customer belongs to another shop, or the note belongs to another customer.

curl -X DELETE https://api.subbly.co/private/v1/customers/{customer_id}/notes/{note_id} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 8435732, "user_id": 5512, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "external_id": "crm-8842", "default_payment_method_id": 1, "default_payment_method": { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" }, "payment_methods": [ { "id": 567, "type": "card", "identifier": "4242", "currencies": [ "USD", "EUR" ], "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last4": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z" } ], "subscriptions": [ { "id": 1, "customer_id": 1, "customer": {}, "referred_by": 1, "product_id": 1, "product": {}, "quantity": 1, "shipping_address_id": 1, "shipping_address": {}, "shipping_method_id": 1, "shipping_method": {}, "shipping_carrier_id": 1, "shipping_carrier_service": "shipping_carrier_service", "billing_address_id": 1, "billing_address": {}, "payment_method_id": 1, "payment_method": {}, "currency_code": "USD", "survey": {}, "preferences": {}, "bundle": {}, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "active": true, "paused": false, "paused_at": null, "skipping_until": null, "waiting_until": null, "past_due": false, "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ {} ], "discounts": [ {} ], "addons": [ {} ], "items": [ {} ], "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "cancelled_at": null, "reactivated_at": null, "switched_at": null, "previous_subscription_id": null, "auto_collecting": true, "metadata": [ {} ], "tags": [ "tags" ], "tags_meta": [], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "past_due_invoice_count": 0, "balance": 1500, "tags": [ "VIP" ], "tags_meta": [ { "id": 12, "value": "VIP" } ], "notes": [ { "id": 91, "customer_id": 8435732, "note": "Called about the missing box.", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addresses": [ { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z" }
valueRequiredinteger
operatorRequiredstring

Possible values: gt, gte, lt, lte, eq, neq.

paginationobject
dataCustomer[]
idinteger
user_idinteger | null

ID of the user account behind this customer. The same user account can back a customer record in several shops.

first_namestring | null
last_namestring | null
emailstring

Format: email.

marketing_consentboolean | null
tos_consent_atstring | null

Format: date-time.

external_idstring | null

Your own identifier for this customer.

default_payment_method_idinteger | null
default_payment_methodPaymentMethod | null

Expandable link to the customer's default payment method

payment_methodsPaymentMethod[] | null

Expandable link to all customer's payment methods; null when not expanded or when the customer has none

subscriptionsSubscription[] | null

Expandable link to all customer's subscriptions; null when not expanded or when the customer has none

past_due_invoice_countinteger

Always present; does not need to be requested via expand.

balanceinteger

The customer's store credit balance, in minor units. Always present; does not need to be requested via expand.

tagsstring[]

Names of the tags attached to the customer. Always present; does not need to be requested via expand.

tags_metaTags

Tags with their IDs. Always present; does not need to be requested via expand.

notesNote[] | null

Expandable list of the customer's internal notes; null when not expanded or when the customer has none

addressesAddress[] | null

Expandable list of the customer's delivery addresses; null when not expanded or when the customer has none

metadataEntityMetadata[] | null

Customer metadata attributes. Always present; does not need to be requested via expand.

created_atstring | null

Format: date-time.

idinteger
user_idinteger | null

ID of the user account behind this customer. The same user account can back a customer record in several shops.

first_namestring | null
last_namestring | null
emailstring

Format: email.

marketing_consentboolean | null
tos_consent_atstring | null

Format: date-time.

external_idstring | null

Your own identifier for this customer.

default_payment_method_idinteger | null
default_payment_methodPaymentMethod | null

Expandable link to the customer's default payment method

payment_methodsPaymentMethod[] | null

Expandable link to all customer's payment methods; null when not expanded or when the customer has none

subscriptionsSubscription[] | null

Expandable link to all customer's subscriptions; null when not expanded or when the customer has none

past_due_invoice_countinteger

Always present; does not need to be requested via expand.

balanceinteger

The customer's store credit balance, in minor units. Always present; does not need to be requested via expand.

tagsstring[]

Names of the tags attached to the customer. Always present; does not need to be requested via expand.

tags_metaTags

Tags with their IDs. Always present; does not need to be requested via expand.

notesNote[] | null

Expandable list of the customer's internal notes; null when not expanded or when the customer has none

addressesAddress[] | null

Expandable list of the customer's delivery addresses; null when not expanded or when the customer has none

metadataEntityMetadata[] | null

Customer metadata attributes. Always present; does not need to be requested via expand.

created_atstring | null

Format: date-time.

createoptionalobject[]

Tag names to attach. A tag of this shop with that name is reused, otherwise a new one is created. Values must be distinct within the request, and tags the customer already carries are skipped.

deleteoptionalobject[]

Tags to detach. Each ID must be a tag of this shop.

idRequiredinteger

Metadata ID. Must be a metadata field of this shop.

valuesRequiredobject[]

Values of the field. Replaces all current values of the field. Only one value is allowed unless the field accepts multiple values.

idinteger
user_idinteger | null

ID of the user account behind this customer. The same user account can back a customer record in several shops.

first_namestring | null
last_namestring | null
emailstring

Format: email.

marketing_consentboolean | null
tos_consent_atstring | null

Format: date-time.

external_idstring | null

Your own identifier for this customer.

default_payment_method_idinteger | null
default_payment_methodPaymentMethod | null

Expandable link to the customer's default payment method

payment_methodsPaymentMethod[] | null

Expandable link to all customer's payment methods; null when not expanded or when the customer has none

subscriptionsSubscription[] | null

Expandable link to all customer's subscriptions; null when not expanded or when the customer has none

past_due_invoice_countinteger

Always present; does not need to be requested via expand.

balanceinteger

The customer's store credit balance, in minor units. Always present; does not need to be requested via expand.

tagsstring[]

Names of the tags attached to the customer. Always present; does not need to be requested via expand.

tags_metaTags

Tags with their IDs. Always present; does not need to be requested via expand.

notesNote[] | null

Expandable list of the customer's internal notes; null when not expanded or when the customer has none

addressesAddress[] | null

Expandable list of the customer's delivery addresses; null when not expanded or when the customer has none

metadataEntityMetadata[] | null

Customer metadata attributes. Always present; does not need to be requested via expand.

created_atstring | null

Format: date-time.

idinteger
user_idinteger | null

ID of the user account behind this customer. The same user account can back a customer record in several shops.

first_namestring | null
last_namestring | null
emailstring

Format: email.

marketing_consentboolean | null
tos_consent_atstring | null

Format: date-time.

external_idstring | null

Your own identifier for this customer.

default_payment_method_idinteger | null
default_payment_methodPaymentMethod | null

Expandable link to the customer's default payment method

payment_methodsPaymentMethod[] | null

Expandable link to all customer's payment methods; null when not expanded or when the customer has none

subscriptionsSubscription[] | null

Expandable link to all customer's subscriptions; null when not expanded or when the customer has none

past_due_invoice_countinteger

Always present; does not need to be requested via expand.

balanceinteger

The customer's store credit balance, in minor units. Always present; does not need to be requested via expand.

tagsstring[]

Names of the tags attached to the customer. Always present; does not need to be requested via expand.

tags_metaTags

Tags with their IDs. Always present; does not need to be requested via expand.

notesNote[] | null

Expandable list of the customer's internal notes; null when not expanded or when the customer has none

addressesAddress[] | null

Expandable list of the customer's delivery addresses; null when not expanded or when the customer has none

metadataEntityMetadata[] | null

Customer metadata attributes. Always present; does not need to be requested via expand.

created_atstring | null

Format: date-time.

idinteger
user_idinteger | null

ID of the user account behind this customer. The same user account can back a customer record in several shops.

first_namestring | null
last_namestring | null
emailstring

Format: email.

marketing_consentboolean | null
tos_consent_atstring | null

Format: date-time.

external_idstring | null

Your own identifier for this customer.

default_payment_method_idinteger | null
default_payment_methodPaymentMethod | null

Expandable link to the customer's default payment method

payment_methodsPaymentMethod[] | null

Expandable link to all customer's payment methods; null when not expanded or when the customer has none

subscriptionsSubscription[] | null

Expandable link to all customer's subscriptions; null when not expanded or when the customer has none

past_due_invoice_countinteger

Always present; does not need to be requested via expand.

balanceinteger

The customer's store credit balance, in minor units. Always present; does not need to be requested via expand.

tagsstring[]

Names of the tags attached to the customer. Always present; does not need to be requested via expand.

tags_metaTags

Tags with their IDs. Always present; does not need to be requested via expand.

notesNote[] | null

Expandable list of the customer's internal notes; null when not expanded or when the customer has none

addressesAddress[] | null

Expandable list of the customer's delivery addresses; null when not expanded or when the customer has none

metadataEntityMetadata[] | null

Customer metadata attributes. Always present; does not need to be requested via expand.

created_atstring | null

Format: date-time.

idinteger
user_idinteger | null

ID of the user account behind this customer. The same user account can back a customer record in several shops.

first_namestring | null
last_namestring | null
emailstring

Format: email.

marketing_consentboolean | null
tos_consent_atstring | null

Format: date-time.

external_idstring | null

Your own identifier for this customer.

default_payment_method_idinteger | null
default_payment_methodPaymentMethod | null

Expandable link to the customer's default payment method

payment_methodsPaymentMethod[] | null

Expandable link to all customer's payment methods; null when not expanded or when the customer has none

subscriptionsSubscription[] | null

Expandable link to all customer's subscriptions; null when not expanded or when the customer has none

past_due_invoice_countinteger

Always present; does not need to be requested via expand.

balanceinteger

The customer's store credit balance, in minor units. Always present; does not need to be requested via expand.

tagsstring[]

Names of the tags attached to the customer. Always present; does not need to be requested via expand.

tags_metaTags

Tags with their IDs. Always present; does not need to be requested via expand.

notesNote[] | null

Expandable list of the customer's internal notes; null when not expanded or when the customer has none

addressesAddress[] | null

Expandable list of the customer's delivery addresses; null when not expanded or when the customer has none

metadataEntityMetadata[] | null

Customer metadata attributes. Always present; does not need to be requested via expand.

created_atstring | null

Format: date-time.

idinteger
user_idinteger | null

ID of the user account behind this customer. The same user account can back a customer record in several shops.

first_namestring | null
last_namestring | null
emailstring

Format: email.

marketing_consentboolean | null
tos_consent_atstring | null

Format: date-time.

external_idstring | null

Your own identifier for this customer.

default_payment_method_idinteger | null
default_payment_methodPaymentMethod | null

Expandable link to the customer's default payment method

payment_methodsPaymentMethod[] | null

Expandable link to all customer's payment methods; null when not expanded or when the customer has none

subscriptionsSubscription[] | null

Expandable link to all customer's subscriptions; null when not expanded or when the customer has none

past_due_invoice_countinteger

Always present; does not need to be requested via expand.

balanceinteger

The customer's store credit balance, in minor units. Always present; does not need to be requested via expand.

tagsstring[]

Names of the tags attached to the customer. Always present; does not need to be requested via expand.

tags_metaTags

Tags with their IDs. Always present; does not need to be requested via expand.

notesNote[] | null

Expandable list of the customer's internal notes; null when not expanded or when the customer has none

addressesAddress[] | null

Expandable list of the customer's delivery addresses; null when not expanded or when the customer has none

metadataEntityMetadata[] | null

Customer metadata attributes. Always present; does not need to be requested via expand.

created_atstring | null

Format: date-time.

idinteger
user_idinteger | null

ID of the user account behind this customer. The same user account can back a customer record in several shops.

first_namestring | null
last_namestring | null
emailstring

Format: email.

marketing_consentboolean | null
tos_consent_atstring | null

Format: date-time.

external_idstring | null

Your own identifier for this customer.

default_payment_method_idinteger | null
default_payment_methodPaymentMethod | null

Expandable link to the customer's default payment method

payment_methodsPaymentMethod[] | null

Expandable link to all customer's payment methods; null when not expanded or when the customer has none

subscriptionsSubscription[] | null

Expandable link to all customer's subscriptions; null when not expanded or when the customer has none

past_due_invoice_countinteger

Always present; does not need to be requested via expand.

balanceinteger

The customer's store credit balance, in minor units. Always present; does not need to be requested via expand.

tagsstring[]

Names of the tags attached to the customer. Always present; does not need to be requested via expand.

tags_metaTags

Tags with their IDs. Always present; does not need to be requested via expand.

notesNote[] | null

Expandable list of the customer's internal notes; null when not expanded or when the customer has none

addressesAddress[] | null

Expandable list of the customer's delivery addresses; null when not expanded or when the customer has none

metadataEntityMetadata[] | null

Customer metadata attributes. Always present; does not need to be requested via expand.

created_atstring | null

Format: date-time.