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

Apply rule-based remediations in a batch

Write-back stores the prior value for every change; reversible and audited.

POST/stores/{store_id}/catalog/remediations/apply
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
Header parameters
Idempotency-Keystring

Client-generated key; replays return the original result.

Request body
requiredapplication/json
remediation_idsstring[]required
min items 1
Responses
200

Applied; returns audit references.

appliedinteger
write_back_idsstring[]
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://api.sarvex.example.com/v1/stores/string/catalog/remediations/apply" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "remediation_ids": [
    "string"
  ]
}'
Response
{
  "applied": 0,
  "write_back_ids": [
    "string"
  ]
}