---
title: "Retry Failed Policy Issuance"
url: "https://apipartners.mosaicinsurance.com/apis/trident-sandbox-1/versions/063565b3-7d5d-4ebb-9e4e-ea5966a41579/operations/retryOrchestration"
---

> Full API specification: https://apipartners.mosaicinsurance.com/apis/trident-sandbox-1/versions/063565b3-7d5d-4ebb-9e4e-ea5966a41579.md

# Retry Failed Policy Issuance

`POST` `/policy/global/{policyNo}/retry`

Operation ID: `retryOrchestration`

Starts a new state machine execution that resumes from the failed step (current_step on the status row). The original {base, full, quote, bind} payload is read back from the failed execution's input via DescribeExecution; policyKey / policyActivityKey produced by the successful base step are taken from the status row. Only allowed when overall_status = FAILED.

## Path parameters

- `policyNo` (string, required) - Policy number of the failed submission

## Header parameters

- `X-Origination-Source` (string, required) - Identifies the calling system or channel that originated this request. Used for traceability and auditing across the platform.
- `X-Audit-UserId` (string, required) - Identifier of the end user on whose behalf this request is made, recorded for audit trail purposes.

## Responses

- `202` - Retry accepted; new execution started.
- `400` - Submission is not in FAILED state, so retry is not allowed.
- `404` - No submission found for the given policy number.
- `500` - Retry failed to start (e.g., SFN history purged or AWS error).

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Trident APIs
  version: dev
servers:
  - url: https://apinonprod.mosaicinsurance.com
    description: Generated server url
paths:
  /policy/global/{policyNo}/retry:
    post:
      security:
        - api_key: []
      tags:
        - Admin/Develop
      summary: Retry Failed Policy Issuance
      description: >-
        Starts a new state machine execution that resumes from the failed step
        (current_step on the status row). The original {base, full, quote, bind}
        payload is read back from the failed execution's input via
        DescribeExecution; policyKey / policyActivityKey produced by the
        successful base step are taken from the status row.


        Only allowed when overall_status = FAILED.
      operationId: retryOrchestration
      parameters:
        - $ref: "#/components/parameters/XOriginationSource"
        - $ref: "#/components/parameters/XAuditUserId"
        - name: policyNo
          in: path
          required: true
          description: Policy number of the failed submission
          schema:
            type: string
          example: Q0038456
      responses:
        "202":
          description: Retry accepted; new execution started.
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
            Access-Control-Allow-Methods:
              schema:
                type: string
            Access-Control-Allow-Headers:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GlobalSubmissionResponse"
              examples:
                Retry Accepted:
                  summary: Retry started from FULL
                  description: Retry Accepted
                  value:
                    submissionId: 9b3f7c1c-1f0a-4e2d-9d7c-2e3a8b4c6d2e
                    policyNo: Q0038456
                    policyKey: "20894"
                    policyActivityKey: "45632"
                    status: ACCEPTED
                    message: Retry started from FULL; see GET
                      /policies/orchestrate/{policyNo}/stepStatus for progress.
        "400":
          description: Submission is not in FAILED state, so retry is not allowed.
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
            Access-Control-Allow-Methods:
              schema:
                type: string
            Access-Control-Allow-Headers:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Not in FAILED State:
                  summary: Wrong overall status
                  description: Not in FAILED State
                  value:
                    error:
                      code: CONFLICT
                      message: Submission is not in FAILED state (current=BASE_OK); retry allowed only
                        for FAILED submissions.
        "404":
          description: No submission found for the given policy number.
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
            Access-Control-Allow-Methods:
              schema:
                type: string
            Access-Control-Allow-Headers:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Policy Not Found:
                  summary: Unknown policyNo
                  description: Policy Not Found
                  value:
                    error:
                      code: NOT_FOUND
                      message: No submission found for policyNo=Q0038456
        "500":
          description: Retry failed to start (e.g., SFN history purged or AWS error).
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
            Access-Control-Allow-Methods:
              schema:
                type: string
            Access-Control-Allow-Headers:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Retry Failed:
                  summary: Original execution input no longer available
                  description: Retry Failed
                  value:
                    error:
                      code: INTERNAL_ERROR
                      message: "Retry failed: original execution input is unavailable (history may
                        have been purged after 90 days)."
security:
  - api_key: []
components:
  parameters:
    XOriginationSource:
      name: X-Origination-Source
      in: header
      required: true
      description: Identifies the calling system or channel that originated this
        request. Used for traceability and auditing across the platform.
      schema:
        type: string
      example: S01x
    XAuditUserId:
      name: X-Audit-UserId
      in: header
      required: true
      description: Identifier of the end user on whose behalf this request is made,
        recorded for audit trail purposes.
      schema:
        type: string
      example: jsmith
  schemas:
    GlobalSubmissionResponse:
      type: object
      description: Minimal response returned after the base Step Function completes.
      properties:
        submissionId:
          type: string
          format: uuid
          description: Correlation id for tracing the background full + quote executions
            in logs
          example: 9b3f7c1c-1f0a-4e2d-9d7c-2e3a8b4c6d2e
        policyNo:
          type: string
          description: Policy number produced by the base submission step
          example: Q0038456
        policyKey:
          type: string
          description: Policy key produced by the base submission step, propagated to the
            async steps
          example: "20894"
        policyActivityKey:
          type: string
          description: Policy activity key produced by the base submission step
          example: "45632"
        status:
          type: string
          enum:
            - ACCEPTED
            - FAILED
          description: ACCEPTED means the full step is running in background; FAILED means
            the base step failed
          example: ACCEPTED
        message:
          type: string
          description: Human-readable message
          example: Base submission succeeded. The full step is running asynchronously.
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: "#/components/schemas/ErrorDetail"
    ErrorDetail:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header
```
