Fired once, right after an order is created.
When: once, right after an order is created (API, module or dashboard), while it is still a draft.
| Field | Type | Description |
|---|---|---|
id | string | GreenLeaze order id. |
cartId | string | null | |
cartSecureKey | string | null | |
source | string | null | Order origin. |
shop | Shop | Without email. |
customer | Customer | Falls back to the checkout identity. |
email | string | null, optional | Legacy |
firstName | string | null, optional | Legacy |
lastName | string | null, optional | Legacy |
commitment | Interval | Initial commitment. |
paymentInterval | Interval | Billing period. |
products | line[] | All order lines, services included. |
products[]: greenleazeId, id, combinationId, name, price (unit HT), vat, purchaseFeesPercentage, quantity, category as in the product line, plus rentalPriceTTC: monthly rent TTC of the line before monthly discount. There is no priceWithDiscount.
{
"cartId": "cart_abc123",
"cartSecureKey": "key_xyz789",
"source": "dashboard",
"id": "5b0f7c1e-2d7a-4a59-9d6b-3c1f0e0c9a11",
"shop": { "id": "0d6e…", "name": "Ma Boutique", "group": { "id": "7a1c…" } },
"customer": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "[email protected]",
"phone": "+33612345678"
},
"commitment": { "referenceDate": null, "unit": "monthly", "value": 12 },
"paymentInterval": { "referenceDate": null, "unit": "monthly", "value": 1 },
"products": [
{
"greenleazeId": "c3f1…",
"id": "8812",
"combinationId": "8812-2",
"name": "MacBook Pro 14\"",
"price": 2082.5,
"vat": 20,
"purchaseFeesPercentage": 10,
"rentalPriceTTC": 89.9,
"quantity": 1,
"category": "4b9e…"
}
]
}