---
title: "Replace a call entry"
url: "https://developers.zinnia.com/apis/orion-api/versions/716288b7-e96e-41a7-abc5-63925410717a/operations/replace-call-entry"
---

> Full API specification: https://developers.zinnia.com/apis/orion-api/versions/716288b7-e96e-41a7-abc5-63925410717a.md

# Replace a call entry

`PUT` `/callcenter/v1/CallEntry/{callEntryId}`

Operation ID: `replace-call-entry`

Completely replaces the writable contents of an existing call record for the company identified by `X-Client-Code`. This is a full replacement, not a partial update: omitted nullable fields are cleared, and the submitted contracts replace all stored contract relationships. Orion returns `404 Not Found` when the specified record does not exist. The request must include `callerName` and a valid active `callerType`. Lookup values and contract call types follow the same resolution and defaulting rules described for creation. Orion determines the acting user from the configured token identity claims. If none of these claims is present, Orion uses the trimmed `userName` from the request body to identify the caller in machine-to-machine scenarios. `X-Correlation-Id` makes the replacement idempotent for at least 24 hours. A successful replacement or completed identical replay returns `200 OK`; replays also include `X-Idempotent-Replay: true` and do not apply the replacement again. Reusing the ID for different content or while the original request is still running returns `409 Conflict`. This operation does not support `PATCH`, ETags, `If-Match`, or optimistic concurrency.

## Path parameters

- `callEntryId` (integer, int32, required)

## Header parameters

- `X-Client-Code` (string, required) - Required tenant selector. Trimmed and resolved case-insensitively to a canonical configured tenant before FGA authorization; missing, blank, or unknown values return 400.
- `X-Correlation-Id` (string, required) - Required trimmed, nonblank idempotency key, maximum 100 characters. Scoped by canonical tenant, operation, and resource identity; clients must generate operation-unique values.

## Request body (required)

Content types: `application/json`, `text/json`, `application/*+json`

## Responses

- `200` - OK. First full replacement or identical completed replay; a replay does not apply the replacement again.
- `400` - Bad Request. Missing/blank/unknown tenant, invalid correlation ID, missing conditional M2M userName, invalid fields, unknown/inactive lookup names, or contract classification/duplication errors.
- `401` - Unauthorized. Bearer token is missing, malformed, or fails configured authentication validation.
- `403` - Forbidden. Token lacks partyId, tenant FGA read/write authorization, or contains a present but blank/malformed configured username claim on a write.
- `404` - Not Found. The requested call entry does not exist in the selected tenant.
- `409` - Conflict. The scoped X-Correlation-Id was reused with different normalized content or actor, or an equivalent request is still in progress.
- `503` - Service Unavailable (503). FGA returned an unavailable/unusable result, or the selected tenant has duplicate active lookup names and Orion will not choose an arbitrary ID.

## OpenAPI definition

