Skip to main content

Service recovery

Goodwill and service-recovery cases with eligibility, approval thresholds and issue of vouchers or onboard credit.

OperationEndpoint
Open a service-recovery casePOST /oms-ops/service-recovery/cases
Read a caseGET /oms-ops/service-recovery/cases/{caseId}
Reconcile a case's approval or retry its issuePOST /oms-ops/service-recovery/cases/{caseId}/sync
List a customer's casesGET /oms-ops/service-recovery/customers/{customerRef}/cases
Check eligibilityPOST /oms-ops/service-recovery/eligibility

Open a service-recovery case​

POST/oms-ops/service-recovery/cases

Headers: Idempotency-Key, plus X-Request-Id.

Request body

FieldTypeRequiredNotes
agentobjectyes
agent.channelstringmax 60 chars
agent.idstringyes1–200 chars
agent.namestringmax 200 chars
agent.rolestringyes1–100 chars
attributesmap of string
benefitobjectyes
benefit.amountMinorintegeryes> 0
benefit.currencystringyespattern ^[A-Z]{3}$
benefit.kindenum: voucher, onboard_credityes
crmCaseRefstringmax 200 chars
customerRefstringyes1–200 chars
idempotencyKeystringyes1–200 chars
interactionRefstringmax 200 chars
notestringmax 2000 chars
reasonCodestringyes1–60 chars
tripIdstring1–200 chars

Schema: apps/journeys/src/oms-ops/contracts.ts (RecoveryRequestSchema)

Response 201

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
400idempotency_key_mismatchThe Idempotency-Key header and the body idempotencyKey differ.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422not_eligibleThe service-recovery request is not eligible under the policy.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Read a case​

GET/oms-ops/service-recovery/cases/{caseId}

Parameters

NameInRequiredNotes
caseIdpathyes

Response 200

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404case_not_foundThe service-recovery case does not exist.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Reconcile a case's approval or retry its issue​

POST/oms-ops/service-recovery/cases/{caseId}/sync

Parameters

NameInRequiredNotes
caseIdpathyes

Headers: Idempotency-Key, plus X-Request-Id.

Response 200

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404case_not_foundThe service-recovery case does not exist.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.

List a customer's cases​

GET/oms-ops/service-recovery/customers/{customerRef}/cases

Parameters

NameInRequiredNotes
customerRefpathyes

Response 200

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Check eligibility​

POST/oms-ops/service-recovery/eligibility

Headers: Idempotency-Key, plus X-Request-Id.

Request body

FieldTypeRequiredNotes
agentobjectyes
agent.channelstringmax 60 chars
agent.idstringyes1–200 chars
agent.namestringmax 200 chars
agent.rolestringyes1–100 chars
attributesmap of string
benefitobjectyes
benefit.amountMinorintegeryes> 0
benefit.currencystringyespattern ^[A-Z]{3}$
benefit.kindenum: voucher, onboard_credityes
crmCaseRefstringmax 200 chars
customerRefstringyes1–200 chars
idempotencyKeystringyes1–200 chars
interactionRefstringmax 200 chars
notestringmax 2000 chars
reasonCodestringyes1–60 chars
tripIdstring1–200 chars

Schema: apps/journeys/src/oms-ops/contracts.ts (RecoveryRequestSchema)

Response 200

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.