Track plan set requests
This tutorial shows how to track the status of your plan set request and retrieve the completed plan set.
How It Works
With plan_set_status_changed
webhook event, you can track the status of your plan set request and sync it with your internal systems. On request completion, you can use the Retrieve Plan Set API endpoint to retrieve the plan set PDF and CAD view of the design the plan set was created for.
Getting Started
To complete this tutorial, you will need:
- your Aurora tenant to be on a Business plan,
- your Aurora API key to be provisioned with access to the Plan Sets API,
- your Aurora tenant to use API version v2022.09 or newer,
- your Aurora bearer token,
- your Aurora
tenant_id
, - URL to deliver Aurora webhooks to.
You or any Administrator for your Aurora tenant can retrieve the token and tenant id from the API Settings page. Also, your Aurora account team can make sure that the Plan Sets API is provisioned for your API key.
Step 1. Subscribe to plan_set_status_changed webhook event.
Subscribe to plan_set_status_changed
webhook event, pointing the webhooks to your application that will process them. See Webhooks for more details.
Step 2. Store the status of the plan set request returned in the the webhook payload.
Every time a plan set status changes, you’ll receive a webhook with the latest status. Store the status in your system.
//Webhook query string payload
?plan_set_request_id=b39767db-bd73-4d9d-ac5a-24a000ad03ed&status=submitted
Step 3. On plan set completion, retrieve and store the plan set.
On receiving a webhook with completed
status, use the plan_set_request_id
provided in the payload to retrieve the plan set document in the PDF format and, if desired, the CAD view of the design that the plan set was created for.
//GET <https://api-sandbox.aurorasolar.com/tenants/{tenant_id}/plan_set_requests/{plan_set_request_id}/plan_set
//HTTP 200 response
{
"plan_set": {
"plan_set_request_id": "b39767db-bd73-4d9d-ac5a-24a000ad03ed",
"design_cad_view_url": "https://v2.aurorasolar.com/projects/60ac2924-78f5-4bbc-90a3-3cd1a2e90d54/designs/4406e8c7-5f3d-4037-8bc4-ea84aea8710c/cad",
"plan_set_document_url": "https://some-host.com/some-path/file.pdf"
}
}
Considerations
- See Plan Sets API docs for more details on the Aurora plan set workflow.
- Consider using a webhook test site like https://webhook.site to verify that your webhook subscription is live.
Updated 6 months ago