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 customerChange a customer's store credit balanceCreate a customer noteUpdate a customer noteDelete a customer note
Address
    Create an addressUpdate an addressDelete an address
Pickup Info
    Get list of pickup infoCreate pickup infoUpdate pickup infoDelete pickup info
Subscription
    Get list of subscriptionsCreate a subscriptionGet subscription by IDUpdate a subscriptionCancel a subscriptionUndo cancellationPause a subscriptionResume a subscriptionSkip renewals until a dateReactivate a cancelled or expired subscriptionSwitch the subscription to another plan by starting overChange the plans of the subscription's itemsUpdate a subscription's shipping address and methodUpdate a subscription's payment methodUpdate a subscription's survey preferencesCreate 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 itemApply a discount to a subscription itemRemove a subscription item discountApply 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
    Create a payment methodGet payment method by IDDelete a payment method
Transaction
    Get list of transactionsGet transaction by ID
Cancellation
    Get shop cancellation reasonsAdd a cancellation reasonRename a cancellation reasonDelete a cancellation reason
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 metadataDelete a metafield
Metaobject
    List metaobjectsCreate a metaobjectGet a metaobjectUpdate a metaobjectDelete a metaobjectList the entries of a metaobjectCreate a metaobject entryGet a metaobject entryUpdate a metaobject entryDelete a metaobject entry
Funnel
    Get list of funnelsGet funnel by ID
Option
    Get list of options
Country
    Get list of countries
Currency
    Get list of currencies
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
Custom Tax
    Get list of custom taxesCreate a custom taxGet a custom taxUpdate a custom taxDelete a custom taxPublish a custom taxUnpublish a custom taxGet list of custom tax groupsCreate a custom tax groupGet a custom tax groupUpdate a custom tax groupDelete a custom tax group
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
Webhook
    Get list of webhook endpointsCreate a webhook endpointGet webhook delivery statisticsGet a webhook endpointUpdate a webhook endpointDelete a webhook endpointRotate the signing secretSend a test eventGet webhook deliveriesGet a delivery with its attemptsRetry a delivery manuallyGet the webhook event logGet one event with its deliveries across endpointsGet the catalogue of subscribable event types
Email Unsubscribe
    Unsubscribe an email address from marketing mail
Shipping
    Get list of shipping rulesCreate a shipping ruleGet shipping rule by IDUpdate a shipping ruleDelete a shipping rulePublish a shipping ruleUnpublish a shipping ruleGet list of shipping optionsCreate a shipping optionGet shipping option by IDUpdate a shipping optionDelete a shipping optionPublish a shipping optionUnpublish a shipping optionGet list of local pickupsCreate a local pickupGet local pickup by IDUpdate a local pickupDelete a local pickupPublish a local pickupUnpublish a local pickupGet list of local deliveriesCreate a local deliveryGet local delivery by IDUpdate a local deliveryDelete a local deliveryPublish a local deliveryUnpublish a local deliveryGet list of shipping methodsGet a shipping method
Team Member
    Get list of team membersAdd a team memberGet team member by IDUpdate a team memberRemove a team member
Shop
    Get the shop
Shop Settings
    Update the shop settings
Shop Owner
    Update the shop owner
Gateway
    Get list of gatewaysGet gateway by ID
Referral Program
    Update the referral program
ShopCurrency
    Get the shop currenciesAdd a shop currencyGet a shop currencyUpdate a shop currencyRemove a shop currencyPublish a shop currencyUnpublish a shop currency
StorefrontTranslation
    Get the storefront translationsAdd a storefront translationGet a storefront translationUpdate a storefront translationRemove a storefront translationPublish a storefront translationUnpublish a storefront translationMake a storefront translation primaryGet a storefront translation's textsUpdate a storefront translation's texts
Gift Card
    Get list of gift cardsIssue a gift cardGet gift card by IDUpdate a gift cardCancel a gift card
Metric
    Get list of metricsGet a metric

Metaobject

Private Metaobject API endpoints (metaobjects and entries)

Endpoints
  • GET/metaobjects
  • POST/metaobjects
  • GET/metaobjects/{metaobject_key}
  • PATCH/metaobjects/{metaobject_key}
  • DELETE/metaobjects/{metaobject_key}
  • GET/metaobjects/{metaobject_key}/entries
  • POST/metaobjects/{metaobject_key}/entries
  • GET/metaobjects/{metaobject_key}/entries/{handle}
  • PATCH/metaobjects/{metaobject_key}/entries/{handle}
  • DELETE/metaobjects/{metaobject_key}/entries/{handle}

List metaobjects

GET /metaobjects

