Skip to main content

Accept Insurance Offer

Accepts an insurance offer for a declaration in the system.

Request

POST /api/v1/declarations/{declaration_id}/insurances/{insurance_id}/accept

Parameters

NameTypeInDescription
declaration_idstringpathRequired. The ID of the declaration
insurance_idstringpathRequired. The ID of the insurance offer

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication
X-Target-ServerRequired. Target server identifier

Example

curl --request POST \
--url '{{HOST}}/api/v1/declarations/67db101b6f7e65dcdd379d6f/insurances/682338497ac580beda9d7f7c/accept' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'X-Target-Server: declaration'

Response

A successful request returns an HTTP 200 status code with "OK" response.

Status Codes

Status CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing authentication token
404Not Found - Declaration ID or Insurance ID does not exist
500Internal Server Error

Notes

  • This endpoint is used to accept an existing insurance offer for a declaration.
  • The user must have appropriate permissions to accept insurance offers.
  • After accepting an insurance offer, the declaration status will be updated accordingly.