---
url: "https://developer.migros.ch/apis/central-pricing-facade-1/versions/3d3408ff-7c6b-4890-82ea-373f6d4abb25"
---

OpenAPI specification document.

```json
{"components":{"responses":{"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/problem"}}},"description":"Invalid data given"}},"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"},"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"},"Calculate":{"additionalProperties":false,"description":"Request body for calculating prices.","properties":{"coupons":{"description":"List of coupon GTINs to take into account for the price calculation.","items":{"example":"7613404420317","minLength":4,"type":"string"},"type":"array"},"customer":{"description":"Information about the customer and their loyalty.","example":{"cumulus_number":"2099123123123","loyalty":["cumulus"]},"nullable":true,"oneOf":[{"$ref":"#/components/schemas/Customer"}]},"date":{"description":"Date and time used for calculating the prices.\n\nThis defaults to now but can be used to calculate prices based historic data.","format":"date-time","nullable":true,"type":"string"},"products":{"description":"List of products to calculate prices for.","example":[{"product_id":"120299100000","quantity":3},{"product_id":"101924500000","unit":"KG","weight":3.5}],"items":{"$ref":"#/components/schemas/ProductToCalculate"},"minItems":1,"type":"array"},"ucbs":{"description":"List of user coupon IDs (UCB) to take into account for the price calculation.","items":{"example":"456456456","minLength":4,"type":"string"},"type":"array"}},"required":["products"],"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"},"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"},"Customer":{"additionalProperties":false,"description":"Information about the customer.","properties":{"cumulus_number":{"description":"Cumulus number of the customer.","example":"2099123123123","maxLength":40,"minLength":10,"type":"string"},"loyalty":{"description":"Loyalty programs the customer is part of.\nA person who uses the loyalty program `GKK` cannot use any of the other loyalty programs. Therefore the maxItems\nis set to 4, even though there are 5 loyalty programs in total.","example":["cumulus"],"items":{"enum":["cumulus","famigros","genossenschafter","migusto","gkk"],"type":"string"},"maxItems":4,"type":"array","uniqueItems":true}},"required":["cumulus_number"],"type":"object"},"EP2":{"additionalProperties":false,"description":"Information about EP2 payment.","properties":{"activation_sequence_id":{"description":"Activation sequence counter (ep2Actseqcnt).","example":"584","type":"string"},"amount":{"description":"Amount payed with cad.","example":50.2,"format":"float","type":"number"},"application_id":{"description":"Application ID (ep2Aid).","example":"A0000000041010","type":"string"},"authorization_code":{"description":"Authorization code (ep2Authc).","example":"046333","type":"string"},"brand":{"description":"Tender name, e.g. MasterCard.","example":"MasterCard","type":"string"},"encrypted_primary_account_number":{"description":"Encrypted credit card number (ep2Apppanenc).","example":"E9876C899FFBF4CC22602FFAE60D20B5","minLength":8,"nullable":true,"type":"string"},"encrypted_primary_account_number_index":{"description":"Index for encrypted credit card number (ap2Apppanencind).","example":"ep2Apppanencind","nullable":true,"type":"string"},"issuer_code":{"example":"2","nullable":true,"pattern":"^[0-9]+$","type":"string"},"masked_primary_account_number":{"description":"Masked credit card number (ep2Pan).","example":"xxxxxxx1234","maxLength":19,"minLength":8,"type":"string"},"terminal_id":{"description":"Terminal ID.","example":"31392368","nullable":true,"type":"string"},"transaction":{"$ref":"#/components/schemas/EP2TransactionDetails"}},"required":["amount","transaction","brand","masked_primary_account_number","activation_sequence_id","application_id","authorization_code"],"type":"object"},"EP2TransactionDetails":{"additionalProperties":false,"description":"Details of an EP2 transaction.","properties":{"amount":{"description":"Transaction amount (ep2Trxamount).","example":50.2,"format":"float","type":"number"},"date":{"description":"Transaction date time (ep2Trxdatetime).","format":"date-time","type":"string"},"reference_number":{"description":"Transaction reference number (ep2Trxrefnum).","example":"00007987","nullable":true,"type":"string"},"sequence_number":{"description":"Transaction sequence number (ep2Trxseqcnt).","example":"7987","nullable":true,"type":"string"},"type_extension":{"description":"Transaction type extension (ep2Trxtypeextn).","example":"Buchung","nullable":true,"type":"string"}},"required":["amount","date"],"type":"object"},"Finish":{"additionalProperties":false,"description":"Request body for finsihing a transaction.","properties":{"amount":{"description":"Total amount of the payment.","example":100.8,"format":"float","type":"number"},"ep2":{"description":"Details of EP2 payment.","nullable":true,"oneOf":[{"$ref":"#/components/schemas/EP2"}]},"gift_cards":{"description":"List of used gift cards.","items":{"$ref":"#/components/schemas/GiftCard"},"type":"array"},"gkk":{"description":"Details of Gkk payment (Grosskundenkarte).","nullable":true,"oneOf":[{"$ref":"#/components/schemas/Gkk"}]},"loyalty_system_actions":{"description":"List of loyalty system actions.","items":{"$ref":"#/components/schemas/LoyaltySystemAction"},"type":"array"}},"required":["amount"],"type":"object"},"GiftCard":{"additionalProperties":false,"description":"Details of a payment with a gift card.","properties":{"amount":{"description":"Amount used for payment with this card.","example":30.35,"exclusiveMinimum":true,"format":"float","minimum":0,"type":"number"},"number":{"example":"778300001911860030","type":"string"},"transaction":{"$ref":"#/components/schemas/GiftCardTransaction"}},"required":["number","amount","transaction"],"type":"object"},"GiftCardTransaction":{"additionalProperties":false,"description":"Details of a transaction for a gift card.","properties":{"id":{"example":"1044426921","type":"string"},"product_id":{"example":"939100100000","type":"string"},"uuid":{"example":"95640107100102403603679079134482","type":"string"}},"required":["uuid","id","product_id"],"type":"object"},"Gkk":{"additionalProperties":false,"description":"Information about Gkk payment.","properties":{"amount":{"description":"Amount payed with Gkk card.","example":50.2,"format":"float","type":"number"}},"required":["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"},"LoyaltyProductDetails":{"additionalProperties":false,"description":"Details about the product of the Loyalty System.","properties":{"expiration_date":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["charged","redeemed"],"example":"charged","type":"string"}},"required":["status"],"type":"object"},"LoyaltySystemAction":{"additionalProperties":false,"description":"Details of an action of the Loyalty System.","properties":{"action":{"example":"none","type":"string"},"barcode":{"example":"778400001234567813","type":"string"},"coupon_id":{"example":"123123123","type":"string"},"coupon_type":{"example":"UCB","type":"string"},"cumulus_number":{"example":"2099123123123","maxLength":40,"minLength":10,"type":"string"},"loyalty_product":{"$ref":"#/components/schemas/LoyaltyProductDetails"},"loyalty_system":{"$ref":"#/components/schemas/LoyaltySystemDetails"}},"required":["cumulus_number","coupon_id","coupon_type","barcode","action","loyalty_system","loyalty_product"],"type":"object"},"LoyaltySystemDetails":{"additionalProperties":false,"description":"Details about the Loyalty System communication.","properties":{"date":{"format":"date-time","type":"string"},"online":{"example":true,"type":"boolean"},"status":{"enum":["OK","NOK"],"example":"OK","type":"string"},"uuid":{"example":"68471892100106106113111269117711","type":"string"}},"required":["status","online","date","uuid"],"type":"object"},"ProductToCalculate":{"additionalProperties":false,"description":"Product to calculate prices for.","properties":{"price_per_unit":{"description":"User-defined price per unit for the product.\n\nThis can be used to override a price for a given product.\nIf not set, the price will be looked up.\nThe price is per unit of the product. Promotions are calculated based on this price.","example":1.75,"format":"float","minimum":0,"nullable":true,"type":"number"},"product_id":{"description":"ID of the product.","example":"101924500000","maxLength":40,"minLength":9,"type":"string"},"quantity":{"description":"Number of products.\n\nThis is not used for weight-based products.","example":1,"exclusiveMinimum":true,"minimum":0,"nullable":true,"type":"integer"},"unit":{"description":"User-defined unit for the product.\n\nThis can be used to override the unit for a given product.\nIf not set, the unit will be looked up.","enum":["CU","KG","M","QM"],"example":"CU","nullable":true,"type":"string"},"weight":{"description":"Total weight of the product.\n\nThis is only used for weight-based products. Set the `unit` field to \"KG\" when overwriting the weight.","example":125.2,"exclusiveMinimum":true,"format":"float","minimum":0,"nullable":true,"type":"number"}},"required":["product_id"],"type":"object"},"Transaction":{"additionalProperties":false,"description":"Response for finished transaction.","properties":{"status_code":{"description":"Status code if there was an error.","nullable":true,"type":"string"},"transaction_id":{"description":"ID of the transaction used for finishing it.","example":"5oj548c9afa59304c0eb0b7f18b77c9c","type":"string"}},"required":["transaction_id"],"type":"object"},"Vat":{"additionalProperties":false,"description":"Information about the VAT.","properties":{"code":{"description":"VAT code.\n\n- 0: No taxes\n- 1: Reduced taxes\n- 2: Full taxes\n- 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"},"problem":{"description":"Problem Details for HTTP APIs defined by RFC 7807","properties":{"detail":{"example":"More details","type":"string"},"status":{"example":400,"type":"integer"},"title":{"example":"Test error","type":"string"},"validation-errors":{"items":{"properties":{"constraint":{"example":"minLength","type":"string"},"message":{"example":"Example error","type":"string"},"pointer":{"example":"/prop1/0","type":"string"},"property":{"example":"prop1[0]","type":"string"}},"required":["property","pointer","message","constraint"],"type":"object"},"minItems":1,"type":"array"}},"required":["status","title"],"title":"Problem Details","type":"object"}},"securitySchemes":{"Kong-Api-Key":{"description":"Kong key-auth authentication","in":"header","name":"X-Api-Key","type":"apiKey"}}},"info":{"contact":{"email":"arg_mgb-udp-business-services@mgb.ch","name":"MGB-UDP-Business-Services"},"description":"Facade to the Central Pricing service on Avanta.","title":"Central Pricing Facade","version":"1.3.3.7"},"openapi":"3.0.0","paths":{"/migros/sales/central-pricing/v1/{store}/calculate":{"post":{"description":"Business errors are documented at <a href=\"https://wiki.migros.net/x/Gb6cGw\">https://wiki.migros.net/x/Gb6cGw</a>.","operationId":"calculate","parameters":[{"description":"Store which the calculation is based on","example":"0034833","in":"path","name":"store","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calculate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calculation"}}},"description":"Successful calculation result"},"400":{"$ref":"#/components/responses/400"}},"summary":"Calculates prices for the given data.","tags":["central-pricing-facade"]}},"/migros/sales/central-pricing/v1/{store}/transactions":{"post":{"description":"Business errors are documented at <a href=\"https://wiki.migros.net/x/Gb6cGw\">https://wiki.migros.net/x/Gb6cGw</a>.","operationId":"createtransaction","parameters":[{"description":"Store which the calculation is based on","example":"0023200","in":"path","name":"store","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calculate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}},"description":"Successful calculation result"},"400":{"$ref":"#/components/responses/400"}},"summary":"Calculates prices for the given data and creates a transaction for the calculation.","tags":["central-pricing-facade"]}},"/migros/sales/central-pricing/v1/{store}/transactions/{transaction}/finish":{"post":{"description":"Business errors are documented at <a href=\"https://wiki.migros.net/x/Gb6cGw\">https://wiki.migros.net/x/Gb6cGw</a>.","operationId":"finishtransaction","parameters":[{"description":"Store which the calculation is based on","example":"0023200","in":"path","name":"store","required":true,"schema":{"type":"string"}},{"description":"Transaction ID to finish","example":"5oj548c9afa59304c0eb0b7f18b77c9c","in":"path","name":"transaction","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Finish"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}},"description":"Successful calculation result"},"400":{"$ref":"#/components/responses/400"}},"summary":"Finishes a transaction.","tags":["central-pricing-facade"]}}},"security":[{"Kong-Api-Key":[]}],"servers":[{"description":"URL of upstream","url":"https://api.migros.ch"}],"tags":[{"name":"central-pricing-facade"}],"x-company":"migros","x-edm-domain":"sales","x-headmatter":{"readable_by":"*"},"x-kong-route-defaults":{"protocols":["https"],"strip_path":false},"x-kong-service-defaults":{"connect_timeout":5000,"read_timeout":30000,"retries":2,"write_timeout":10000},"x-leanix-id":"521a435f-8aee-4a90-9f67-bc0c599a96b6","x-link-get-access":"https://forms.office.com/e/zhzbEqAQ26","x-link-get-support":"mailto:9961fcb6.migros.onmicrosoft.com@ch.teams.ms"}
```