Retrieves a paginated list of the shop's metaobjects, each with its live fields in order.

Query parameters

pageoptionalinteger

Page number for pagination

per_pageoptionalinteger

Entities per page

Defaults to 10.

Returnsobject

Successful response

Error responses

422MetaobjectValidationError

page is below 1, or per_page is outside 1 to 100.

curl https://api.subbly.co/private/v1/metaobjects \ -H 'X-API-KEY: <api-key>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 1, "key": "roast", "name": "Roast", "access_level": "storefront", "fields": [ { "key": "process", "label": "Process", "data_type": "single_line_string", "multiple": true, "required": true, "options": [ "washed", "natural" ], "rules": {} } ], "created_at": "2026-11-20T12:51:24.000000Z", "updated_at": "2026-11-20T12:51:24.000000Z" } ] }

Create a metaobject

POST /metaobjects

Creates a metaobject.

Request body

keyRequiredstring

Unique within the shop. Can not change.

nameRequiredstring
access_levelRequiredstring

Possible values: storefront, private.

fieldsRequiredMetaobjectFieldBody[]

ReturnsMetaobject

Metaobject created

Error responses

422MetaobjectValidationError

The body fails validation: key is missing, taken, longer than 64 characters, or not lower-case letters, digits, - and _ that start with a letter; name, access_level or fields is missing or invalid; or a field is invalid (under fields.N.<key>), for example a repeated key, multiple or options on a data type that does not allow them, or an invalid option or rule.

curl -X POST https://api.subbly.co/private/v1/metaobjects \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "key": "roast", "name": "Roast", "access_level": "storefront", "fields": [ { "key": "origin", "label": "Origin", "data_type": "single_line_string", "rules": { "max_length": 60 } }, { "key": "weight", "label": "Weight (g)", "data_type": "integer", "rules": { "min_value": 1 } }, { "key": "notes", "label": "Notes", "data_type": "single_line_string", "multiple": true } ] }'
Response
{ "id": 1, "key": "roast", "name": "Roast", "access_level": "storefront", "fields": [ { "key": "process", "label": "Process", "data_type": "single_line_string", "multiple": true, "required": true, "options": [ "washed", "natural" ], "rules": {} } ], "created_at": "2026-11-20T12:51:24.000000Z", "updated_at": "2026-11-20T12:51:24.000000Z" }

Get a metaobject

GET /metaobjects/{metaobject_key}

Path parameters

metaobject_keyRequiredstring

The key of the metaobject, unique within the shop.

ReturnsMetaobject

Successful response

Error responses

404object

The shop has no metaobject with this key.

curl https://api.subbly.co/private/v1/metaobjects/{metaobject_key} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "key": "roast", "name": "Roast", "access_level": "storefront", "fields": [ { "key": "process", "label": "Process", "data_type": "single_line_string", "multiple": true, "required": true, "options": [ "washed", "natural" ], "rules": {} } ], "created_at": "2026-11-20T12:51:24.000000Z", "updated_at": "2026-11-20T12:51:24.000000Z" }

Update a metaobject

PATCH /metaobjects/{metaobject_key}

Updates a metaobject. Send every field in order; list the fields to remove in delete_fields.

Path parameters

metaobject_keyRequiredstring

The key of the metaobject, unique within the shop.

Request body

nameoptionalstring
access_leveloptionalstring

private returns 422 while a storefront metafield uses the metaobject. Make those metafields private first.

Possible values: storefront, private.

fieldsoptionalMetaobjectFieldBody[]

Every live field, in the new order. A live field left out must be named in delete_fields.

delete_fieldsoptionalstring[]

Keys of live fields to delete. Each must be left out of fields. The key is never used again.

ReturnsMetaobject

Metaobject updated

Error responses

404object

The shop has no metaobject with this key.

422MetaobjectValidationError

The body fails validation for the same reasons as on create, or key is sent, fields is empty, a field changes its data type or uses the key of a deleted field, fields leaves out a field that delete_fields does not name, or a delete_fields key is unknown.

curl -X PATCH https://api.subbly.co/private/v1/metaobjects/{metaobject_key} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "Coffee roast", "fields": [ { "key": "origin", "label": "Origin", "data_type": "single_line_string", "rules": { "max_length": 80 } }, { "key": "weight", "label": "Weight (g)", "data_type": "integer", "rules": { "min_value": 1 } } ], "delete_fields": [ "notes" ] }'
Response
{ "id": 1, "key": "roast", "name": "Roast", "access_level": "storefront", "fields": [ { "key": "process", "label": "Process", "data_type": "single_line_string", "multiple": true, "required": true, "options": [ "washed", "natural" ], "rules": {} } ], "created_at": "2026-11-20T12:51:24.000000Z", "updated_at": "2026-11-20T12:51:24.000000Z" }

