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

Address

Storefront Address API endpoints

Endpoints
  • GET/addresses
  • POST/addresses
  • PATCH/addresses/{address_id}
  • DELETE/addresses/{address_id}

Get list of address

GET /addresses

An API endpoint to get list of customer addresses.

ReturnsAddress[]

Address object response

curl https://api.subbly.co/storefront/v1/addresses \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
[ { "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" } ]

Store address

POST /addresses

An API endpoint to store customer address.

Request body

Store address body

first_nameRequiredstring
last_nameRequiredstring
phoneoptionalstring | null

Required unless the shop has optional phone numbers enabled. Must be a valid international phone number.

company_nameoptionalstring | null
address_oneRequiredstring
address_twooptionalstring | null
cityRequiredstring
zipRequiredstring
regionoptionalstring

Applicable if country doesn't have regions. If empty will be lookedup by country and zip

region_idoptionalinteger

Applicable if country has regions. If empty will be lookedup by country and zip

country_idRequiredinteger

ReturnsAddress

Address object response

curl -X POST https://api.subbly.co/storefront/v1/addresses \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "first_name": "first_name", "last_name": "last_name", "phone": "phone", "company_name": "company_name", "address_one": "address_one", "address_two": "address_two", "city": "city", "zip": "zip", "region": "region", "region_id": 1, "country_id": 1 }'
Response
{ "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" }

Update address

PATCH /addresses/{address_id}

An API endpoint to update a customer address. All required fields have to be sent again, but optional fields (company_name, address_two, and phone when the shop makes it optional) are merged: leaving one out keeps its current value, and sending it as an explicit null clears it.

Path parameters

address_idRequiredinteger

Address ID

Request body

Update address body. Every field is validated exactly as on create, so the required fields must be sent again even though the method is PATCH.

first_nameRequiredstring
last_nameRequiredstring
phoneoptionalstring | null

Required unless the shop has optional phone numbers enabled. Must be a valid international phone number. Left out, the current value is kept; sent as an explicit null, it is cleared.

company_nameoptionalstring | null

Left out, the current value is kept; sent as an explicit null, it is cleared.

address_oneRequiredstring
address_twooptionalstring | null

Left out, the current value is kept; sent as an explicit null, it is cleared.

cityRequiredstring
zipRequiredstring
regionoptionalstring

Applicable if country doesn't have regions. If empty will be lookedup by country and zip

region_idoptionalinteger

Applicable if country has regions. If empty will be lookedup by country and zip

country_idRequiredinteger

ReturnsAddress

Address object response

curl -X PATCH https://api.subbly.co/storefront/v1/addresses/{address_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "first_name": "first_name", "last_name": "last_name", "phone": "phone", "company_name": "company_name", "address_one": "address_one", "address_two": "address_two", "city": "city", "zip": "zip", "region": "region", "region_id": 1, "country_id": 1 }'
Response
{ "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" }

Delete address

DELETE /addresses/{address_id}

An API endpoint to delete a customer address.

Path parameters

address_idRequiredinteger

Address ID

Returns

No content

Error responses

403any

The address does not exist or does not belong to the customer.

422any

The address is in use: it is the shipping or billing address of a subscription, or the shipping address of an order awaiting delivery or a future shipment.

curl -X DELETE https://api.subbly.co/storefront/v1/addresses/{address_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
idinteger
first_namestring
last_namestring
country_idinteger | null
region_idinteger | null
countrystring
regionstring | null
phonestring | null
company_namestring | null
address_onestring
address_twostring | null
citystring
zipstring
idinteger
first_namestring
last_namestring
country_idinteger | null
region_idinteger | null
countrystring
regionstring | null
phonestring | null
company_namestring | null
address_onestring
address_twostring | null
citystring
zipstring
idinteger
first_namestring
last_namestring
country_idinteger | null
region_idinteger | null
countrystring
regionstring | null
phonestring | null
company_namestring | null
address_onestring
address_twostring | null
citystring
zipstring