SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Storefront API reference
Docs
Information
    Base URLAuthenticationPaginationErrors
Bootstrap
    Get shop info and settings
Product
    Get list of productsGet product by IDGet variant or pricing by IDGet plan by ID
Bundle
    Get list of bundlesGet bundle by IDQuote bundleGet list of bundle group itemsGet list of bundle itemsGet the list of bundle items associated with multiple bundles
Survey
    Get survey by ID
Cart
    Init cartGet cart by IDUpdate cart by IDGet cart gifting datesGet cart start datesGet shipping methodsGet local pickupsValidate the cartAttach the customer to the cart
Cart Item
    Add cart itemUpdate cart itemDelete cart item
Checkout
    Make purchase from the cart
Auth
    LoginOtp LoginOtp GenerateSocial LoginRegisteredRegister
Customer
    Get the current customerGet the current customer referral infoUpdate customer
Address
    Get list of addressStore addressUpdate addressDelete address
Pickup Info
    Get list of pickup infosStore pickup infoUpdate pickup infoDelete pickup info
Wallet
    Store payment methodGet list of payment methodsStore payment methodDelete payment methodSet default payment method
Subscription
    Get list of subscriptionsShow subscriptionUpdate subscriptionUpdate subscription survey preferences by Subscription IDUpdate subscription bundle data by Subscription IDCancel a subscriptionUndo cancellationUpdate subscription payment methodGet shipping methodsGet local pickupsCreate a subscription itemShow a subscription itemUpdate a subscription itemRemove a subscription itemUpdate a subscription item's preferencesUpdate a subscription item's bundle
Order
    Get list of ordersGet order by ID
Invoice
    Get list of invoicesGet invoice by ID
Payment Intent
    Confirm payment intentGet payment intent by ID
Funnels
    Get the current pre purchase funnel step by IDRefresh the funnel progressAccept the pre purchase funnel stepReject the pre purchase funnel stepGet the current mid purchase funnel step by IDRefresh the funnel progressAccept the mid purchase funnel stepReject the mid purchase funnel step
Countries
    Get list of countries
Out Of Stock
    Subscribe to the out of stock
Cancellation
    Get shop cancellation reasons
Metafield
    Get shop's metafields
Product Collection
    Get list of product collectionsGet product collection by IDGet list of collection groups with items
Lead
    Store the shop lead

Customer

Storefront Customer API endpoints

Endpoints
  • GET/customers/me
  • GET/customers/referral
  • PATCH/customers

Get the current customer

GET /customers/me

An API call to get the customer.

ReturnsCustomer

Customer object response

Error responses

404object

The customer does not exists for the given user. Please create a customer first.

curl https://api.subbly.co/storefront/v1/customers/me \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00" }

Get the current customer referral info

GET /customers/referral

An API call to get the customer referral info.

ReturnsCustomerReferral

Customer referral object response

referral_linkstring

Error responses

404object

The customer does not exists for the given user. Please create a customer first.

curl https://api.subbly.co/storefront/v1/customers/referral \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "referral_link": "https://www.subbly.com/?r=123456&s=1" }

Update customer

PATCH /customers

An api call to update customer.

Request body

Store customer

marketing_consentoptionalboolean
tos_consentoptionalboolean
external_idoptionalstring | null

ReturnsCustomer

Customer object response

curl -X PATCH https://api.subbly.co/storefront/v1/customers \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "marketing_consent": true, "tos_consent": true, "external_id": "external_id" }'
Response
{ "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01 00:00:00", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00" }
idinteger
first_namestring
last_namestring
emailstring

Format: email.

marketing_consentboolean
tos_consent_atstring | null

Format: date-time.

active_subscriptions_countinteger
external_idstring | null
metadataEntityMetadata[] | null

Customer metadata attributes

created_atstring

Format: date-time.

idinteger
first_namestring
last_namestring
emailstring

Format: email.

marketing_consentboolean
tos_consent_atstring | null

Format: date-time.

active_subscriptions_countinteger
external_idstring | null
metadataEntityMetadata[] | null

Customer metadata attributes

created_atstring

Format: date-time.