Skip to main content
PATCH
/
insurancepolicies
/
{id}
Update an existing Insurance Policy
curl --request PATCH \
  --url https://commerce.driv.ly/api/insurancepolicies/{id} \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "insp_4dkf9v0s3j4s",
  "insurer": {
    "id": "ins_9k2d8sj3hdk2"
  },
  "consumer": {
    "id": "con_2k4jd93vsd82",
    "ssn": "123-45-6789",
    "email": "john.doe@example.com",
    "lastName": "Doe",
    "birthDate": "1984-09-20",
    "firstName": "John",
    "phoneNumber": "555-0199"
  },
  "policyNumber": "POL123456789"
}'
{
  "data": {
    "id": "insp_4dkf9v0s3j4s",
    "insurer": {
      "id": "ins_9k2d8sj3hdk2"
    },
    "consumer": {
      "id": "con_2k4jd93vsd82",
      "ssn": "123-45-6789",
      "email": "john.doe@example.com",
      "lastName": "Doe",
      "birthDate": "1984-09-20",
      "firstName": "John",
      "phoneNumber": "555-0199"
    },
    "policyNumber": "POL123456789"
  },
  "success": true
}

Path Parameters

id
string
required

Insurance Policy is uniquely identified by id

Query Parameters

depth
integer

The number of levels of related objects to include in the response

Body

application/json
id
string

Insurance Policy is uniquely identified by id

consumer

Insurance Policy is owned by Consumer

policyNumber
string

Insurance Policy has Policy Number

insurer

Insurance Policy is issued by Insurer

Response

Insurance Policy Updated

data
object
Examples:
{
"id": "insp_4dkf9v0s3j4s",
"insurer": { "id": "ins_9k2d8sj3hdk2" },
"consumer": {
"id": "con_2k4jd93vsd82",
"ssn": "123-45-6789",
"email": "john.doe@example.com",
"lastName": "Doe",
"birthDate": "1984-09-20",
"firstName": "John",
"phoneNumber": "555-0199"
},
"policyNumber": "POL123456789"
}
success
boolean
I