Delete a metaobject

DELETE /metaobjects/{metaobject_key}

Deletes a metaobject that has no entries and no metafields.

Path parameters

metaobject_keyRequiredstring

The key of the metaobject, unique within the shop.

ReturnsMetaobject

Metaobject deleted. The body is the metaobject as it was.

Error responses

404object

The shop has no metaobject with this key.

422MetaobjectValidationError

The metaobject has entries or a metafield uses it. The error sits under errors.metaobject.

curl -X DELETE https://api.subbly.co/private/v1/metaobjects/{metaobject_key} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "key": "roast", "name": "Roast", "access_level": "storefront", "fields": [ { "key": "process", "label": "Process", "data_type": "single_line_string", "multiple": true, "required": true, "options": [ "washed", "natural" ], "rules": {} } ], "created_at": "2026-11-20T12:51:24.000000Z", "updated_at": "2026-11-20T12:51:24.000000Z" }

List the entries of a metaobject

GET /metaobjects/{metaobject_key}/entries

Path parameters

metaobject_keyRequiredstring

The key of the metaobject, unique within the shop.

Query parameters

pageoptionalinteger

Page number for pagination

per_pageoptionalinteger

Entities per page

Defaults to 10.

Returnsobject

Successful response

Error responses

404object

The shop has no metaobject with this key.

422MetaobjectValidationError

page is below 1, or per_page is outside 1 to 100.

curl https://api.subbly.co/private/v1/metaobjects/{metaobject_key}/entries \ -H 'X-API-KEY: <api-key>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 1, "metaobject_key": "roast", "handle": "dark-roast", "name": "Dark Roast", "fields": { "origin": "Brazil", "process": "washed", "weight": 7, "notes": [ "dark", "nutty" ] }, "created_at": "2026-11-20T12:51:31.000000Z", "updated_at": "2026-11-20T12:59:29.000000Z" } ] }

Create a metaobject entry

POST /metaobjects/{metaobject_key}/entries

Creates an entry.

Path parameters

metaobject_keyRequiredstring

The key of the metaobject, unique within the shop.

Request body

nameRequiredstring

The name of the entry, for lists and pickers.

handleoptionalstring | null

Unique within the metaobject, and never only digits. Made from name when left out, null or "".

fieldsoptionalobject

Values keyed by field key. Each must fit its field's data type, rules and options; a list field takes a list.

ReturnsMetaobjectEntry

Entry created

Error responses

404object

The shop has no metaobject with this key.

422object

The body fails validation: name is missing on create or longer than 255 characters, handle is invalid, only digits or taken, fields is not an object, or a value is invalid (under fields.<key>), for example an unknown field, a missing required field or a value that does not fit the field.

curl -X POST https://api.subbly.co/private/v1/metaobjects/{metaobject_key}/entries \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "Dark Roast", "handle": "dark-roast", "fields": { "origin": "Brazil", "weight": 250, "notes": [ "dark", "nutty" ] } }'
Response
{ "id": 1, "metaobject_key": "roast", "handle": "dark-roast", "name": "Dark Roast", "fields": { "origin": "Brazil", "process": "washed", "weight": 7, "notes": [ "dark", "nutty" ] }, "created_at": "2026-11-20T12:51:31.000000Z", "updated_at": "2026-11-20T12:59:29.000000Z" }

Get a metaobject entry

GET /metaobjects/{metaobject_key}/entries/{handle}

Path parameters

metaobject_keyRequiredstring

The key of the metaobject, unique within the shop.

handleRequiredstring

The handle of the entry, unique within its metaobject. It is never only digits.

ReturnsMetaobjectEntry

Successful response

Error responses

404object

The shop has no metaobject with this key, or the metaobject has no entry with this handle.

curl https://api.subbly.co/private/v1/metaobjects/{metaobject_key}/entries/{handle} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "metaobject_key": "roast", "handle": "dark-roast", "name": "Dark Roast", "fields": { "origin": "Brazil", "process": "washed", "weight": 7, "notes": [ "dark", "nutty" ] }, "created_at": "2026-11-20T12:51:31.000000Z", "updated_at": "2026-11-20T12:59:29.000000Z" }

Update a metaobject entry

PATCH /metaobjects/{metaobject_key}/entries/{handle}

Updates an entry. fields is merged into the stored values; null removes a value.

Path parameters

metaobject_keyRequiredstring

The key of the metaobject, unique within the shop.

handleRequiredstring

The handle of the entry, unique within its metaobject. It is never only digits.

Request body

