Showing purchases

In this URL you are able to check for purchasing status and collect the Coverage Letter link for download as soon as the status is set to finished. You must pass in the URL the Purchase ID informed in the previous call (see Purchasing insurance)

GET https://insurance-api.paycertify.com/api/purchases/{id}

Parameter Type Presence Description Example
id uuid required The purchase ID bd8f819e-4951-441f-83bb-56f9a28648e0
Field Type Description Example
id uuid Purchase ID bd8f819e-4951-441f-83bb-56f9a28648e0
created_at timestamp Created at 2018-04-12T21:07:59.508Z
updated_at timestamp Updated at 2018-04-12T21:07:59.508Z
status string The purchase status (waiting, processing, purchased, invalid, error) processing
quote_option_id uuid The quote options selected whento create the purchase. 2b0e8eb8-be4e-4c8e-a3d2-b2c6e95be608
coverage_letter_url string The coverage letter URL. This will be null unless the status is ‘purchased’. https://insurance-api.paycertify.com/api/purchases/2c4de833/coverage_letter
curl --request GET \
  --url https://insurance-api.paycertify.com/api/purchases/bd8f819e-4951-441f-83bb-56f9a28648e0 \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \

Responds with:

{
  "purchase": {
    "id": "bd8f819e-4951-441f-83bb-56f9a28648e0",
    "created_at": "2018-04-12T21:07:59.508Z",
    "updated_at": "2018-04-12T21:07:59.508Z",
    "status": "purchased",
    "quote_option_id": "2b0e8eb8-be4e-4c8e-a3d2-b2c6e95be608",
    "coverage_letter_url": "https://insurance-api.paycertify.com/api/purchases/2c4de833/coverage_letter"
  }
}