Skip to content

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

Request body properties for POST /api/carts
Name Type Required Description
items array<CartItemCreateDto-cart.create> yes

Example request

Example body
{
    "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}]}]}'

Responses

Responses for POST /api/carts
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

Path and query parameters for GET /api/carts/{id}
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'

Responses

Responses for GET /api/carts/{id}
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

Path and query parameters for PUT /api/carts/{id}
Name In Type Required Description
id path string yes Cart identifier

Request body

Request body properties for PUT /api/carts/{id}
Name Type Required Description
items array<CartItemCreateDto-cart.create> yes

Example request

Example body
{
    "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}]}]}'

Responses

Responses for PUT /api/carts/{id}
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. 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), or the partner account has no financing partner assigned yet (detail starting with partner_financing_not_ready:). 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

Path and query parameters for POST /api/carts/{id}/checkout
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

Request body properties for POST /api/carts/{id}/checkout
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.
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. Optional — defaults: 5% page coverage, 15% color ratio, full maintenance.
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, 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. 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

Example body
{
    "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"}'

Responses

Responses for POST /api/carts/{id}/checkout
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. —