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 cancellationUndo a scheduled cancellationRequest a cancellationWithdraw a cancellation requestSkip upcoming renewalsPause the subscriptionResume the subscriptionProlong an active skipReactivate the subscriptionUpdate shipping address and methodUpdate subscription payment methodGet shipping methodsGet local pickupsList upcoming billing datesList allowed skipping datesList allowed resume datesChange the plans of the subscription's itemsList the plans the subscription can move toCreate 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 item
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

Auth

Storefront Auth API endpoints

Endpoints
  • POST/auth/login
  • POST/auth/otp/login
  • POST/auth/otp
  • POST/auth/social
  • POST/auth/registered
  • POST/auth/register

Login

POST /auth/login

An API call to login customer.

Request body

emailRequiredstring
passwordRequiredstring

ReturnsAccessToken

Access token object response

Error responses

422object

email is missing or not a valid email, password is missing, or the email and password do not match an account ('These credentials do not match our records.' on email).

curl -X POST https://api.subbly.co/storefront/v1/auth/login \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "email": "email", "password": "password" }'
Response
{ "access_token": "access_token", "expires_in": 7200 }

Otp Login

POST /auth/otp/login

An API call to login customer by otp.

Request body

emailRequiredstring

Format: email.

tokenRequiredstring

ReturnsAccessToken

Access token object response

Error responses

422object

email is missing or not a valid email, token is missing, or the code is wrong, expired (after 10 minutes) or was requested from another IP address or browser ('These credentials do not match our records.' on email).

curl -X POST https://api.subbly.co/storefront/v1/auth/otp/login \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "email": "customer@example.com", "token": "token" }'
Response
{ "access_token": "access_token", "expires_in": 7200 }

Otp Generate

POST /auth/otp

An API call to generate otp.

Request body

emailRequiredstring

Format: email.

Returnsstring

Returns 200 with an empty body. An email with no account gets the same response, and no OTP is sent.

Error responses

422object

email is missing or not a valid email.

429object

More than 10 codes were requested in one hour from the same IP address and browser.

curl -X POST https://api.subbly.co/storefront/v1/auth/otp \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "email": "customer@example.com" }'
Response
""

Social Login

POST /auth/social

An API call to login customer by social.

Request body

tokenRequiredstring
providerRequiredstring

Possible values: google, facebook.

ReturnsAccessToken

Access token object response

Error responses

401object

The provider rejects the token, or no account uses the email the provider returns.

422object

token is missing or not a string, or provider is missing or not google or facebook.

curl -X POST https://api.subbly.co/storefront/v1/auth/social \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "token": "token", "provider": "google" }'
Response
{ "access_token": "access_token", "expires_in": 7200 }

Registered

POST /auth/registered

The API call to check if email already exists.

Request body

emailRequiredstring

ReturnsRegistered

Registered object response

registeredboolean

Error responses

400object

The request carries a valid customer token. Only guests can call this endpoint.

422object

email is missing or not a valid email.

curl -X POST https://api.subbly.co/storefront/v1/auth/registered \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "email": "email" }'
Response
{ "registered": false }

Register

POST /auth/register

An API call to register customer.

Request body

emailRequiredstring
first_nameRequiredstring
last_nameRequiredstring
passwordoptionalstring

The password the customer chose. Without it, the customer gets a generated password by email.

ReturnsAccessToken

Access token object response

Error responses

422object

email is missing, is not a valid email, or already belongs to an account ('The email has already been taken.'), first_name or last_name is missing or not a string, or password is not a string or is shorter than 8 characters.

429object

The registration rate limit is reached: 5 per day from one IP address and browser when the shop has a live gateway, else 10 per day for the shop.

curl -X POST https://api.subbly.co/storefront/v1/auth/register \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "email": "email", "first_name": "first_name", "last_name": "last_name", "password": "password" }'
Response
{ "access_token": "access_token", "expires_in": 7200 }
access_tokenstring
expires_ininteger
access_tokenstring
expires_ininteger
access_tokenstring
expires_ininteger
access_tokenstring
expires_ininteger