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

Lead

Storefront Lead API endpoints

Endpoints
  • POST/leads

Store the shop lead

POST /leads

Store the shop lead.

Request body

Store lead body

emailoptionalstring
first_nameoptionalstring
last_nameoptionalstring
metadataoptionalobject

ReturnsLead

Lead object response

Error responses

402object

The merchant account has no payment method, so the shop cannot accept leads (payment_method_required).

422object

email is missing, is not a valid email, is longer than 255 characters, or is already a lead of this shop. first_name or last_name is not a string or is longer than 255 characters. metadata is not an object or has more than 50 keys.

429object

The lead rate limit is reached: 5 requests per hour from one IP address, or 100 per hour or 1000 per day for the shop.

curl -X POST https://api.subbly.co/storefront/v1/leads \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "email": "email", "first_name": "first_name", "last_name": "last_name", "metadata": { "survey_id": 1, "answers": { "id": 1, "content": "red" } } }'
Response
{ "id": 1, "email": "test@test.co", "first_name": "John", "last_name": "Doe", "user_agent": "127.0.0.1", "ip_address": "PostmanRuntime/7.33.0", "metadata": { "survey_id": 1, "answers": { "id": 1, "content": "red" } } }
idinteger
emailstring
first_namestring
last_namestring
user_agentstring
ip_addressstring
metadataLeadMetadata