```yaml
openapi: 3.0.4
info:
  title: Orion Call Center API
  version: v1
servers:
  - url: https://qa.api.zinnia.io
paths:
  /callcenter/v1/CallEntry/{callEntryId}:
    put:
      tags:
        - Call Entries
      summary: Replace a call entry
      description: >-
        Completely replaces the writable contents of an existing call record for
        the company identified by `X-Client-Code`. This is a full replacement,
        not a partial update: omitted nullable fields are cleared, and the
        submitted contracts replace all stored contract relationships. Orion
        returns `404 Not Found` when the specified record does not exist.


        The request must include `callerName` and a valid active `callerType`.
        Lookup values and contract call types follow the same resolution and
        defaulting rules described for creation.


        Orion determines the acting user from the configured token identity
        claims. If none of these claims is present, Orion uses the trimmed
        `userName` from the request body to identify the caller in
        machine-to-machine scenarios.


        `X-Correlation-Id` makes the replacement idempotent for at least 24
        hours. A successful replacement or completed identical replay returns
        `200 OK`; replays also include `X-Idempotent-Replay: true` and do not
        apply the replacement again. Reusing the ID for different content or
        while the original request is still running returns `409 Conflict`.


        This operation does not support `PATCH`, ETags, `If-Match`, or
        optimistic concurrency.
      operationId: replace-call-entry
      parameters:
        - name: callEntryId
          in: path
          required: true
          schema:
            type: integer
            format: int32
        - name: X-Client-Code
          in: header
          description: Required tenant selector. Trimmed and resolved case-insensitively
            to a canonical configured tenant before FGA authorization; missing,
            blank, or unknown values return 400.
          required: true
          schema:
            maxLength: 4
            minLength: 3
            pattern: ^[A-Za-z]{3,4}$
            type: string
          example: ABCD
        - name: X-Correlation-Id
          in: header
          description: Required trimmed, nonblank idempotency key, maximum 100 characters.
            Scoped by canonical tenant, operation, and resource identity;
            clients must generate operation-unique values.
          required: true
          schema:
            maxLength: 100
            minLength: 1
            pattern: ^[A-Za-z0-9._:-]+$
            type: string
          example: call-entry-create-123
      requestBody:
        description: Full replacement payload. Omitted nullable fields are cleared;
          contracts replace the stored collection. Unknown JSON properties
          remain permissive.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallEntryWriteRequest"
            example:
              callerName: Jane Caller
              callerType: Owner
              callType: Billing
              transactionType: Payment
              productType: Annuity
              contracts:
                - contractNumber: C-10001
                  callTypes:
                    - Billing
          text/json:
            schema:
              $ref: "#/components/schemas/CallEntryWriteRequest"
          application/*+json:
            schema:
              $ref: "#/components/schemas/CallEntryWriteRequest"
        required: true
      responses:
        "200":
          description: OK. First full replacement or identical completed replay; a replay
            does not apply the replacement again.
          headers:
            X-Idempotent-Replay:
              description: Present with value true only for a completed idempotent replay.
              schema:
                type: boolean
              example: true
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/CallEntry"
            application/json:
              schema:
                $ref: "#/components/schemas/CallEntry"
            text/json:
              schema:
                $ref: "#/components/schemas/CallEntry"
        "400":
          description: Bad Request. Missing/blank/unknown tenant, invalid correlation ID,
            missing conditional M2M userName, invalid fields, unknown/inactive
            lookup names, or contract classification/duplication errors.
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/Response"
            application/json:
              schema:
                $ref: "#/components/schemas/Response"
            text/json:
              schema:
                $ref: "#/components/schemas/Response"
        "401":
          description: Unauthorized. Bearer token is missing, malformed, or fails
            configured authentication validation.
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/Response"
            application/json:
              schema:
                $ref: "#/components/schemas/Response"
            text/json:
              schema:
                $ref: "#/components/schemas/Response"
        "403":
          description: Forbidden. Token lacks partyId, tenant FGA read/write
            authorization, or contains a present but blank/malformed configured
            username claim on a write.
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/Response"
            application/json:
              schema:
                $ref: "#/components/schemas/Response"
            text/json:
              schema:
                $ref: "#/components/schemas/Response"
        "404":
          description: Not Found. The requested call entry does not exist in the selected
            tenant.
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/Response"
            application/json:
              schema:
                $ref: "#/components/schemas/Response"
            text/json:
              schema:
                $ref: "#/components/schemas/Response"
        "409":
          description: Conflict. The scoped X-Correlation-Id was reused with different
            normalized content or actor, or an equivalent request is still in
            progress.
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/Response"
            application/json:
              schema:
                $ref: "#/components/schemas/Response"
            text/json:
              schema:
                $ref: "#/components/schemas/Response"
        "503":
          description: Service Unavailable (503). FGA returned an unavailable/unusable
            result, or the selected tenant has duplicate active lookup names and
            Orion will not choose an arbitrary ID.
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/Response"
            application/json:
              schema:
                $ref: "#/components/schemas/Response"
            text/json:
              schema:
                $ref: "#/components/schemas/Response"
      security:
        - Bearer: []
security:
  - Bearer: []
components:
  schemas:
    CallEntryWriteRequest:
      required:
        - callerName
        - callerType
      type: object
      properties:
        userName:
          maxLength: 254
          minLength: 1
          pattern: ^[^\u0000-\u001F\u007F]+$
          type: string
          description: Conditional interim M2M actor. Ignored when a configured token
            username claim exists; otherwise trimmed, opaque, required, and
            limited to 255 characters.
          nullable: true
        contracts:
          type: array
          items:
            $ref: "#/components/schemas/CallEntryWriteContractRequest"
          description: Optional contracts; missing, null, and empty are equivalent.
            Contract and call-type order is non-semantic for idempotency.
          nullable: true
        callerType:
          maxLength: 50
          minLength: 1
          pattern: ^[A-Za-z0-9 &'/-]+$
          type: string
          description: Required active caller-type name, trimmed and matched
            case-insensitively to its canonical tenant value.
          nullable: true
        callType:
          maxLength: 50
          minLength: 1
          pattern: ^[A-Za-z0-9 &'/-]+$
          type: string
          description: Canonical root call-type name. Required without contracts;
            otherwise supplies an inheritable default. If absent, every contract
            must supply at least one call type.
          nullable: true
        productType:
          maxLength: 50
          minLength: 1
          pattern: ^[A-Za-z0-9 &'/-]+$
          type: string
          description: Optional active product-type name resolved to its canonical tenant
            value.
          nullable: true
        priority:
          maximum: 255
          minimum: 0
          type: integer
          format: int32
          nullable: true
        notes:
          maxLength: 7000
          minLength: 1
          pattern: ^[A-Za-z0-9 &'/-]+$
          type: string
          nullable: true
        survey:
          maxLength: 10
          minLength: 1
          pattern: ^[A-Za-z0-9 &'/-]+$
          enum:
            - Not Offered
            - Taken
            - Not Taken
          type: string
          nullable: true
        isExchange:
          type: boolean
          nullable: true
        isSuspended:
          type: boolean
          nullable: true
        isFollowUpCompleted:
          type: boolean
          nullable: true
        followUpRequestedDate:
          type: string
          format: date-time
          nullable: true
        followUpCompletedDate:
          type: string
          format: date-time
          nullable: true
        suspendedUntilDate:
          type: string
          format: date-time
          nullable: true
        callTime:
          type: string
          format: date-time
          nullable: true
        callerName:
          maxLength: 500
          minLength: 1
          pattern: ^[A-Za-z ,.'-]+$
          type: string
          description: Required caller identity. Trimmed and limited to 500 characters.
          nullable: true
        phoneFaxNum:
          maxLength: 20
          minLength: 1
          pattern: ^\+?[0-9() .-]+$
          type: string
          format: tel
          nullable: true
        reference:
          maxLength: 200
          minLength: 1
          pattern: ^[A-Za-z0-9,-]+$
          type: string
          nullable: true
        isWatchOne:
          type: boolean
          nullable: true
        isWatchTwo:
          type: boolean
          nullable: true
        transactionType:
          maxLength: 50
          minLength: 1
          pattern: ^[A-Za-z0-9 &'/-]+$
          type: string
          description: Optional active transaction-type name resolved to its canonical
            tenant value.
          nullable: true
        isEscalated:
          type: boolean
          nullable: true
        initiatedDate:
          type: string
          format: date-time
          nullable: true
        completeInOrion:
          type: boolean
          nullable: true
        isWatchThree:
          type: boolean
          nullable: true
        transactionAmount:
          type: number
          format: double
          nullable: true
        sessionID:
          maxLength: 50
          minLength: 1
          pattern: ^[A-Za-z0-9._:-]+$
          type: string
          nullable: true
        authStatus:
          type: string
          nullable: true
        dob:
          type: string
          format: date-time
          nullable: true
        ssn:
          type: string
          nullable: true
        callSummary:
          maxLength: 7000
          minLength: 1
          pattern: ^[A-Za-z0-9 &'/-]+$
          type: string
          nullable: true
        callSummaryDate:
          type: string
          format: date-time
          nullable: true
        documentNumber:
          maxLength: 50
          minLength: 1
          pattern: ^[A-Za-z0-9,-]+$
          type: string
          nullable: true
        callId:
          maxLength: 50
          minLength: 1
          pattern: ^[A-Za-z0-9._:/-]+$
          type: string
          nullable: true
      additionalProperties: false
      description: Full-field name-based request shared by POST and PUT. Tenant
        selection and authorization never use payload userName.
    CallEntry:
      required:
        - callEntryID
        - clientCode
        - createdByUser
        - createdDate
        - lastUpdatedDate
      type: object
      properties:
        clientCode:
          minLength: 1
          type: string
        callEntryID:
          type: integer
          format: int32
        callerTypeID:
          type: integer
          format: int32
          nullable: true
        callerType:
          type: string
          nullable: true
        callTypeID:
          type: integer
          format: int32
          nullable: true
        callType:
          type: string
          nullable: true
        productTypeID:
          type: integer
          format: int32
          nullable: true
        productType:
          type: string
          nullable: true
        contract:
          type: string
          nullable: true
        priority:
          type: integer
          format: int32
          nullable: true
        notes:
          type: string
          nullable: true
        survey:
          type: string
          nullable: true
        isExchange:
          type: boolean
          nullable: true
        isSuspended:
          type: boolean
          nullable: true
        isFollowUpCompleted:
          type: boolean
          nullable: true
        followUpRequestedDate:
          type: string
          format: date-time
          nullable: true
        followUpCompletedDate:
          type: string
          format: date-time
          nullable: true
        suspendedUntilDate:
          type: string
          format: date-time
          nullable: true
        createdByUser:
          minLength: 1
          type: string
        createdDate:
          type: string
          format: date-time
        lastUpdatedDate:
          type: string
          format: date-time
        callTime:
          type: string
          format: date-time
          nullable: true
        callerName:
          type: string
          nullable: true
        phoneFaxNum:
          type: string
          nullable: true
        reference:
          type: string
          nullable: true
        isWatchOne:
          type: boolean
          nullable: true
        isWatchTwo:
          type: boolean
          nullable: true
        transactionTypeID:
          type: integer
          format: int32
          nullable: true
        transactionType:
          type: string
          nullable: true
        isEscalated:
          type: boolean
          nullable: true
        initiatedDate:
          type: string
          format: date-time
          nullable: true
        completeInOrion:
          type: boolean
          nullable: true
        isWatchThree:
          type: boolean
          nullable: true
        transactionAmount:
          type: number
          format: double
          nullable: true
        sessionID:
          type: string
          nullable: true
        authStatus:
          type: string
          nullable: true
        dob:
          type: string
          format: date-time
          nullable: true
        ssn:
          type: string
          nullable: true
        callSummary:
          type: string
          nullable: true
        callSummaryDate:
          type: string
          format: date-time
          nullable: true
        documentNumber:
          type: string
          nullable: true
        callId:
          type: string
          nullable: true
        contracts:
          type: array
          items:
            $ref: "#/components/schemas/CallEntryContract"
          nullable: true
      additionalProperties: false
    Response:
      type: object
      properties:
        message:
          type: string
          nullable: true
      additionalProperties: false
    CallEntryWriteContractRequest:
      required:
        - contractNumber
      type: object
      properties:
        contractNumber:
          maxLength: 50
          minLength: 1
          pattern: ^[A-Za-z0-9,-]+$
          type: string
          description: Trimmed contract number, unique case-insensitively within the
            request.
        callTypes:
          type: array
          items:
            maxLength: 50
            minLength: 1
            pattern: ^[A-Za-z0-9 &'/-]+$
            type: string
          description: Explicit active call-type names. Duplicate canonical values within
            a contract are rejected.
          nullable: true
      additionalProperties: false
    CallEntryContract:
      required:
        - callTypes
        - contractNumber
      type: object
      properties:
        contractNumber:
          minLength: 1
          type: string
        callTypes:
          type: array
          items:
            type: string
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: http
      description: Supply an OAuth bearer token obtained from Auth0.
      scheme: bearer
      bearerFormat: JWT
```
