# Dynamic Pricing

Supplier can decide not not have static prices in Procurement Catalog but instead to configure the Procurement Platform to load life prices directly from their systems whenever a consumer want to know a price. Dynamic pricing is only available when the Supplier has configured an JSON API endpoint and the required credentials. Because the Procurement Platform doesn't want consumers to wait too long for life prices we require your API endpoint to respond to price requests in less than 100ms. Please set up your API in a way that is able to handle multiple price requests at the same time.

# Example Request

The Procurement Platform will make HTTP POST requests against your dynamic_pricing_url with a JSON body like this:

price_inquery: {
  delivery_date: "2020-11-25",                        # optional
  delivery_address: "Foostraße 2, 12345 Musterstadt"  # optional
  contract_id: "UUID of the Zaikio Contract"
  skus: [
    {                                                 # one or many
      id: "UUID of the Zaikio SKU",
      order_number: "Order number of the Zaikio SKU",
      amount: 1234,
      unit: "sheet"
    }
  ]
}

# Example Response

The Procurement Platform expects a response like this:

[
  {                                                   # one hash per SKU in the request
    id: "UUID of the Zaikio SKU",                     # the UUID from the related SKU from the request
    amount: 1234,                                     # amount that will be delivered
    per_unit_net_price: "0.810372",                   # net price per single unit
    total_net_price: "1000.00",                       # the total price
    availability: "2020-11-23"                        # the earliest delivery date (optional)
  }
]