---
title: "Calculation"
url: "https://developer-qual.migros.ch/apis/central-pricing-facade-1/versions/bff861d9-5d8f-4383-8066-4b36e581bb7f/schemas/Calculation"
---

> Full API specification: https://developer-qual.migros.ch/apis/central-pricing-facade-1/versions/bff861d9-5d8f-4383-8066-4b36e581bb7f.md

# Calculation

Response with calculated prices.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Central Pricing Facade
  version: 1.3.3.7
servers:
  - description: URL of upstream
    url: https://api-qual.migros.ch
components:
  schemas:
    Amounts:
      additionalProperties: false
      description: Information about the different total amounts.
      properties:
        rounding:
          description: Rounding difference.
          example: 0.1
          format: float
          nullable: true
          type: number
        to_pay:
          description: Total price to pay.
          example: 15.35
          exclusiveMinimum: true
          format: float
          minimum: 0
          nullable: true
          type: number
      required:
        - to_pay
        - saved
      type: object
    CalculatedItem:
      additionalProperties: false
      description: Information about calculated prices for a single item.
      properties:
        amounts:
          description: Information about the different amounts for a single item.
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/ItemAmounts"
        applied_promotions:
          description: List of applied promotions for a single item.
          items:
            $ref: "#/components/schemas/AppliedPromotion"
          type: array
        base_price_per_unit:
          description: Unit price before any promotions are applied.
          example: 12.5
          exclusiveMinimum: true
          format: float
          minimum: 0
          nullable: true
          type: number
        product_id:
          description: ID of the product.
          type: string
      required:
        - amounts
        - base_price_per_unit
      type: object
    Vat:
      additionalProperties: false
      description: Information about the VAT.
      properties:
        code:
          description: |-
            VAT code.

            - 0: No taxes
            - 1: Reduced taxes
            - 2: Full taxes
            - 9: Proportionally split
          enum:
            - 0
            - 1
            - 2
            - 9
          type: integer
        rate:
          description: VAT rate.
          example: 7.7
          exclusiveMinimum: true
          format: float
          minimum: 0
          type: number
        taxable_amount:
          description: Taxable amount for this VAT.
          example: 11.9
          exclusiveMinimum: true
          format: float
          minimum: 0
          type: number
        vat_amount:
          description: Amount of the VAT.
          example: 1.1
          exclusiveMinimum: true
          format: float
          minimum: 0
          type: number
      required:
        - code
        - rate
        - taxable_amount
        - vat_amount
      type: object
    ItemAmounts:
      additionalProperties: false
      description: Information about the different amounts for a single item.
      properties:
        saved:
          description: Saved amount for the item.
          example: 1.1
          exclusiveMinimum: true
          format: float
          minimum: 0
          type: number
        total:
          description: Total price of the item.
          example: 11.2
          exclusiveMinimum: true
          format: float
          minimum: 0
          type: number
      required:
        - total
        - saved
      type: object
    AppliedPromotion:
      additionalProperties: false
      description: Information about an applied promotion to a single item.
      properties:
        coupon:
          description: Coupon identifier for the promotion.
          example: "7610300001381"
          maxLength: 40
          nullable: true
          type: string
        cumulus_points:
          description: Amount of awarded Cumulus Points for a single item.
          example: 2
          exclusiveMinimum: true
          format: float
          minimum: 0
          nullable: true
          type: number
        price_reduction_per_unit:
          description: Amount of the price reduction per unit for a single item.
          example: 1.1
          exclusiveMinimum: true
          format: float
          minimum: 0
          nullable: true
          type: number
      type: object
    Calculation:
      additionalProperties: false
      description: Response with calculated prices.
      properties:
        amounts:
          description: Information about the different total amounts.
          nullable: true
          oneOf:
            - $ref: "#/components/schemas/Amounts"
        coupons:
          description: List of coupons attached to the calculation.
          items:
            type: string
            uniqueItems: true
          minItems: 1
          type: array
        products:
          description: List of products with calculated prices.
          items:
            $ref: "#/components/schemas/CalculatedItem"
          minItems: 1
          type: array
        ucbs:
          description: List of UCBs with calculated prices.
          items:
            $ref: "#/components/schemas/CalculatedItem"
          minItems: 1
          type: array
        vat:
          description: Information about the VAT.
          items:
            $ref: "#/components/schemas/Vat"
          type: array
      required:
        - products
        - amounts
        - vat
      type: object
```
