Skip to main content
POST
/
v1
/
policies
cURL
curl --request POST \
  --url https://dev-api-cj-agc-vie.fnstack.dev/v1/policies \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "price_id": "price_2dDbQOAQAJzPrWeZsrlVa4aCtQ3",
  "policy_type": "CLASSIC_SAVINGS",
  "beneficiaries": [
    {
      "last_name": "OKO",
      "phone_number": "242059758563",
      "first_name": "Yvette"
    }
  ],
  "policy_holder_id": "phol_2c1x7V4r47ynM4RABVm1Co0UKkG"
}
'
{
  "policy_id": "policy_2c1x7V4r47ynM4RABVm1Co0UKkG",
  "charge_id": "ch_2c1x7V4r47ynM4RABVm1Co0UKty"
}

Authorizations

x-api-key
string
header
required

Body

application/json
price_id
string
required
Minimum string length: 1
Example:

"price_2dDbQOAQAJzPrWeZsrlVa4aCtQ3"

policy_type
enum<string>
required
Available options:
CLASSIC_SAVINGS,
EDUCATIONAL_FORESIGHT,
MOBIL_PROTECT,
PENSION_SAVINGS
beneficiaries
object[]
required
policy_holder_id
string
required
Minimum string length: 1
Example:

"phol_2c1x7V4r47ynM4RABVm1Co0UKkG"

Response

'Create a policy' command accepted and ongoing

policy_id
string
required
Minimum string length: 1
Example:

"policy_2c1x7V4r47ynM4RABVm1Co0UKkG"

charge_id
string
required
Minimum string length: 1
Example:

"ch_2c1x7V4r47ynM4RABVm1Co0UKty"