Skip to content

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.

Transitions (text alternative)
Transitions of Quote Lifecycle
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]
  }'
Response 200 (truncated)
{
  "@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
  }'
Response 201 (truncated)
{
  "@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'
Response 200 (truncated)
{
  "@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.