Create a Quote
This guide walks through the end-to-end flow a shop integration uses to turn a price
estimate into a rental quote for an end customer: estimate prices, create a quote
request, then track the quote through its lifecycle. Every request is authenticated
with your X-Api-Key header.
The quote lifecycle
The three calls below drive a quote through the first stages of its server-side lifecycle. The complete state machine — generated directly from the code, so it always matches the API — is shown here and on the Lifecycle page.
Quote Lifecycle
The full server-side state machine of a rental quote, from draft to completion.
graph TB
place0(["in_progress"])
place1(("in_review"))
place2(("review_expired"))
place3(("change_requested"))
place4(("accepted_by_customer"))
place5(("rejected_by_customer"))
place6(("finance_review"))
place7(("manual_finance_review"))
place8(("finance_questions"))
place9(("finance_accepted"))
place10(("finance_rejected"))
place11(("completed"))
place12(("canceled"))
place0-->|"finalize"|place1
place2-->|"reactivate"|place1
place3-->|"apply_changes"|place1
place1-->|"accept_by_customer"|place4
place0-->|"accept_by_customer"|place4
place4-->|"request_finance_review"|place6
place0-->|"request_finance_review_direct"|place6
place6-->|"finance_accept"|place9
place7-->|"finance_accept"|place9
place8-->|"finance_accept"|place9
place10-->|"finance_accept"|place9
place9-->|"complete"|place11
place1-->|"request_changes"|place3
place6-->|"finance_needs_help"|place8
place7-->|"finance_needs_help"|place8
place4-->|"start_manual_finance_review"|place7
place0-->|"start_manual_finance_review"|place7
place1-->|"reject_by_customer"|place5
place1-->|"expire"|place2
place0-->|"cancel"|place12
place1-->|"cancel"|place12
place2-->|"cancel"|place12
place3-->|"cancel"|place12
place4-->|"cancel"|place12
place5-->|"cancel"|place12
place6-->|"cancel"|place12
place7-->|"cancel"|place12
place8-->|"cancel"|place12
place9-->|"cancel"|place12
place10-->|"cancel"|place12
place11-->|"cancel"|place12
place6-->|"finance_reject"|place10
place7-->|"finance_reject"|place10
place8-->|"finance_reject"|place10
place10-->|"finance_resume"|place9
Transitions (text alternative)
| Transition | From | To |
|---|---|---|
| finalize | in_progress | in_review |
| reactivate | review_expired | in_review |
| apply_changes | change_requested | in_review |
| accept_by_customer | in_review | accepted_by_customer |
| accept_by_customer | in_progress | accepted_by_customer |
| request_finance_review | accepted_by_customer | finance_review |
| request_finance_review_direct | in_progress | finance_review |
| finance_accept | finance_review | finance_accepted |
| finance_accept | manual_finance_review | finance_accepted |
| finance_accept | finance_questions | finance_accepted |
| finance_accept | finance_rejected | finance_accepted |
| complete | finance_accepted | completed |
| request_changes | in_review | change_requested |
| finance_needs_help | finance_review | finance_questions |
| finance_needs_help | manual_finance_review | finance_questions |
| start_manual_finance_review | accepted_by_customer | manual_finance_review |
| start_manual_finance_review | in_progress | manual_finance_review |
| reject_by_customer | in_review | rejected_by_customer |
| expire | in_review | review_expired |
| cancel | in_progress | canceled |
| cancel | in_review | canceled |
| cancel | review_expired | canceled |
| cancel | change_requested | canceled |
| cancel | accepted_by_customer | canceled |
| cancel | rejected_by_customer | canceled |
| cancel | finance_review | canceled |
| cancel | manual_finance_review | canceled |
| cancel | finance_questions | canceled |
| cancel | finance_accepted | canceled |
| cancel | finance_rejected | canceled |
| cancel | completed | canceled |
| finance_reject | finance_review | finance_rejected |
| finance_reject | manual_finance_review | finance_rejected |
| finance_reject | finance_questions | finance_rejected |
| finance_resume | finance_rejected | finance_accepted |
Build it step by step
POST
/api/calculate
Start by calculating rental prices for a product. You pass the acquisition cost, the product sector, and the durations and calculation types you want offers for. The response contains one offer per duration and calculation type — this is where the customer picks the terms that suit them. Keep the returned calculation: you reference it by its IRI in the next step.
curl -X POST 'https://sandbox.partner.miete24.com/api/calculate' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"acquisitionCost": 1000.23,
"productSector": "IT_AND_OFFICE_EQUIPMENT",
"paymentInterval": "monthly",
"calculationTypes": ["leasing", "rent_to_own"],
"durations": [24, 36, 48]
}'
const response = await fetch('https://sandbox.partner.miete24.com/api/calculate', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
acquisitionCost: 1000.23,
productSector: 'IT_AND_OFFICE_EQUIPMENT',
paymentInterval: 'monthly',
calculationTypes: ['leasing', 'rent_to_own'],
durations: [24, 36, 48],
}),
});
const calculation = await response.json();
{
"@id": "/api/calculations/2b1c9d7e-4f6a-4c2e-9b1a-8d3f5e7c1a2b",
"id": "2b1c9d7e-4f6a-4c2e-9b1a-8d3f5e7c1a2b",
"response": {
"offers": [
{ "duration": 36, "calculationType": "leasing", "rate": 32.90 }
]
}
}
Errors:
422 when the product sector cannot be resolved or a
duration is not allowed for the sector;
401 for a missing or invalid API key.
Full parameters, all operations & code samples → Calculation reference
POST
/api/quote_requests
Turn the calculation into a quote request by submitting the end customer's contact and address details together with the calculation IRI from step 1. The privacy policy acknowledgement is mandatory. A successful call creates the quote request and the quote that starts moving through the lifecycle above.
curl -X POST 'https://sandbox.partner.miete24.com/api/quote_requests' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"calculation": "/api/calculations/2b1c9d7e-4f6a-4c2e-9b1a-8d3f5e7c1a2b",
"customerType": "company",
"company": "Muster GmbH",
"firstName": "Erika",
"lastName": "Mustermann",
"email": "erika@muster-gmbh.example",
"street": "Hauptstrasse",
"houseNumber": "5",
"postalCode": "10115",
"city": "Berlin",
"country": "DE",
"acknowledgedPrivacy": true
}'
const response = await fetch('https://sandbox.partner.miete24.com/api/quote_requests', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
calculation: '/api/calculations/2b1c9d7e-4f6a-4c2e-9b1a-8d3f5e7c1a2b',
customerType: 'company',
company: 'Muster GmbH',
firstName: 'Erika',
lastName: 'Mustermann',
email: 'erika@muster-gmbh.example',
street: 'Hauptstrasse',
houseNumber: '5',
postalCode: '10115',
city: 'Berlin',
country: 'DE',
acknowledgedPrivacy: true,
}),
});
const quoteRequest = await response.json();
{
"@id": "/api/quote_requests/7d2f4a11-9c3b-4e8d-8a1f-6b5c2d9e0f34",
"id": "7d2f4a11-9c3b-4e8d-8a1f-6b5c2d9e0f34",
"email": "erika@muster-gmbh.example",
"customerType": "company"
}
Errors:
422 when a required field is missing, the email is
invalid, the calculation IRI is unknown, or acknowledgedPrivacy
is not true;
401 for a missing or invalid API key.
Full parameters, all operations & code samples → Quote Request reference
GET
/api/quotes/{id}
Follow the quote as it moves through the lifecycle by reading its
status — the states shown in the diagram above (for
example in_review, accepted_by_customer,
completed). Poll this endpoint, or subscribe to a webhook
to be notified on every change instead of polling.
curl -X GET 'https://sandbox.partner.miete24.com/api/quotes/{id}' \
-H 'X-Api-Key: YOUR_API_KEY'
const response = await fetch('https://sandbox.partner.miete24.com/api/quotes/{id}', {
method: 'GET',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
});
const quote = await response.json();
{
"@id": "/api/quotes/9f8e7d6c-5b4a-4938-8271-0a1b2c3d4e5f",
"id": "9f8e7d6c-5b4a-4938-8271-0a1b2c3d4e5f",
"status": "in_review"
}
Errors:
404 for an unknown quote id;
401 for a missing or invalid API key.
Full parameters, all operations & code samples → Quote reference
What's next
- Browse every endpoint and schema in the API Reference.
- See the complete state machine on the Lifecycle page.
- Get notified of status changes instead of polling — see the Webhook Endpoint reference.
- Financing and e-Signature guides follow in the next slices.