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 customerCredit a customer's store credit balanceCreate a customer noteUpdate a customer noteDelete a customer noteCreate a customer addressUpdate a customer addressDelete a customer addressGet list of customer pickup infoCreate customer pickup infoUpdate customer pickup infoDelete customer pickup infoCreate a customer payment methodDelete a customer payment method
Subscription
    Get list of subscriptionsCreate a subscriptionGet subscription by IDCancel a subscriptionUndo cancellationCreate a subscription itemShow a subscription itemUpdate a subscription itemRemove a subscription itemUpdate a subscription item's preferencesUpdate a subscription item's bundleApply 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
    Get payment method by ID
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

Survey

Private Survey API endpoints

Endpoints
  • GET/surveys/{survey_id}
  • GET/surveys

Get survey by ID

GET /surveys/{survey_id}

Get a specific survey by ID. Questions, their answers, and each answer's stock_count are always included, so the expand parameter is not required and does not change the response.

Path parameters

survey_idRequiredinteger

Survey ID

Query parameters

expand[]optionalstring[]

List of relations to expand in the response.

ReturnsSurvey

Survey object response

curl https://api.subbly.co/private/v1/surveys/{survey_id} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "title": "What is your favorite color?", "questions": [ { "id": 1, "type": "text", "title": "What is your favorite color?", "description": "What is your favorite color?", "min_amount": 1, "max_amount": 10, "min_count": 1, "max_count": 10, "required": true, "position": 1, "answers": [ {} ], "customizations": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "single_step": true, "multiply_price_by_shipment_number": true, "appearance_type": "before_cart", "customizations": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }

Get list of surveys

GET /surveys

Surveys are always returned with their questions, each question's answers, and each answer's stock_count. The expand parameter is not needed for these relations and changes nothing in the response.

Query parameters

expand[]optionalstring[]

List of relations to expand. This endpoint accepts only the exact value questions; nested paths such as questions.answers are rejected with 422 here, although they are accepted on GET /surveys/{survey_id}.

queryoptionalstring

Search query

ReturnsSurvey[]

Surveys list response

curl https://api.subbly.co/private/v1/surveys \ -H 'X-API-KEY: <api-key>'
Response
[ { "id": 1, "title": "What is your favorite color?", "questions": [ { "id": 1, "type": "text", "title": "What is your favorite color?", "description": "What is your favorite color?", "min_amount": 1, "max_amount": 10, "min_count": 1, "max_count": 10, "required": true, "position": 1, "answers": [ {} ], "customizations": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "single_step": true, "multiply_price_by_shipment_number": true, "appearance_type": "before_cart", "customizations": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ]
idinteger
titlestring
questionsSurveyQuestion[]
single_stepboolean
multiply_price_by_shipment_numberboolean
appearance_typestring | null

Possible values: before_cart, after_checkout, subscription_box.

customizationsobject | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
titlestring
questionsSurveyQuestion[]
single_stepboolean
multiply_price_by_shipment_numberboolean
appearance_typestring | null

Possible values: before_cart, after_checkout, subscription_box.

customizationsobject | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.