Cart
Shopping cart and checkout.
POST/api/carts
Creates a Cart resource.
Creates a cart and returns its financing options. A cart holds items of one article type only. The article type follows the productSector of each item: IT_AND_OFFICE_EQUIPMENT and HOME_AND_ENTERTAINMENT_ELECTRONICS are ITK, TESVOLT_ENERGY_STORAGE is TESVOLT, and every other sector is NON_ITK. The category does not decide the article type. A cart whose items have different article types is rejected with 422.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| items | array<CartItemCreateDto-cart.create> | yes |
Example request
{
"items": [
{
"productNumber": "P-100200",
"productName": "Industrial Drill Press",
"productSku": "SKU-DRILL-5000",
"quantity": 2,
"price": 4540.11,
"productOptions": {
"color": "blue",
"size": "M"
},
"categoryId": 3,
"categorySlug": "hardware",
"devices": [
{
"bwBaselineCount": 1000,
"bwBaselinePrice": 0.01,
"bwOveragePrice": 0.02,
"colorBaselineCount": 200,
"colorBaselinePrice": 0.05,
"colorOveragePrice": 0.07,
"scanBaselineCount": 300,
"scanBaselinePrice": 0.03,
"scanOveragePrice": 0.04,
"locked": false
},
{
"bwBaselineCount": 1500,
"bwBaselinePrice": 0.01,
"bwOveragePrice": 0.02,
"locked": false
}
]
}
]
}
Code samples
curl -X POST 'https://sandbox.partner.miete24.com/api/carts' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"items":[{"productNumber":"P-100200","productName":"Industrial Drill Press","productSku":"SKU-DRILL-5000","quantity":2,"price":4540.11,"productOptions":{"color":"blue","size":"M"},"categoryId":3,"categorySlug":"hardware","devices":[{"bwBaselineCount":1000,"bwBaselinePrice":0.01,"bwOveragePrice":0.02,"colorBaselineCount":200,"colorBaselinePrice":0.05,"colorOveragePrice":0.07,"scanBaselineCount":300,"scanBaselinePrice":0.03,"scanOveragePrice":0.04,"locked":false},{"bwBaselineCount":1500,"bwBaselinePrice":0.01,"bwOveragePrice":0.02,"locked":false}]}]}'
const response = await fetch('https://sandbox.partner.miete24.com/api/carts', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"items":[{"productNumber":"P-100200","productName":"Industrial Drill Press","productSku":"SKU-DRILL-5000","quantity":2,"price":4540.11,"productOptions":{"color":"blue","size":"M"},"categoryId":3,"categorySlug":"hardware","devices":[{"bwBaselineCount":1000,"bwBaselinePrice":0.01,"bwOveragePrice":0.02,"colorBaselineCount":200,"colorBaselinePrice":0.05,"colorOveragePrice":0.07,"scanBaselineCount":300,"scanBaselinePrice":0.03,"scanOveragePrice":0.04,"locked":false},{"bwBaselineCount":1500,"bwBaselinePrice":0.01,"bwOveragePrice":0.02,"locked":false}]}]}),
});
const data = await response.json();
Responses
| Status | Description | Schema |
|---|---|---|
| 201 | Cart resource created | Cart.CartFinancingResponse-cart.financing |
| 400 | Invalid input | — |
| 422 | Unprocessable entity. A field is missing or invalid, or the cart items have different article types. A cart with items of different article types is rejected before anything is stored or priced. The response (application/problem+json) carries a violations array with exactly one entry per cart item (propertyPath items[n], code MIXED_ARTICLE_TYPES, a message naming the product number and its article type). Create one cart per article type. | — |
GET/api/carts/{id}
Retrieves a Cart resource.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Cart identifier |
Code samples
curl -X GET 'https://sandbox.partner.miete24.com/api/carts/{id}' \
-H 'X-Api-Key: YOUR_API_KEY'
const response = await fetch('https://sandbox.partner.miete24.com/api/carts/{id}', {
method: 'GET',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
});
const data = await response.json();
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Cart resource | Cart.CartFinancingResponse-cart.financing_cart.status |
| 404 | Resource not found | — |
PUT/api/carts/{id}
Replaces the Cart resource.
A cart holds items of one article type only. The article type follows the productSector of each item: IT_AND_OFFICE_EQUIPMENT and HOME_AND_ENTERTAINMENT_ELECTRONICS are ITK, TESVOLT_ENERGY_STORAGE is TESVOLT, and every other sector is NON_ITK. The category does not decide the article type. A cart whose items have different article types is rejected with 422.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Cart identifier |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| items | array<CartItemCreateDto-cart.create> | yes |
Example request
{
"items": [
{
"productNumber": "P-100200",
"productName": "Industrial Drill Press",
"productSku": "SKU-DRILL-5000",
"quantity": 2,
"price": 4540.11,
"productOptions": {
"color": "blue",
"size": "M"
},
"categoryId": 3,
"categorySlug": "hardware",
"devices": [
{
"bwBaselineCount": 1000,
"bwBaselinePrice": 0.01,
"bwOveragePrice": 0.02,
"colorBaselineCount": 200,
"colorBaselinePrice": 0.05,
"colorOveragePrice": 0.07,
"scanBaselineCount": 300,
"scanBaselinePrice": 0.03,
"scanOveragePrice": 0.04,
"locked": false
},
{
"bwBaselineCount": 1500,
"bwBaselinePrice": 0.01,
"bwOveragePrice": 0.02,
"locked": false
}
]
}
]
}
Code samples
curl -X PUT 'https://sandbox.partner.miete24.com/api/carts/{id}' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"items":[{"productNumber":"P-100200","productName":"Industrial Drill Press","productSku":"SKU-DRILL-5000","quantity":2,"price":4540.11,"productOptions":{"color":"blue","size":"M"},"categoryId":3,"categorySlug":"hardware","devices":[{"bwBaselineCount":1000,"bwBaselinePrice":0.01,"bwOveragePrice":0.02,"colorBaselineCount":200,"colorBaselinePrice":0.05,"colorOveragePrice":0.07,"scanBaselineCount":300,"scanBaselinePrice":0.03,"scanOveragePrice":0.04,"locked":false},{"bwBaselineCount":1500,"bwBaselinePrice":0.01,"bwOveragePrice":0.02,"locked":false}]}]}'
const response = await fetch('https://sandbox.partner.miete24.com/api/carts/{id}', {
method: 'PUT',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"items":[{"productNumber":"P-100200","productName":"Industrial Drill Press","productSku":"SKU-DRILL-5000","quantity":2,"price":4540.11,"productOptions":{"color":"blue","size":"M"},"categoryId":3,"categorySlug":"hardware","devices":[{"bwBaselineCount":1000,"bwBaselinePrice":0.01,"bwOveragePrice":0.02,"colorBaselineCount":200,"colorBaselinePrice":0.05,"colorOveragePrice":0.07,"scanBaselineCount":300,"scanBaselinePrice":0.03,"scanOveragePrice":0.04,"locked":false},{"bwBaselineCount":1500,"bwBaselinePrice":0.01,"bwOveragePrice":0.02,"locked":false}]}]}),
});
const data = await response.json();
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Cart resource updated | Cart.CartFinancingResponse-cart.financing |
| 400 | Invalid input | — |
| 404 | Resource not found | — |
| 422 | Unprocessable entity. A field is missing or invalid, or the cart items have different article types. A cart with items of different article types is rejected before anything is stored or priced. The response (application/problem+json) carries a violations array with exactly one entry per cart item (propertyPath items[n], code MIXED_ARTICLE_TYPES, a message naming the product number and its article type). Create one cart per article type. | — |
POST/api/carts/{id}/checkout
Check out a cart
Creates the quote and its financing case from the cart and, unless submitFinancing is false, submits it for finance review. The response returns the financeCaseId; follow the case via GET /api/financing_cases/{id} or the financing_case.status_changed webhook. financingType partial_amortisation_leasing (Teilamortisation, PH-1604) is priced like leasing at the rate of financingOptions.partialAmortisationLeasing for the chosen duration. Its residual value (EUR, net, without margin) is frozen on the quote, sent to grenke and returned as residualValue, the value the cart preview shows in financingOptions.partialAmortisationLeasingResidualValue. Example: duration 36 with financingType partial_amortisation_leasing on a 10,000 EUR cart with a 10 % residual value answers with residualValue 1000.0. When the residual value cannot be looked up for the cart total (for example the total lies above the top range of the hub conditions), the checkout is rejected with 422 (detail starting with residual_value_unavailable:), whether or not submitFinancing is set; a buyback factor of 0 is no error and answers 201 with residualValue null. The request is rejected before anything is created with 400 when the product sector is not enabled for the partner, a category id or slug is unknown or belongs to another sector, the financing type is not offered for this duration, the duration is outside the depreciation (AfA) range of the products, or a rent quote has no valid custom SLA; 403 when the cart belongs to another partner; 404 when the cart does not exist; 409 when the cart has already been checked out, a checkout for it is still running, or the quoteNumber is already used for another quote of the partner; 422 when a field is missing, invalid or unknown, the payment interval or commission tier is not available to the partner, a Print Plan rule is not met, an Idempotency-Key is reused with a different body, the cart items have different article types (one violation per item with code MIXED_ARTICLE_TYPES; this also applies to carts created before the rule, which GET /api/carts/{id} still returns), the partner account has no financing partner assigned yet (detail starting with partner_financing_not_ready:), or a product number of the cart collides with another product number of the partner or of this cart (detail starting with product_number_conflict:). Product availability is not checked at checkout: products are created from the submitted item data, and whether the order goes ahead is decided in the review afterwards.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Idempotency-Key | header | string | no | Unique key per checkout (a UUID v4 is recommended), at most 255 characters. A retry with the same key and body returns the original response instead of creating a second quote. Optional during the transition period announced on Versioning & Deprecation; required afterwards. |
| id | path | string | yes | Cart identifier |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| duration | integer | yes | Ausgewählte Laufzeit in Monaten |
| financingType | string | yes | Financing type. Use "print_plan" (PH-590) to check the cart out as a Print Plan contract: the cart items per-device click-billing data (CartItemCreateDto.devices) plus the printPlanContractTerms block are turned into a Print Plan quote. serviceCost and customSlaFileName are not allowed for print_plan. PH-755: "print_plan_3kdg_12verl" and "print_plan_6kdg_12verl" are Print Plan contract variants that behave identically but send their own producttype to GRENKE. PH-1084: every Print Plan variant requires each cart item to reference a Print Plan-capable category (categoryId or categorySlug of a category with hasPrintPlanCapability=true, see GET /api/product-categories); otherwise the checkout is rejected with 422 and nothing is created. PH-1062: "contract_assignment" checks the cart out as a Contract Assignment on one of the partner's templates (contractAssignment block, see GET /api/contract-assignment-templates). The case is priced and submitted with the template's contractType, and every rule of that type applies: serviceCost and customSlaFileName for rent, devices for a Print Plan template. PH-1604: "partial_amortisation_leasing" checks the cart out as partial-amortisation leasing (Teilamortisation). It is priced like leasing at the rate of financingOptions.partialAmortisationLeasing for the chosen duration, and the response carries the residual value (residualValue). |
| paymentInterval | string | no | Zahlungsweise; Default monthly. |
| commission | integer | no | Commission tier in percent. If omitted, the preselected tier applies: 0 if a 0 % rental factor list exists for the financing type, otherwise the lowest available tier. Only tiers for which a rental factor list is assigned to the partner are allowed. |
| quoteNumber | string|null | no | Optional custom quote number. |
| submitFinancing | boolean | no | Whether the checkout starts the financing request. Optional, default true (unchanged behaviour: the quote is accepted by the customer and submitted to GRENKE). false creates the quote only, like "create quote" in the PartnerHub: status in_progress, no financing request, no GRENKE submission, no e-mail to the customer and no customer credit check. The response then reads "Quote created without financing request". The partner completes the quote, sends it to the customer or starts the financing request in the PartnerHub; read the resulting status via GET /api/financing_cases/{id} or the financing_case.status_changed webhook. Applies to every financing type including Print Plan. |
| printPlanContractTerms | mixed | no | Print Plan contract terms (PH-590); only applied when financingType=print_plan, or contract_assignment on a template whose contractType is a Print Plan type (PH-1062). Optional — defaults: 5% page coverage, 15% color ratio, full maintenance. |
| contractAssignment | mixed | no | Contract Assignment data (PH-1062). Required with financingType=contract_assignment and not allowed with any other financing type. Which of the optional values a template accepts is listed per template in GET /api/contract-assignment-templates (terms, partnerFields); a value the template does not print is refused with 422. |
| customer | CustomerData-cart.checkout | yes | Kundendaten |
| deliveryAddress | mixed | no | Delivery address with its own recipient (PH-1119). Optional: without it the customer address is the delivery address. If that address matches the customer's stored default delivery address, the stored address is used, including a recipient stored for it in the PartnerHub; otherwise it is headed by the customer company and contact person. When present, quote, contract and offer PDF show exactly this recipient — the lessee company from the customer block is not prepended. recipientName and the address fields are mandatory, company is optional. For deliveries to a private address (e.g. an employee's home) always send this block and leave company out — a private address sent in the customer block is headed by the lessee company. Customer master data is never changed. |
| serviceCost | number|null | no | Monatliche Servicegebühr für die Miete. |
| customSlaFileName | string|null | no | Kairos "file" identifier of the custom SLA selected for this quote. |
Example request
{
"duration": 36,
"financingType": "leasing",
"paymentInterval": "monthly",
"commission": 0,
"quoteNumber": "PARTNER-2026-001",
"submitFinancing": true,
"printPlanContractTerms": {
"pageCoverage": 5,
"colorRatio": 15,
"maintenanceTonerColor": true,
"maintenanceDrums": true,
"maintenanceStaples": true,
"maintenancePaper": true
},
"customer": {
"firstName": "Anna",
"lastName": "Schmidt",
"email": "anna.schmidt@example.com",
"street": "Hauptstrasse",
"houseNumber": "12a",
"zipCode": "10115",
"city": "Berlin",
"country": "Deutschland",
"phone": "+49 30 1234567",
"company": "Schmidt GmbH",
"vatId": "DE123456789"
},
"deliveryAddress": {
"recipientName": "David Bühler",
"company": null,
"street": "Weingartenstraße",
"houseNumber": "5",
"zipCode": "79211",
"city": "Denzlingen",
"country": "Deutschland"
},
"serviceCost": 4.5,
"customSlaFileName": "gold-sla.pdf"
}
Code samples
curl -X POST 'https://sandbox.partner.miete24.com/api/carts/{id}/checkout' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"duration":36,"financingType":"leasing","paymentInterval":"monthly","commission":0,"quoteNumber":"PARTNER-2026-001","submitFinancing":true,"printPlanContractTerms":{"pageCoverage":5,"colorRatio":15,"maintenanceTonerColor":true,"maintenanceDrums":true,"maintenanceStaples":true,"maintenancePaper":true},"customer":{"firstName":"Anna","lastName":"Schmidt","email":"anna.schmidt@example.com","street":"Hauptstrasse","houseNumber":"12a","zipCode":"10115","city":"Berlin","country":"Deutschland","phone":"+49 30 1234567","company":"Schmidt GmbH","vatId":"DE123456789"},"deliveryAddress":{"recipientName":"David Bühler","company":null,"street":"Weingartenstraße","houseNumber":"5","zipCode":"79211","city":"Denzlingen","country":"Deutschland"},"serviceCost":4.5,"customSlaFileName":"gold-sla.pdf"}'
const response = await fetch('https://sandbox.partner.miete24.com/api/carts/{id}/checkout', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"duration":36,"financingType":"leasing","paymentInterval":"monthly","commission":0,"quoteNumber":"PARTNER-2026-001","submitFinancing":true,"printPlanContractTerms":{"pageCoverage":5,"colorRatio":15,"maintenanceTonerColor":true,"maintenanceDrums":true,"maintenanceStaples":true,"maintenancePaper":true},"customer":{"firstName":"Anna","lastName":"Schmidt","email":"anna.schmidt@example.com","street":"Hauptstrasse","houseNumber":"12a","zipCode":"10115","city":"Berlin","country":"Deutschland","phone":"+49 30 1234567","company":"Schmidt GmbH","vatId":"DE123456789"},"deliveryAddress":{"recipientName":"David Bühler","company":null,"street":"Weingartenstraße","houseNumber":"5","zipCode":"79211","city":"Denzlingen","country":"Deutschland"},"serviceCost":4.5,"customSlaFileName":"gold-sla.pdf"}),
});
const data = await response.json();
Responses
| Status | Description | Schema |
|---|---|---|
| 201 | Cart resource created | Cart.CheckoutResponseDto-checkout.response |
| 400 | Invalid input | — |
| 422 | Unprocessable entity. Validation errors, or a business rule rejected the checkout. A detail starting with "partner_financing_not_ready:" means the partner account has no financing partner assigned yet (Miete24 is still setting it up): nothing is created, the cart stays active and the same request can be retried once the setup is complete. A violation with code MIXED_ARTICLE_TYPES (one per cart item, propertyPath items[n]) means the cart items have different article types: no quote is created and the cart stays active; this also applies to carts created before the rule. Create one cart per article type. A detail starting with "residual_value_unavailable:" means the residual value of a partial_amortisation_leasing checkout could not be looked up for the cart total, duration and commission tier: nothing is created, nothing is sent to grenke and the cart stays active. A detail starting with "product_number_conflict:" means a product number of the cart collides with another product number of the partner or of this cart: the checkout is rejected and the cart stays active. | — |