Introduction
This document shows all API calls performed by Daylight Renders to Hubspot endpoints.
Time by time, we call always the same Hubspot endpoint but with different payloads.
All calls have Method: "POST" with Content-Type: "application/json".
Step 1
This call is performed after the end user submits the first step of the new-project form (eg: https://stage.daylightrenders.com/de/new-project)
Body Parameters
| Parameter | Type | Description | Accepted values |
|---|---|---|---|
| string | the end user email | ||
| firstname | string | the end user name | |
| lastname | string | the end user lastname | |
| city | string | the end user city | |
| phone | string | the end user phone | |
| voucher_daylight | string | the end user voucher token | |
| privacy1 | boolean | true if client has accepted the privacy checkbox | |
| privacy2 | boolean | true if client has accepted marketing checkbox | |
| step_daylight | string | the next wizard step | step2 |
| step_url | string | the url to send the client back to this step | randomly generated base64 string |
| bb_lang | string | the project competency area/market | at, de, de-CH, dk, es, fr-BE, fr-CH, hr, it, it-CH, nl, nl-BE, no, pl, se, si, uk |
| project_source | string | where the project has been created, from the public site or from the coordinator backoffice | frontend, backend |
| send_notification | string | when a project has project_source = backend, the coordinator may silence all hubspot notifications | yes, no |
| reseller_email | string | if the project form is made by a reseller, we add to the payload this field |
Example of step 1 payload:
{
"email":"foo.bar@example.com",
"firstname":"Foo",
"lastname":"Bar",
"city":"123 Munich",
"phone":"123456789",
"voucher_daylight":"VHW-TV6U-TTGX-AAAA",
"privacy1":true,
"privacy2":true,
"step_daylight":"step2",
"step_url":"mDcLs1o7Lgy4Z0D_-orereLm-95N8hFP-",
"bb_lang":"de",
"project_source":"frontend",
"send_notification":"yes"
}
If the project form is made by a reseller, we add to the payload this field:
{
"reseller_email": "string, the reseller email"
}
Step 2
This call is performed after the end user submits the second step of the project form
Body Parameters
| Parameter | Type | Description | Accepted values |
|---|---|---|---|
| string | the end user email | ||
| voucher_daylight | string | the end user voucher token | |
| room_orientation | string | the room orientation | east, west, north, south |
| room_description | string | custom input, field for V-UK only | |
| renovation | boolean | true if end user considers to renovate the roof | true, false |
| number_of_windows | integer | field for V-DE of kind DIY | |
| room_type | string | the chosen room type | kitchen, living, bathroom, bedroom, kids_room, aisle, attic, home_office, empty_room |
| room_position | string | the chosen room position | attic, top_floor, tenants_upstair |
| roof_specification | string | the chosen roof specification | for V-DE: flat, slanted_without_side, slanted_with_side, slanted_with_drempel_knee_stick; for other markets: slanted, flat |
| room_m2 | integer | the chosen room square meters, field for V-DE, nl-BE, fr-BE | |
| product_type | string | the selected product type | V-DE only: lichtband, lichtband_wand, quartett, raum, panorama, cabrio, dachbalkon, studio_fenster_3_in_1, konvex_glas_flachdach_fenster, inspire_me |
| step_daylight | string | the next wizard step | step3 |
| step_url | string | the url to send the client back to this step | randomly generated base64 string |
Example of step 2 payload:
{
"email":"foo.bar@example.com",
"voucher_daylight":"VHW-TV6U-TTGX-AAAA",
"room_type":"living",
"room_position":"",
"roof_specification":"slanted_without_side",
"room_m2":25,
"product_type":"cabrio",
"number_of_windows":null,
"step_daylight":"step3",
"step_url":"yp0QJdRSKAMPVp70tzZl7ml3-4P1Pf8b"
}
Step 3
This call is performed after the end user submits the third step of the project form
Body Parameters
| Parameter | Type | Description | Accepted values |
|---|---|---|---|
| string | the end user email | ||
| voucher_daylight | string | the end user voucher token | |
| step_daylight | string | the next wizard step | summary |
| step_url | string | the url to send the client back to this step | randomly generated base64 string |
Example of step 3 payload:
{
"email":"foo.bar@example.com",
"voucher_daylight":"VHW-TV6U-TTGX-AAAA",
"step_daylight": "z8ftokF4kuCu1eudgffEfXzKfwe4EQ07",
"step_url": "summary"
}
Step 4
This call is performed after the end user submits the forth step of the project form (the summary step)
Body Parameters
| Parameter | Type | Description | Accepted values |
|---|---|---|---|
| string | the end user email | ||
| voucher_daylight | string | the end user voucher token | |
| step_daylight | string | the next project status | user_submitted |
| step_url | string | the url to send the client back to this step | randomly generated base64 string |
Example of step 4 payload:
{
"email":"foo.bar@example.com",
"voucher_daylight":"VHW-TV6U-TTGX-AAAA",
"step_daylight": "z8ftokF4kuCu1eudgffEfXzKfwe4EQ07",
"step_url": "user_submitted"
}
When end user goes back in the project form
This call is performed after the user clicks on the back button while he is in the project form.
Body Parameters
| Parameter | Type | Description | Accepted values |
|---|---|---|---|
| string | the end user email | ||
| voucher_daylight | string | the end user voucher token | |
| step_daylight | string | the previous wizard step | step2, step3 |
| step_url | string | the url to send the client back to this step | the url to send the client back to this step (depends on step where you press back (step2, step3) |
Example of back payload:
{
"email":"foo.bar@example.com",
"voucher_daylight":"VHW-TV6U-TTGX-AAAA",
"step_daylight": "step2",
"step_url": "yp0QJdRSKAMPVp70tzZl7ml3-4P1Pf8b"
}
When a project is published
This call is performed after the coordinator publish a project. The project moves from "work completed" to "published" status.
Body Parameters
| Parameter | Type | Description | Accepted values |
|---|---|---|---|
| string | the end user email | ||
| voucher_daylight | string | the end user voucher token | |
| step_daylight | string | the next project status | delivered |
| final_url | string | the public absolute url of the published project |
Example of project published payload:
{
"email":"foo.bar@example.com",
"voucher_daylight":"VHW-TV6U-TTGX-AAAA",
"step_daylight": "delivered",
"final_url": "https://www.daylightrenders.com/de/client/projects/final/tgYgwdwJjqEep7vNmkUoyeAN633t57sw"
}
When a project is archived
This call is performed after the coordinator publish a project. The project moves from "work completed" to "published" status.
Body Parameters
| Parameter | Type | Description | Accepted values |
|---|---|---|---|
| string | the end user email | ||
| voucher_daylight | string | the end user voucher token | |
| step_daylight | string | the next project status | archived |
| step_url | string | the url to send the client back to this step | archived |
Example of project archived payload:
{
"email":"foo.bar@example.com",
"voucher_daylight":"VHW-TV6U-TTGX-AAAA",
"step_daylight": "archived",
"step_url": "archived"
}
When a project is un-archived
This call is performed after the coordinator un-archive a project. The project moves from "archived" to status before archivization action. This call is useful only for projects that were published before being archived.
Body Parameters
| Parameter | Type | Description | Accepted values |
|---|---|---|---|
| string | the end user email | ||
| voucher_daylight | string | the end user voucher token | |
| step_daylight | string | the status of the project before archiving | user_submitted |
| step_url | string | the url to send the client back to this step | archived |
Example of project unarchived payload:
{
"email":"foo.bar@example.com",
"voucher_daylight":"VHW-TV6U-TTGX-AAAA",
"step_daylight": "user_submitted",
"step_url": "z8ftokF4kuCu1eudgffEfXzKfwe4EQ07"
}
Endpoint for asking a new voucher
This call is performed by Hubspot to ask the generation of a new Voucher code, associated to given email and Hubspot application. The email comes form the landig pages created by Hubspot to achieve new customers.
Endpoint: /api/v1/voucher
Content-Type: application/json
Athentication: Bearer xyz
Body Parameters
| Parameter | Type | Description | Accepted values |
|---|---|---|---|
| string | the end user email | ||
| application | string | the Hubspot application id associated to a specific market |
Example of new voucher request payload:
{
"created_for_email": "john.doe@example.com",
"application": "2366059"
}
Example of voucher response payload:
{
"result": "Y4FF-6STP-YXS3"
}