Skip to content
SarvexDocs
Esc
↑↓navigate↵open⌘Jpreview

Set a store's business profile

Full-replacement update of the store’s business profile. Shipping zones may be supplied here as a manual override/seed; connector ingestion otherwise sources fulfillment data.

PUT/stores/{store_id}/profile
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT issued by the external IdP via the OAuth 2.0 authorization-code flow (Kinde in production; a simulator in test). The client obtains it and sends it as a Bearer token on every authenticated call. Sarvex's services verify it — issuer, audience, signature (IdP JWKS), expiry — and read identity and tenant from its claims. Sarvex does not issue or revoke these tokens. merchant_id/store_id are read from the verified claims (and the merchant→store mapping), never from the URL. The operator scope is required for /operator/*. Operators acting on a specific merchant pass the X-Operate-As header, which is recorded in the audit log.

Path parameters
store_idstringrequired

A store the caller's merchant owns. Authorized server-side against the principal; not a free-form tenant selector.

Request body
requiredapplication/json
legal_namestring
support_emailstring<email>
domainstring<uri>
return_policy_urlstring<uri>
fulfillment_regionsstring[]
shipping_zonesobject
Responses
200

Updated store profile.

store_idstring
legal_namestring
support_emailstring<email>
domainstring<uri>

The store's storefront/brand domain where /.well-known/ucp is served.

return_policy_urlstring<uri>

URL of this store's return policy.

fulfillment_regionsstring[]
shipping_zonesobject

Shipping zones keyed by zone id.

404

Resource not found within the caller's tenant.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
detailsobject | null
422

Request body failed validation.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
detailsobject | null
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT "https://api.sarvex.example.com/v1/stores/string/profile" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "legal_name": "string",
  "support_email": "user@example.com",
  "domain": "http://example.com",
  "return_policy_url": "http://example.com",
  "fulfillment_regions": [
    "string"
  ],
  "shipping_zones": {
    "property1": {
      "id": "string",
      "name": "string",
      "rates": [
        {
          "method": "string",
          "cost": {
            "amount_minor": 0,
            "currency": "AUD"
          }
        }
      ]
    },
    "property2": {
      "id": "string",
      "name": "string",
      "rates": [
        {
          "method": "string",
          "cost": {
            "amount_minor": 0,
            "currency": "AUD"
          }
        }
      ]
    }
  }
}'
Response
{
  "store_id": "string",
  "legal_name": "string",
  "support_email": "user@example.com",
  "domain": "http://example.com",
  "return_policy_url": "http://example.com",
  "fulfillment_regions": [
    "AU"
  ],
  "shipping_zones": {
    "property1": {
      "id": "string",
      "name": "string",
      "rates": [
        {
          "method": "string",
          "cost": {
            "amount_minor": 0,
            "currency": "AUD"
          }
        }
      ]
    },
    "property2": {
      "id": "string",
      "name": "string",
      "rates": [
        {
          "method": "string",
          "cost": {
            "amount_minor": 0,
            "currency": "AUD"
          }
        }
      ]
    }
  }
}