Skip to main content
POST
/
api
/
v1
/
external
/
companies
/
{companyId}
/
policies
/
transaction
/
renew
Renew Policy Transaction
curl --request POST \
  --url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/transaction/renew \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fieldModelV1Data": {
    "policy": {
      "policyStatus": "active",
      "annualPremium": 90000,
      "fullTermPolicyInfo": {
        "policyStartDate": {
          "year": 2026,
          "month": 1,
          "day": 1,
          "timezone": "America/New_York"
        },
        "policyEndDate": {
          "year": 2027,
          "month": 1,
          "day": 1,
          "timezone": "America/New_York"
        },
        "previousPolicyId": "550e8400-e29b-41d4-a716-446655440001",
        "primaryInsuredJoin": "550e8400-e29b-41d4-a716-446655440010",
        "primaryInsuredName": "Mercy General Hospital"
      },
      "fullTermPolicyBillingInfo": {
        "policyPremium": 90000,
        "policyTaxes": 0,
        "policyFees": 500,
        "policyGrandTotal": 90500
      },
      "primaryInsured": {
        "id": "550e8400-e29b-41d4-a716-446655440010",
        "exposureType": "MedicalFacility",
        "bedCount": 120
      },
      "additionalExposures": []
    }
  }
}
'
{
  "policyId": "550e8400-e29b-41d4-a716-446655440060",
  "policyVersion": 1,
  "transactionId": "550e8400-e29b-41d4-a716-446655440061",
  "startDate": "2026-01-01",
  "endDate": "2027-01-01",
  "createdAt": "2025-12-15T10:30:00.000Z",
  "fullTermPolicyInfo": {
    "policyStartDate": {
      "year": 2026,
      "month": 1,
      "day": 1,
      "timezone": "America/New_York"
    },
    "policyEndDate": {
      "year": 2027,
      "month": 1,
      "day": 1,
      "timezone": "America/New_York"
    },
    "previousPolicyId": "550e8400-e29b-41d4-a716-446655440001",
    "primaryInsuredJoin": "550e8400-e29b-41d4-a716-446655440010",
    "primaryInsuredName": "Mercy General Hospital"
  },
  "fullTermPolicyBillingInfo": {
    "policyPremium": 90000,
    "policyTaxes": 0,
    "policyFees": 500,
    "policyGrandTotal": 90500
  },
  "fullTermPolicyRatingResult": null,
  "segments": [
    {
      "startDate": "2026-01-01",
      "endDate": "2027-01-01",
      "fieldModelV1Data": {
        "policy": {
          "policyStatus": "active",
          "annualPremium": 90000,
          "fullTermPolicyInfo": {
            "policyStartDate": {
              "year": 2026,
              "month": 1,
              "day": 1,
              "timezone": "America/New_York"
            },
            "policyEndDate": {
              "year": 2027,
              "month": 1,
              "day": 1,
              "timezone": "America/New_York"
            },
            "previousPolicyId": "550e8400-e29b-41d4-a716-446655440001",
            "primaryInsuredJoin": "550e8400-e29b-41d4-a716-446655440010",
            "primaryInsuredName": "Mercy General Hospital"
          },
          "fullTermPolicyBillingInfo": {
            "policyPremium": 90000,
            "policyTaxes": 0,
            "policyFees": 500,
            "policyGrandTotal": 90500
          },
          "primaryInsured": {
            "id": "550e8400-e29b-41d4-a716-446655440010",
            "exposureType": "MedicalFacility",
            "bedCount": 120
          },
          "additionalExposures": []
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication. Send your raw API key as the Authorization header value with NO scheme prefix — Authorization: YOUR-API-KEY. Do NOT prefix it with Bearer or ApiKey, and do not use an X-API-Key header; those are not accepted.

Path Parameters

companyId
string<uuid>
required

Company identifier

Body

application/json
fieldModelV1Data
object
required

Container for renewal policy state. Must contain a policy object with all policy-level fields.

Custom fields within the policy — including the values of any embedded exposure fields — are validated against your company's field configuration. Unknown fields are rejected, required fields must be present, and values must match their configured types (including option set membership). Embedded entity values are validated per-field against the embedded entity's own configuration.

transactionTimestamp
string<date-time>

When the business decision was made. Defaults to the current time if omitted. Set explicitly for imports (e.g., aligning to a bordereau booking date).

Response

Renewal policy created successfully

Response returned by policy transaction endpoints. Contains the policy version produced by the transaction, including all derived segments.

policyId
string<uuid>
required

Policy identifier

policyVersion
integer
required

Sequential version number produced by this transaction

transactionId
string<uuid>
required

Identifier of the transaction that produced this version

startDate
string<date>
required

Policy term start date (ISO 8601)

endDate
string<date>
required

Policy term end date (ISO 8601)

createdAt
string<date-time>
required

When the transaction was created (ISO 8601)

segments
object[]
required

Derived segments for this policy version. Each segment represents a maximal contiguous date range where policy state is identical. Adjacent segments with identical data are automatically merged.

fullTermPolicyInfo
object

Endorsable full-term policy info, hoisted as a read-once convenience (also duplicated in every segment). Contains term dates, the renewal pointer (previousPolicyId), and the primary insured reference. Term bounds are sourced here. Segment-scoped policyStatus is not part of this object.

fullTermPolicyBillingInfo
object

Derived full-term billing aggregates, hoisted as a read-once convenience (also duplicated in every segment). Contains premium, taxes, fees, and grand total for the full policy term.

fullTermPolicyRatingResult
object

Derived canonical policy-level rating result for the full term, hoisted as a read-once convenience (also duplicated in every segment). Element-level rating output (crossSegmentRatingOutputs) stays inline at its host and is not hoisted.