Skip to content

Calculation

Rental price calculation endpoints.

POST/api/calculate

Creates a Calculation resource.

Request body

Request body properties for POST /api/calculate
Name Type Required Description
serviceCost number|null no
paymentInterval string no Zahlungsweise; Default monthly. monthly schlägt den konfigurierten Aufschlag (PH-577) auf die Monatsrate auf, quarterly nicht.
durations array<string> yes
calculationTypes array<string> yes
acquisitionCost number|null no
productSector string no API write accessor: accepts the raw JSON string so invalid values surface as Choice violations instead of enum denormalization fatals (PH-984).
categorySlug string|null no only for internal use for now
installationCost number|null no
userType string no

Example request

Example body
{
    "paymentInterval": "monthly",
    "durations": [
        12,
        24,
        36,
        48,
        60,
        72,
        84,
        96,
        120
    ],
    "calculationTypes": [
        "leasing",
        "partial_amortisation_leasing",
        "rent_to_own"
    ],
    "acquisitionCost": 1000.23,
    "margin": 0.03,
    "productSector": "IT_AND_OFFICE_EQUIPMENT",
    "public": true,
    "active": true,
    "distributionHub": "https://example.com/",
    "distributionHubOverride": "https://example.com/"
}

Code samples

curl -X POST 'https://sandbox.partner.miete24.com/api/calculate' \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"paymentInterval":"monthly","durations":[12,24,36,48,60,72,84,96,120],"calculationTypes":["leasing","partial_amortisation_leasing","rent_to_own"],"acquisitionCost":1000.23,"margin":0.03,"productSector":"IT_AND_OFFICE_EQUIPMENT","public":true,"active":true,"distributionHub":"https://example.com/","distributionHubOverride":"https://example.com/"}'

Responses

Responses for POST /api/calculate
Status Description Schema
201 Calculation resource created Calculation
400 Invalid input
422 Unprocessable entity

POST/api/calculate/estimate

Creates a Calculation resource.

Request body

Request body properties for POST /api/calculate/estimate
Name Type Required Description
serviceCost number|null no
paymentInterval string no Zahlungsweise; Default monthly. monthly schlägt den konfigurierten Aufschlag (PH-577) auf die Monatsrate auf, quarterly nicht.
durations array<string> yes
calculationTypes array<string> yes
acquisitionCost number|null no
productSector string no API write accessor: accepts the raw JSON string so invalid values surface as Choice violations instead of enum denormalization fatals (PH-984).
categorySlug string|null no only for internal use for now
installationCost number|null no
userType string no

Example request

Example body
{
    "paymentInterval": "monthly",
    "durations": [
        12,
        24,
        36,
        48,
        60,
        72,
        84,
        96,
        120
    ],
    "calculationTypes": [
        "leasing",
        "partial_amortisation_leasing",
        "rent_to_own"
    ],
    "acquisitionCost": 1000.23,
    "margin": 0.03,
    "productSector": "IT_AND_OFFICE_EQUIPMENT",
    "public": true,
    "active": true,
    "distributionHub": "https://example.com/",
    "distributionHubOverride": "https://example.com/"
}

Code samples

curl -X POST 'https://sandbox.partner.miete24.com/api/calculate/estimate' \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"paymentInterval":"monthly","durations":[12,24,36,48,60,72,84,96,120],"calculationTypes":["leasing","partial_amortisation_leasing","rent_to_own"],"acquisitionCost":1000.23,"margin":0.03,"productSector":"IT_AND_OFFICE_EQUIPMENT","public":true,"active":true,"distributionHub":"https://example.com/","distributionHubOverride":"https://example.com/"}'

Responses

Responses for POST /api/calculate/estimate
Status Description Schema
201 Calculation resource created Calculation.CalculationResponse
400 Invalid input
422 Unprocessable entity

POST/api/calculate/estimate/bulk

Estimate several products in one call (2-50 items).

Creates a Calculation resource.

Example request

Example body
{
    "items": [
        {
            "acquisitionCost": 1000.23,
            "durations": [
                24,
                36,
                48
            ],
            "serviceCost": 4,
            "productSector": "IT_AND_OFFICE_EQUIPMENT",
            "calculationTypes": [
                "leasing",
                "rent_to_own",
                "rent"
            ]
        },
        {
            "acquisitionCost": 2500,
            "durations": [
                36
            ],
            "serviceCost": 4,
            "productSector": "IT_AND_OFFICE_EQUIPMENT",
            "calculationTypes": [
                "leasing"
            ]
        }
    ]
}

Code samples

curl -X POST 'https://sandbox.partner.miete24.com/api/calculate/estimate/bulk' \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"items":[{"acquisitionCost":1000.23,"durations":[24,36,48],"serviceCost":4,"productSector":"IT_AND_OFFICE_EQUIPMENT","calculationTypes":["leasing","rent_to_own","rent"]},{"acquisitionCost":2500,"durations":[36],"serviceCost":4,"productSector":"IT_AND_OFFICE_EQUIPMENT","calculationTypes":["leasing"]}]}'

Responses

Responses for POST /api/calculate/estimate/bulk
Status Description Schema
200