Create Order

V1

post /insurance/motor/v1/orders

This endpoint to create order.

Request Header
Name Type Required Description
authorization string Required Bearer token
content-type string Required application/json
Request Body
Name Type Required Description
trans_no string Required Unique string that the client can create to track the current request call.
lang string Required Policy language
  • en
  • th
status string Required The intent to either create insurance policy immediately or create the policy after order confirmation.

The possible values are:

  • Created Partner intends to create policy after the customer makes a order.
  • Draft Partner intends to create order and continue after the customer makes a payment. Order are best captured within one day before the coverage start date. After that, the order expires and you must re-create the order.
quotation_id guid Required The quotation id is used for issuing the policy
total_premium decimal(18,2) Required Total premium according to quotation
reg_no string Conditional Vehicle license plate

Condition: This field is required when "is_red" is "false"

engine string Optional Engine number

Max length: 30

chassis string Required Chassis number is a serial number used to identify a motor vehicle

Max length: 19

color_code string Required Color
battery_serial_no string Optional Replacement battery serial number
insured object Required Json object containing details of the Insured
long_names array[object] Optional Json object containing details of the Array
drivers array[object] Conditional Json object containing details of the Driver

Condition: Depending on the details in the quotation.

beneficiaries array[object] Optional Json object containing details of the Beneficiary
accessories array[object] Optional Json object containing details of the accessory
call_back string Optional Callback URL is an address that a partner provides for AXA to POST back policy data
delivery_options object Optional Option to send policy-related attachments via email.
Json object containing details of the Delivery Options
transaction_by string Required Globally unique identifier value of the user id Provided by AXA
Example request
{
    "lang":"th",
    "status": "Created",
    "trans_no": "BB083044acf0140044",
    "quotation_id": "2f6fcdaa-3107-4e80-7b3c-08d9935205ef",
    "total_premium": 375.02,
    "engine": "R18Z1224105",
    "chassis": "BBB2630DP014-044",
    "color_code": "002",
    "insured": {
        "client_type": "P",
        "title_code": "004",
        "first_name": "Test",
        "last_name": "System",
        "birth_date": "1970-05-04",
        "gender": "F",
        "marital_code": "S",
        "card_type": "I",
        "corporate_name1": "",
        "corporate_name2": "",
        "tax_id": "0000000000001",
        "branch": "",
        "address_type": "R",
        "address1": "999/9 หมุ่ 1",
        "address2": "",
        "address3": "",
        "sub_district_code": "840407",
        "district_code": "8404",
        "province_code": "84",
        "postal_code": "84330",
        "country_code": "THA",
        "nationality_code": "THA",
        "phone_number1": "0999999999",
        "phone_number2": "",
        "phone_number3": "",
        "email": "example@axa.co.th"
    },
    "long_names": [],
    "drivers": [],
    "remarks": [],
    "beneficiaries": [],
    "accessories": [],
    "call_back":"",
    "delivery_options":[
        {
            "option_key": "EmailPolicyHolder",
            "option_value": ""
        }
    ],
    "transaction_by": "8C890CB2-9FAD-4953-BCC7-E54B9ACE827C"
}
Response
Name Type Description
trans_no string Unique string the client made the request
status string Order status
  • Created
  • Draft
message string
order_id string Unique Order id
policies array[object] Array of Policy
Example response : create order with "created" status
{
    "trans_no": "AXA-22-000246",
    "status": "Created",
    "message": "",
    "order_id": "4e762df1-3bb5-40ec-3565-08qa439ae0fd",
    "policies": [
        {
            "policy_id": "d6fe1816-d847-4563-8a95-38fcb085276c",
            "policy_no": "P5000166",
            "policy_type": "Compulsory",
            "package": "Compulsory",
            "downloads": [
                {
                    "type": "Schedule",
                    "layer": "Original",
                    "link": "https://uatapiconnect.axa.co.th/report/d312af4ae978432596ed1b3931be74c8",
                    "header": true
                },
                {
                    "type": "Taxinvoice",
                    "layer": "Original",
                    "link": "https://uatapiconnect.axa.co.th/report/d1b756345d6c4dcfb3268ca79d09b3b7",
                    "header": true
                },
                {
                    "type": "Schedule",
                    "layer": "Copy",
                    "link": "https://uatapiconnect.axa.co.th/report/b89742e607cd4763ab5f571ddb843078",
                    "header": true
                },
                {
                    "type": "Taxinvoice",
                    "layer": "Copy",
                    "link": "https://uatapiconnect.axa.co.th/report/3a89d7e3e51d4a8f8f43d67ad8f7c3d5",
                    "header": true
                },
                {
                    "type": "PolicyWording",
                    "layer": "Original",
                    "link": "https://uatconnect.axa.co.th/downloads/EUKEGKXPJGXYCYL",
                    "header": true
                }
            ],
            "links": [
                {
                    "href": "https://uatapiconnect.axa.co.th/insurance/motor/v3/policies/d6fe1816-d847-4563-8a95-38fcb085276c/cancel?hash=Oi7xpnY7BGRdJyCiC9WIaoFRDkndM165",
                    "rel": "cancel_policy",
                    "method": "PUT"
                }
            ]
        }
    ]
}
Example response : create order with "draft" status
{
    "trans_no": "AXA-22-000246",
    "status": "Draft",
    "message": "",
    "order_id": "4e762df1-3bb5-40ec-3565-08qa439ae0fd",
    "policies": []
}
Policy Reference
Name Type Description
policy_id guid Policy id
policy_no string Policy number
policy_type string Type of policy
  • Compulsory
  • Voluntary
