Store
Read and update your store settings. You can also publish storefront changes and verify a custom domain.
| Method | Path | Description |
|---|---|---|
GET | /v1/store | Get store details |
PATCH | /v1/store | Update store settings |
POST | /v1/store/publish | Publish storefront changes |
GET | /v1/store/domain/record | Get expected DNS verification record |
POST | /v1/store/domain/verify | Verify domain ownership |
Get store details
GET /v1/storeReturns 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
| Parameter | Type | Default | Description |
|---|---|---|---|
fields | string | - |
Request
curl https://api.hydrajs.dev/v1/store \
-H "Authorization: Bearer sk_YOUR_KEY"Response 200
{
"data": {}
}Update store settings
PATCH /v1/storeUpdates store settings such as name, currency, allowed origins, and enabled extensions. Requires a secret key.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | |
domain | string | null | No | |
business_country | string | null | No | |
contact_email | string | null | No | |
contact_phone | string | null | No | |
legal_business_name | string | null | No | |
business_address_line1 | string | null | No | |
business_address_line2 | string | null | No | |
business_city | string | null | No | |
business_state | string | null | No | |
business_postal_code | string | null | No | |
tax_id | string | null | No | |
legal_entity_type | string | null | No | Values: individual, company, non_profit, government_entity |
company_registration_number | string | null | No | |
tax_id_type | string | null | No | Values: vat, gst, ein, sales_tax, itin, abn, nit, rfc, other |
currency | string | No | |
enabled_currencies | string[] | No | |
currency_conversion_margin | number | No | |
currency_rounding | string | No | Values: none, up, down |
timezone | string | No | |
unit_system | string | No | Values: metric, imperial |
default_weight_unit | string | No | Values: kg, g, lb, oz |
allowed_origins | object[] | No | |
enabled_extensions | string[] | No | |
po_prefix | string | No | |
invoice_prefix | string | No | |
next_order_number | integer | No | Next order number to be assigned |
require_email_verification | boolean | No | |
checkout_require_account | string | No | Values: disabled, optional, required |
checkout_require_phone | string | No | Values: hidden, optional, required |
checkout_company_field | string | No | Values: hidden, optional, required |
checkout_address2_field | string | No | Values: hidden, optional |
checkout_discount_codes | boolean | No | |
checkout_order_notes | boolean | No | |
checkout_auto_fulfill_physical | boolean | No | |
checkout_auto_fulfill_digital | boolean | No | |
checkout_auto_fulfill_service | boolean | No | |
checkout_auto_fulfill_booking | boolean | No | |
checkout_auto_archive_days | integer | null | No | |
checkout_confirmation_email | boolean | No | |
checkout_marketing_opt_in | string | No | Values: hidden, unchecked, checked |
checkout_sms_consent | boolean | No | |
checkout_terms_url | string | null | No | |
checkout_privacy_url | string | null | No | |
checkout_abandoned_recovery | string | No | Values: 1, 2, 3, off |
checkout_recovery_discount | integer | No | |
checkout_tipping_enabled | boolean | No | |
checkout_tip_percentages | integer[] | No | |
tax_calculation | string | No | Values: disabled, automatic, manual |
tax_inclusive | boolean | No | |
brand_logo_url | string | null | No | |
brand_primary_color | string | null | No | |
brand_secondary_color | string | null | No | |
brand_tertiary_color | string | null | No | |
brand_accent_color | string | null | No | |
locale | string | No | |
notifications_enabled | boolean | No | |
notification_disabled_types | string[] | No | |
notification_from_name | string | null | No | |
notification_from_email | string | null | No | Local part of the from address (e.g. "orders"). Combined with verified domain at send time. |
storefront_rendering | string | No | Storefront rendering strategy. SSR serves pages on each request, SSG builds at deploy time, ISR revalidates on demand. Values: ssr, ssg, isr |
auto_publish | boolean | No | When enabled, storefront changes are automatically published after a debounce period. |
auto_publish_debounce_seconds | integer | No | Quiet period in seconds before auto-publish fires. Default 30. |
booking_config | object | No | Partial update — only provided fields are changed, others are preserved. |
loyalty_config | object | No | Partial update — only provided fields are changed, others are preserved. |
gift_card_config | object | No | |
store_credit_config | object | No | Partial 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/publishMarks 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/recordReturns 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/verifyChecks 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": {}
}