Dynamic Order

POST {{host_gateway}}/api/partner/orders/condensed/dynamic

Create an order from a previously given quote. You will still need to provide details of the order and details in the order will override those on the quote.

This endpoint does not require a productid but a programid. The product id is inferred based on additional constraints provided:

  • hostcountrystate - 2-letter State code
  • products (Optional)- Object containing either of the following keys:
    • ids - an array of product id's
    • uuids - an array of product uuid's

Request will only succeed if the provided constraints result in exactly 1 active product.

RESPONSES

status: Created

{"data":{"schema_version":1,"site_id":1,"quote_id":"6388da3cf57124e1a8016b12","order_number":"1-DEC804D-3A6D1BC7C2E7","client_id":123,"status":"Pending","premium":20,"total":20,"currency_id":"USD","status_updated_at":"2022-12-01T16:48:51.318000Z","ordered_at":"2022-12-01T16:48:51.318000Z","signed_at":"2022-07-09T00:00:00.000000Z","items":[{"id":"05725351-0ccb-4685-9648-407dba3e552d","product_id":1007,"program_id":10,"product_uuid":"b9add08c-39b4-4faf-bbc3-1ea8e6816859","sanction_search_id":0,"product_major_id":9,"product_minor_id":137,"policy_file_id":null,"policy_number":"1-DEC9648-407DBA3E552D-1","start_at":"2022-12-05","end_at":"2022-12-15","deposit_at":"2022-07-09","details":[{"id":"a45185d7-c339-436c-a229-7baa114e7f12","type":"package","detail":"Base Package","amount":20,"product_package_id":83},{"id":"a3495872-54ee-4935-a31f-b239ab7338db","type":"trip_cost","amount":1},{"id":"fd3c725f-e243-4212-aabc-686a89251ace","type":"premium","detail":"Policy premium","amount":20},{"id":"cbdd1c56-e53f-402e-9095-60860a9e1b59","type":"total","detail":"Policy total","amount":20}],"insured":{"first_name":"John","middle_name":"John","last_name":"Johnson","dob":"1997-01-05"},"beneficiary":{"first_name":"John","middle_name":"John","last_name":"Doe","email":"mail@example.com"},"destinations":[{"country_code":"US","country_name":null}],"order":{"quote_id":"6388da3cf57124e1a8016b12","currency_id":"USD","signed_at":"2022-07-09T00:00:00.000000Z","site_id":1,"applicant":{"first_name":"John","middle_name":"John","last_name":"Johnson","dob":"1997-01-05","age_at_travel":35,"email":"mail@example.com","contact_number":"00467344912","address":"123 test street","city":"test city","post_code":"0","country_code":"US","state_code":"OH","ip_address":"172.31.44.223"},"schema_version":1,"document_version":1,"status":"Pending","status_updated_at":"2022-12-01T16:48:51.318000Z","ordered_at":"2022-12-01T16:48:51.318000Z","order_number":"1-DEC804D-3A6D1BC7C2E7","premium":20,"total":20,"fees":0,"tax":0,"refund_amount":0,"is_refunded":false,"tax_rate":0,"client_id":123,"updated_at":"2022-12-01T16:48:51.915000Z","created_at":"2022-12-01T16:48:51.915000Z","_id":"6388daf3a239763c8306f888","meta":null},"meta":null}],"applicant":{"first_name":"John","middle_name":"John","last_name":"Johnson","dob":"1997-01-05","age_at_travel":35,"email":"mail@example.com","contact_number":"00467344912","address":"123 test street","city":"test city","post_code":"0","country_code":"US","country_name":null,"state_code":"OH","state_name":null,"ip_address":"172.31.44.223","signature":null},"affiliate":{"id":1,"commission_amount":0,"commission_percentage":0}}}