Create a project and a deeplink to it
This tutorial shows how to programmatically create an Aurora project and generate a deeplink to it.
How It Works
To create a project in Aurora, all you need is an address or geographic coordinates. On project creation, Aurora will return a project_id
which, together with tenant_id
, will enable you to create a deeplink to Aurora.
Getting Started
To complete this tutorial, you will need:
- your Aurora tenant to be on the Custom or Business plan,
- your Aurora tenant to use the current API version,
- your Aurora bearer token,
- your Aurora
tenant_id
.
You or any Administrator for your Aurora tenant can retrieve the token and tenant_id
from the API Settings page.
Step 1. Create a project.
Create a project using a street address
//POST https://api-sandbox.aurorasolar.com/tenants/{tenant_id}/projects
{
"project": {
"address": "434 Brannan St, San Francisco, CA, 94107"
}
}
or geographic coordinates.
//POST https://api-sandbox.aurorasolar.com/tenants/{tenant_id}/projects/tenants/{tenant_id}/projects
{
"project": {
"latitude": 37.7796,
"longitude": -122.3953
}
}
If you are using geographic coordinates, we will rely on them to place a pin on the map to indicate the exact site location.
Step 2. Take project id returned by the previous call and generate a deeplink.
//HTTP 200 response
{
"project": {
"id": "011659b1-1070-47f8-bfff-e68b0520a5c0",
"external_provider_id": null,
"name": null,
"customer_salutation": null,
"customer_first_name": null,
"customer_last_name": null,
"customer_address": "426 Brannan St, San Francisco, CA 94107, USA",
"customer_email": null,
"customer_phone": null,
"address": "426 Brannan St, San Francisco, CA 94107, USA",
"latitude": 37.7796,
"longitude": -122.3953,
"project_type": "residential",
"owner_id": null,
"status": null
}
}
The deeplink for this project in your production tenant would be
<https://v2.aurorasolar.com/projects/3fa85f64-5717-4562-b3fc-2c963f66afa6
>
The deeplink for this project in your sandbox tenant would be
<https://v2-sandbox.aurorasolar.com/projects/3fa85f64-5717-4562-b3fc-2c963f66afa6
>
Considerations
- When providing coordinates, specify as many digits after the decimal as possible. Otherwise, the pin placed by Aurora might or might not be on the intended structure.
- After you create a design for a project (e.g., via Design Requests API), you can generate a deeplink to a specific page in Sales Mode for that design.
- The deeplink to the overview page in Sales Mode in your production tenant would be
<https://v2.aurorasolar.com/projects/{project_id}/designs/{design_id}/e-proposal/overview
> - The deeplink to the overview page in Sales Mode in your sandbox tenant would be
<https://v2-sandbox.aurorasolar.com/projects/{project_id}/designs/{design_id}/e-proposal/overview
>
- The deeplink to the overview page in Sales Mode in your production tenant would be
Updated 6 months ago