---
title: "Create case for transaction"
url: "https://developers.zinnia.com/apis/policy-transactions-1-0-2/versions/d0006570-ab9d-464e-814f-d120ba425e84/operations/createCase"
---

> Full API specification: https://developers.zinnia.com/apis/policy-transactions-1-0-2/versions/d0006570-ab9d-464e-814f-d120ba425e84.md

# Create case for transaction

`POST` `/policy/v1/transactions/case`

Operation ID: `createCase`

This operation must be invoked before submitting a transaction request. The service is responsible for creating a new case record, which becomes the prerequisite reference for all subsequent transaction activities.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Case Created
- `400` - Bad Request
- `401` - Authentication failed
- `403` - Access denied
- `500` - Server error

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Zinnia Policy Transactions API.
  version: 1.0.8
servers:
  - url: https://dev.api.zinnia.io
    description: DEV Environment
  - url: https://qa.api.zinnia.io
    description: QA Environment
paths:
  /policy/v1/transactions/case:
    post:
      x-kong-plugin-pre-function:
        config:
          access:
            - >
              local path = kong.request.get_path()

              local new_path = path:gsub("^/policy/v1/transactions",
              "/bpm/v1/policies")

              kong.service.request.set_path(new_path)
      tags:
        - Policy - Transactions
      summary: Create case for transaction
      description: This operation must be invoked before submitting a transaction
        request. The service is responsible for creating a new case record,
        which becomes the prerequisite reference for all subsequent transaction
        activities.
      operationId: createCase
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCaseRequest"
      responses:
        "201":
          description: Case Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaseSuccessResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ValidationResponse"
        "401":
          description: Authentication failed
          content:
            application/json:
              examples:
                NewBusiness:
                  value:
                    message: Unauthorized
        "403":
          description: Access denied
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccessDeniedResponse"
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ServerErrorResponse"
      security:
        - Auth0: []
security:
  - Auth0: []
components:
  schemas:
    CreateCaseRequest:
      type: object
      properties:
        planCode:
          type: string
          description: Product code provided by the Zinnia system
          example: ABC001
        policyNumber:
          type: string
          description: In case of Post Issue Policy Number will be mandatory
          example: EVGL1234567
        correlationId:
          type: string
          description: The correlationId associated with the case.
          example: 218d8992-3783-42ac-b59a-66cbc36adaab
        caseType:
          type: string
          enum:
            - Reinstatement
            - New Business
          description: The type associated with the case.
          example: Reinstatement
        caseSubType:
          type: string
          enum:
            - Reinstatement
            - Life Application
          description: The type associated with the case.
          example: Reinstatement
        identifiers:
          type: array
          description: A list of identifiers associated with the case.
          items:
            $ref: "#/components/schemas/IdentifierInstance"
      required:
        - planCode
        - caseType
        - caseSubType
        - identifiers
    CaseSuccessResponse:
      type: object
      properties:
        caseId:
          type: string
          example: CA000000536
        correlationId:
          type: string
          example: 15ea7582-262f-4dfe-8a60-1e8b8e763fd4
        eappId:
          type: string
          example: 15ea7582-262f-4dfe-8a60-1e8b8e763fd4
        policyNumber:
          type: string
          example: ABC37457845
    ValidationResponse:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
          example: 400
        timestamp:
          type: string
          format: date-time
        errorId:
          type: string
          example: a4a57ed0-2c1b-4922-9959-3b85dd8a96d3
        message:
          type: string
          example: JSON Valdiation fails with error
        error:
          type: array
          items:
            type: string
            example: Mandatory attribute label missing
    AccessDeniedResponse:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
          example: 403
        timestamp:
          type: integer
          format: int64
          example: 1681395423438
        errorId:
          type: string
          example: 0286d47a-7ad9-499c-8ca0-8f6634d236a3
        message:
          type: string
          example: "User is not authorized for the carrier : CarrierName_1"
    ServerErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
          example: 500
        timestamp:
          type: integer
          format: int64
          example: 1681395423438
        errorId:
          type: string
          example: 0286d47a-7ad9-499c-8ca0-8f6634d236a3
        message:
          type: string
          example: Failed to process request
    IdentifierInstance:
      type: object
      description: An object representing an identifier and its corresponding value.
      properties:
        identifier:
          type: string
          enum:
            - eAppId
            - policyNumber
          description: The type of identifier.
        value:
          type: string
          description: The value of the identifier.
          example: ABC123349257367
  securitySchemes:
    Auth0:
      type: openIdConnect
      openIdConnectUrl: https://login.qa.zinnia.com/.well-known/openid-configuration
      x-kong-security-openid-connect:
        config:
          run_on_preflight: true
          scopes_claim:
            - https://qa.api.zinnia.io/permissions
          audience_claim:
            - aud
          audience_required:
            - https://qa.api.zinnia.io
          client_id:
            - client_id
          auth_methods:
            - bearer
        enabled: true
        protocols:
          - grpc
          - grpcs
          - http
          - https
```
