Skip to content

Store ​

Read and update your store settings. You can also publish storefront changes and verify a custom domain.

MethodPathDescription
GET/v1/storeGet store details
PATCH/v1/storeUpdate store settings
POST/v1/store/publishPublish storefront changes
GET/v1/store/domain/recordGet expected DNS verification record
POST/v1/store/domain/verifyVerify domain ownership

Get store details

GET /v1/store

Returns the authenticated store's settings including name, currency, enabled currencies, plan, and configuration. Includes `unpublished_changes_count` for storefront publish workflow. Supports `?fields=` for sparse fieldsets.

Query parameters

ParameterTypeDefaultDescription
fieldsstring-

Request

curl https://api.hydrajs.dev/v1/store \
  -H "Authorization: Bearer sk_YOUR_KEY"

Response 200

{
	"data": {}
}

Update store settings

PATCH /v1/store

Updates store settings such as name, currency, allowed origins, and enabled extensions. Requires a secret key.

Request body

FieldTypeRequiredDescription
namestringNo
domainstring | nullNo
business_countrystring | nullNo
contact_emailstring | nullNo
contact_phonestring | nullNo
legal_business_namestring | nullNo
business_address_line1string | nullNo
business_address_line2string | nullNo
business_citystring | nullNo
business_statestring | nullNo
business_postal_codestring | nullNo
tax_idstring | nullNo
legal_entity_typestring | nullNo Values: individual, company, non_profit, government_entity
company_registration_numberstring | nullNo
tax_id_typestring | nullNo Values: vat, gst, ein, sales_tax, itin, abn, nit, rfc, other
currencystringNo
enabled_currenciesstring[]No
currency_conversion_marginnumberNo
currency_roundingstringNo Values: none, up, down
timezonestringNo
unit_systemstringNo Values: metric, imperial
default_weight_unitstringNo Values: kg, g, lb, oz
allowed_originsobject[]No
enabled_extensionsstring[]No
po_prefixstringNo
invoice_prefixstringNo
next_order_numberintegerNoNext order number to be assigned
require_email_verificationbooleanNo
checkout_require_accountstringNo Values: disabled, optional, required
checkout_require_phonestringNo Values: hidden, optional, required
checkout_company_fieldstringNo Values: hidden, optional, required
checkout_address2_fieldstringNo Values: hidden, optional
checkout_discount_codesbooleanNo
checkout_order_notesbooleanNo
checkout_auto_fulfill_physicalbooleanNo
checkout_auto_fulfill_digitalbooleanNo
checkout_auto_fulfill_servicebooleanNo
checkout_auto_fulfill_bookingbooleanNo
checkout_auto_archive_daysinteger | nullNo
checkout_confirmation_emailbooleanNo
checkout_marketing_opt_instringNo Values: hidden, unchecked, checked
checkout_sms_consentbooleanNo
checkout_terms_urlstring | nullNo
checkout_privacy_urlstring | nullNo
checkout_abandoned_recoverystringNo Values: 1, 2, 3, off
checkout_recovery_discountintegerNo
checkout_tipping_enabledbooleanNo
checkout_tip_percentagesinteger[]No
tax_calculationstringNo Values: disabled, automatic, manual
tax_inclusivebooleanNo
brand_logo_urlstring | nullNo
brand_primary_colorstring | nullNo
brand_secondary_colorstring | nullNo
brand_tertiary_colorstring | nullNo
brand_accent_colorstring | nullNo
localestringNo
notifications_enabledbooleanNo
notification_disabled_typesstring[]No
notification_from_namestring | nullNo
notification_from_emailstring | nullNoLocal part of the from address (e.g. "orders"). Combined with verified domain at send time.
storefront_renderingstringNoStorefront rendering strategy. SSR serves pages on each request, SSG builds at deploy time, ISR revalidates on demand. Values: ssr, ssg, isr
auto_publishbooleanNoWhen enabled, storefront changes are automatically published after a debounce period.
auto_publish_debounce_secondsintegerNoQuiet period in seconds before auto-publish fires. Default 30.
booking_configobjectNoPartial update — only provided fields are changed, others are preserved.
loyalty_configobjectNoPartial update — only provided fields are changed, others are preserved.
gift_card_configobjectNo
store_credit_configobjectNoPartial update — only provided fields are changed, others are preserved.

Request

curl -X PATCH https://api.hydrajs.dev/v1/store \
  -H "Authorization: Bearer sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Commerce",
    "domain": "shop.acme.com",
    "business_country": "US"
  }'

Response 200

{
	"data": {}
}

Publish storefront changes

POST /v1/store/publish

Marks all pending storefront changes as published by setting `last_published_at` to now. Dispatches a `store.published` webhook that storefronts can use to trigger on-demand revalidation. Requires a secret key or admin JWT.

Request

curl -X POST https://api.hydrajs.dev/v1/store/publish \
  -H "Authorization: Bearer sk_YOUR_KEY"

Response 200

{
	"data": {}
}

Get expected DNS verification record

GET /v1/store/domain/record

Returns the expected TXT record for domain verification without performing a DNS lookup. Requires a secret key or admin JWT.

Request

curl https://api.hydrajs.dev/v1/store/domain/record \
  -H "Authorization: Bearer sk_YOUR_KEY"

Response 200

{
	"data": {}
}

Verify domain ownership

POST /v1/store/domain/verify

Checks for a DNS TXT record at `_hydra-verification.{domain}` to verify domain ownership. Updates `domain_verified` to `true` on success. Requires a secret key or admin JWT.

Request

curl -X POST https://api.hydrajs.dev/v1/store/domain/verify \
  -H "Authorization: Bearer sk_YOUR_KEY"

Response 200

{
	"data": {}
}