package string Package name
downloads array[object] Array of Download
links array[object] Array of Link
Download Reference
Name Type Description
type string Type of download
  • Schedule
  • Taxinvoice
  • KnockForKnock
layer string Type of layer
  • Original
  • Copy
link string Hyperlink points to a whole document
header bool With document header
Name Type Description
method string HTTP method

e.g. GET, PUT, POST

rel string Used to describe the action of a link

e.g. cancel_policy

href string Endpoint to take action
Array Reference
Name Type Required Description
text string Required Text is anything that conveys a set of meanings
Driver Reference
Name Type Required Description
title_code string Conditional Title code

Condition: This field is required when client_type is "P"

Refer to Master Title

first_name string Required First name

Max length: 30

last_name string Required Last name

Max length: 30

birth_date date Required Date of birth e.g. 1985-09-27

Format: yyyy-mm-dd

Condition: The driver is at least 18 years old but not over 100 years old.

gender string Required Type of gender
  • M : Male
  • F : Female
  • Z : Unknow
marital_code string Required Marital status
  • S : Single
  • M : Married
  • W : Widowed
  • D : Divorced
tax_id string Required

Max length: 20

Condition: This field should be "Citizen ID" value when card_type is "I" and "Passport Number" value when card_type is "P"

country_code string Required Country code (Based on ISO 3166)

Refer to Master Country

nationality_code string Required Nationality code (Based on ISO 3166)

Refer to Master Nationality

driver_license string Required Car driving licence number
Beneficiary Reference
Name Type Required Description
code string Conditional Beneficiary Code

Condition: Choose from existing beneficiaries

Refer to Beneficiary

client_type string Required Client Type
  • C : Corporate
  • P : Personal
title_code string Required Title code

Condition: This field is required when client_type is "P"

Refer to Master Title

first_name string Required Beneficiary person's first name

Max length: 30

Condition: This field is required when client_type is "P"
last_name string Required Beneficiary person's last name

Max length: 30

Condition: This field is required when client_type is "P"
corporate_name string Required

Max length: 60

Condition: This field is required when client_type is "C"
relation_code string Required Relation code
  • HP
tel string Optional
Accessory Reference
Name Type Required Description
brand string Required Accessory brand

e.g. Recaro

Max length: 100

item string Required Text is anything that conveys a set of meanings

e.g. Recaro Sportster CS(Black)

Max length: 100

amount int Optional e.g. 10000
Insured Reference
Name Type Required Description
client_type string Required Client Type
  • C : Corporate
  • P : Personal
title_code string Conditional Title code

Condition: This field is required when client_type is "P"

Refer to Master Title

first_name string Conditional First name

Max length: 30

Condition: This field is required when client_type is "P"
last_name string Conditional Last name

Max length: 30

Condition: This field is required when client_type is "P"
birth_date date Required Date of birth e.g. 1985-09-27

Format: yyyy-mm-dd

Condition: The insured is at least 18 years old but not over 100 years old.

gender string Required Type of gender
  • M : Male
  • F : Female
  • Z : Unknow
marital_code string Required Marital status
  • S : Single
  • M : Married
  • W : Widowed
  • D : Divorced
card_type string Conditional Card Type
  • I : Citizen ID
  • P : Passport Number

Condition:

- This field must be "I" when client_type is "C"

- This field must be "I" or "P" when client_type" is "P"

corporate_name1 string Conditional

Max length: 60

Condition: This field is required when client_type is "C"
corporate_name2 string Optional

Max length: 60

tax_id string Required

Max length: 20

Condition: This field should be "Citizen ID (Tax Id)" value when card_type is "I" and "Passport Number" value when cardType is "P"

branch string Conditional Branch name of customer company

Max length: 30

Note: If there is no branch, specify สำนักงานใหญ่ or Head Office

Condition: This field is required when client_type is "C"
address_type string Required Address Type
  • B : Office
  • R : Home
  • P : Postal
address1 string Required Address

Max length: 30

address2 string Optional

Max length: 30

address3 string Optional

Max length: 30

sub_district_code string Required Sub district code

Refer to Master Sub District

district_code string Required District code

Refer to Master District

province_code string Required Province code

Refer to Master Province

postal_code string Required Postal code e.g. 12000
country_code string Required Country code (Based on ISO 3166)

Refer to Master Country

nationality_code string Required Nationality code (Based on ISO 3166)

Refer to Master Nationality

phone_number1 string Conditional

Condition: This field is required when policy_type is voluntary and package_key are "type1"

phone_number2 string Optional
phone_number3 string Optional
email string Optional Email address
Delivery Options Reference
Name Type Required Description
option_key string Required The possible values are
  • EmailPolicyHolder
  • EmailOther
option_value string Conditional Use ";" as a delimiter for multiple emails.
e.g. example@axa.co.th; partner@axa.co.th

Max length: 2000

Condition: This field is required when option_key is "EmailOther"