nameoptionalstring

The name of the entry. A new name does not change the handle.

handleoptionalstring | null

Never only digits. null or "" keeps the handle.

fieldsoptionalobject

Merged into the stored values. null, or [] for a list field, removes a value.

ReturnsMetaobjectEntry

Entry updated

Error responses

404object

The shop has no metaobject with this key, or the metaobject has no entry with this handle.

422object

The body fails validation: name is missing on create or longer than 255 characters, handle is invalid, only digits or taken, fields is not an object, or a value is invalid (under fields.<key>), for example an unknown field, a missing required field or a value that does not fit the field.

curl -X PATCH https://api.subbly.co/private/v1/metaobjects/{metaobject_key}/entries/{handle} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "fields": { "weight": 500 } }'
Response
{ "id": 1, "metaobject_key": "roast", "handle": "dark-roast", "name": "Dark Roast", "fields": { "origin": "Brazil", "process": "washed", "weight": 7, "notes": [ "dark", "nutty" ] }, "created_at": "2026-11-20T12:51:31.000000Z", "updated_at": "2026-11-20T12:59:29.000000Z" }

Delete a metaobject entry

DELETE /metaobjects/{metaobject_key}/entries/{handle}

Deletes an entry that nothing uses.

Path parameters

metaobject_keyRequiredstring

The key of the metaobject, unique within the shop.

handleRequiredstring

The handle of the entry, unique within its metaobject. It is never only digits.

ReturnsMetaobjectEntry

Entry deleted. The body is the entry as it was.

Error responses

404object

The shop has no metaobject with this key, or the metaobject has no entry with this handle.

422object

A value points at the entry. used_by lists the first places found of each kind, not every place.

curl -X DELETE https://api.subbly.co/private/v1/metaobjects/{metaobject_key}/entries/{handle} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "metaobject_key": "roast", "handle": "dark-roast", "name": "Dark Roast", "fields": { "origin": "Brazil", "process": "washed", "weight": 7, "notes": [ "dark", "nutty" ] }, "created_at": "2026-11-20T12:51:31.000000Z", "updated_at": "2026-11-20T12:59:29.000000Z" }
paginationobject
dataMetaobject[]
keyRequiredstring
labelRequiredstring
data_typeRequiredstring

Can not change once the field is stored. An entry field can not be a metaobject_reference or a metaobject_shape.

Possible values: single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money, json.

multipleoptionalboolean

Only for the data types a metafield can hold several values of.

Defaults to false.

requiredoptionalboolean

Defaults to false.

optionsoptionalany[]

Preset values, only for the data types a metafield can have preset values of. Each must fit the data type and the rules, and appear once.

rulesoptionalMetafieldRules

Replaces all rules of the field. Send {} to remove every rule.

idinteger
keystring
namestring
access_levelstring

Possible values: storefront, private.

fieldsMetaobjectField[]

The live fields, in order.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
keystring
namestring
access_levelstring

Possible values: storefront, private.

fieldsMetaobjectField[]

The live fields, in order.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

keyRequiredstring
labelRequiredstring
data_typeRequiredstring

Can not change once the field is stored. An entry field can not be a metaobject_reference or a metaobject_shape.

Possible values: single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money, json.

multipleoptionalboolean

Only for the data types a metafield can hold several values of.

Defaults to false.

requiredoptionalboolean

Defaults to false.

optionsoptionalany[]

Preset values, only for the data types a metafield can have preset values of. Each must fit the data type and the rules, and appear once.

rulesoptionalMetafieldRules

Replaces all rules of the field. Send {} to remove every rule.

idinteger
keystring
namestring
access_levelstring

Possible values: storefront, private.

fieldsMetaobjectField[]

The live fields, in order.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
keystring
namestring
access_levelstring

Possible values: storefront, private.

fieldsMetaobjectField[]

The live fields, in order.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

paginationobject
dataMetaobjectEntry[]
idinteger
metaobject_keystring
handlestring
namestring

The name of the entry, for lists and pickers.

fieldsobject

Values of the entry, keyed by field key, in the format a write takes; null when a field has no value.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
metaobject_keystring
handlestring
namestring

The name of the entry, for lists and pickers.

fieldsobject

Values of the entry, keyed by field key, in the format a write takes; null when a field has no value.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
metaobject_keystring
handlestring
namestring

The name of the entry, for lists and pickers.

fieldsobject

Values of the entry, keyed by field key, in the format a write takes; null when a field has no value.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
metaobject_keystring
handlestring
namestring

The name of the entry, for lists and pickers.

fieldsobject

Values of the entry, keyed by field key, in the format a write takes; null when a field has no value.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.