> ## Documentation Index
> Fetch the complete documentation index at: https://developer.runa.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Estimate order

> Estimate the price for the order

<Info>
  The estimate endpoint is currently **unsupported** in the [playground
  environment](/reference/2024-02-05/playground).
</Info>


## OpenAPI

````yaml reference/2024-02-05/openapi.json POST /order/estimate
openapi: 3.1.1
info:
  title: Runa
  version: '2.0'
  description: The public Runa API
  license:
    name: Ⓒ Runa
    url: https://runa.io/terms-of-use
  contact:
    name: Runa
    url: https://runa.io
    email: info@runa.io
servers:
  - url: https://playground.runa.io/v2
    description: Playground
  - url: https://api.runa.io/v2
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: utility
    description: Utility endpoints.
  - name: balance
    description: Operations related to account balance.
  - name: products
    description: Operations related to products.
  - name: orders
    description: Operations related to ordering and orders.
externalDocs:
  url: https://developer.runa.com/reference
  description: Runa API Reference
paths:
  /order/estimate:
    post:
      tags:
        - orders
      summary: Estimate order
      description: Estimate price for the order.
      operationId: estimateOrderPrice
      parameters:
        - $ref: '#/components/parameters/X-Api-Version'
      requestBody:
        required: true
        description: The details of the order to estimate.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderPriceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderPriceResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    X-Api-Version:
      name: X-Api-Version
      description: >-
        The dated version of the API, if not specified a default is used. See
        [API versioning](/best-practices/api-versioning) for more information.
      in: header
      required: false
      schema:
        type: string
  schemas:
    OrderPriceRequest:
      title: OrderPriceRequest
      required:
        - payment_method
        - items
      type: object
      properties:
        payment_method:
          title: Payment Method
          description: >-
            Payment method for the order. Select the `ACCOUNT_BALANCE` you want
            to pay for the order from.
          allOf:
            - $ref: '#/components/schemas/NewAccountPayment'
        items:
          title: Items
          description: List of order items for price estimation.
          minItems: 1
          maxItems: 500
          type: array
          items:
            $ref: '#/components/schemas/OrderItemPriceRequest'
      description: Request for a price estimate for an order.
    OrderPriceResponse:
      title: OrderPriceResponse
      required:
        - payment_method
        - items
        - currency
        - total_discount
        - total_price
      type: object
      properties:
        payment_method:
          title: Payment Method
          allOf:
            - $ref: '#/components/schemas/AccountPayment'
        items:
          title: Items
          description: List of order items with price and discount.
          type: array
          items:
            $ref: '#/components/schemas/OrderItemDiscount'
        currency:
          title: Currency
          example: USD
          type: string
          pattern: ^[A-Z]{3}$
          description: >-
            The currency of the order, represented by ISO 4217 currency codes.
            Please check the currency section in the guidelines for how to use
            this field.
        total_discount:
          title: Total Discount
          description: Total discount on the entire order.
          type: number
        total_price:
          title: Total Price
          description: Total price of the entire order.
          type: number
        transaction_detail:
          $ref: '#/components/schemas/TransactionDetail'
      description: Response object for a order price estimate.
    NewAccountPayment:
      title: NewAccountPayment
      required:
        - type
        - currency
      type: object
      properties:
        type:
          description: Account balance payment method.
          allOf:
            - $ref: '#/components/schemas/AccountPaymentType'
        currency:
          $ref: '#/components/schemas/CurrencyForAccount'
      description: Pay using your account balance.
    OrderItemPriceRequest:
      title: OrderItemPriceRequest
      required:
        - products
        - face_value
      type: object
      properties:
        products:
          title: Products
          description: >-
            Choose `SINGLE` if you want the end user to redeem the face value on
            a single specific product. Choose `MULTIPLE` if the end user can
            choose to spend the face value across multiple products.
          oneOf:
            - $ref: '#/components/schemas/MultipleProduct'
            - $ref: '#/components/schemas/SingleProduct'
        face_value:
          title: Face Value
          description: Face value of the reward link.
          example: 10
          type: number
      description: A proposed order item within an order price request.
    AccountPayment:
      title: AccountPayment
      required:
        - type
      type: object
      properties:
        type:
          description: Account balance payment.
          allOf:
            - $ref: '#/components/schemas/AccountPaymentType'
        currency:
          $ref: '#/components/schemas/CurrencyForAccount'
      description: Account balance payment.
    OrderItemDiscount:
      title: OrderItemDiscount
      required:
        - products
        - face_value
        - price
        - discount_multiplier
        - currency
      type: object
      properties:
        products:
          title: Products
          description: >-
            Choose `SINGLE` if you want the end user to redeem the face value on
            a single specific product. Choose `MULTIPLE` if the end user can
            choose to spend the face value across multiple products.
          oneOf:
            - $ref: '#/components/schemas/MultipleProduct'
            - $ref: '#/components/schemas/SingleProduct'
        face_value:
          title: Face Value
          description: Face value of the reward link.
          example: 10
          type: number
        price:
          title: Price
          description: The price of the order item.
          type: number
        discount_multiplier:
          $ref: '#/components/schemas/ProductDiscountMultiplier'
        currency:
          title: Currency
          example: USD
          type: string
          pattern: ^[A-Z]{3}$
          description: >-
            The currency of the product, represented by ISO 4217 currency codes.
            Please check the currency section in the guidelines for how to use
            this field.
      description: The computed discount for an order item.
    TransactionDetail:
      title: TransactionDetail
      description: >-
        A mapping of the subtotal of the order using the payout currency as a
        key.
      type: object
      example:
        USD:
          value: '10.00'
          fx: null
      additionalProperties:
        $ref: '#/components/schemas/TransactionDetailEntry'
    APIErrorResponse:
      title: APIErrorResponse
      required:
        - type
        - message
      type: object
      properties:
        type:
          title: Type
          description: An error code or type.
          type: string
          example: not-found
        message:
          title: Message
          description: A human readable summary of the error.
          type: string
          example: The requested resource was not found
        help:
          title: Help
          description: Additional information that pertains to the error.
          type: string
          example: Please check the resource ID and try again.
      description: Generic Runa API error response.
    ValidationErrorResponse:
      title: ValidationErrorResponse
      required:
        - type
        - message
        - details
      type: object
      properties:
        type:
          title: Type
          description: An error code or type.
          type: string
          example: validation_error
        message:
          title: Message
          description: A human readable summary of the error.
          type: string
          example: >-
            There were one or more problems processing your request, see details
            key.
        help:
          title: Help
          description: Additional information that pertains to the error.
          type: string
          example: null
        details:
          title: Details
          description: Additional details regarding the error.
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
      description: >-
        A validation error response. Returned when the request failed
        validation. This response can contain multiple validation errors, see
        the details key for each.
    AccountPaymentType:
      title: AccountPaymentType
      type: string
      enum:
        - ACCOUNT_BALANCE
      description: Account balance payment.
    CurrencyForAccount:
      type: string
      pattern: ^[A-Z]{3}$
      description: >-
        The currency of the account, represented by ISO 4217 currency codes.
        Check the [currencies](/reference/currencies) for a listing of supported
        currencies.
      example: USD
    MultipleProduct:
      title: Multiple
      required:
        - type
        - values
      type: object
      properties:
        type:
          $ref: '#/components/schemas/MultipleProductType'
        values:
          title: Values
          description: >-
            The codes for the products the end user can choose from when
            redeeming their payout link. All products _must_ use the same
            currency.
          example:
            - AMZ-US
            - AIRBNB-US
          minItems: 2
          type: array
          items:
            type: string
          uniqueItems: true
      description: >-
        Multiple products. The end user will be able to split the payout link's
        value between these products.
    SingleProduct:
      title: Single
      required:
        - type
        - value
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SingleProductType'
        value:
          title: Value
          description: >-
            The code for the product the end user will get when redeeming their
            payout link.
          minLength: 1
          example: AMZ-US
          type: string
      description: >-
        Single product. The end user will be able to redeem the payout link for
        this specific product.
    ProductDiscountMultiplier:
      type: string
      pattern: ^[0-9]+\.[0-9]{2}$
      description: >-
        The discount multiplier used when ordering. `0` means no discount and
        `0.1` means 10% discount. The discount is applied on the price of the
        order item before any fees are applied.
      example: '0.05'
    TransactionDetailEntry:
      type: object
      title: TransactionDetailEntry
      description: >-
        A subtotal of the value purchased and associated fees and data about the
        transaction.
      properties:
        value:
          title: Value
          description: The total value purchased of a payout link currency.
          type: string
          example: '10.00'
        fx:
          $ref: '#/components/schemas/TransactionDetailFXDetails'
      required:
        - value
    ValidationErrorItem:
      title: ValidationErrorItem
      required:
        - type
        - message
        - location
      type: object
      properties:
        type:
          title: Type
          description: The type of error encountered.
          type: string
          example: value_error.number.not_ge
        message:
          title: Message
          description: A human readable summary of the error.
          type: string
          example: ensure this value is greater than or equal to 1
        location:
          title: Location
          description: The location of the error in the submitted entity.
          type: array
          items:
            type: string
          example:
            - items
            - '0'
            - face_value
      description: >-
        A single validation error. The type indicates the error type and the
        message provides a human readable summary of the error. The location
        provides a path to the key in the request body.
    MultipleProductType:
      title: MultipleProductType
      type: string
      enum:
        - MULTIPLE
      description: Multiple products. When more than one product code is provided.
    SingleProductType:
      title: SingleProductType
      type: string
      enum:
        - SINGLE
      description: Single product. When only one product code is provided.
    TransactionDetailFXDetails:
      type: object
      title: TransactionDetailFxDetails
      description: >-
        Provides details on fx conversion for an order transaction detail.
        Present when the payment method currency is different from the
        transaction detail currency.
      properties:
        rate:
          title: FX Rate
          description: >-
            The FX rate received for the transaction between the payout currency
            and payment currency.
          type: string
          example: '1.234'
        rate_symbol:
          title: FX Rate symbol
          description: The currency pair associated with the FX transaction.
          type: string
          example: GBPUSD
        fee:
          title: Fee
          description: The fee charged for making this transaction.
          type: object
          properties:
            value:
              title: Value
              description: The value of the fee.
              type: string
              example: '0.00'
            currency:
              title: Currency
              description: The currency of the fee.
              type: string
              example: USD
          required:
            - value
            - currency
      required:
        - rate
        - rate_symbol
        - fee
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
    ValidationError:
      description: Request failed validation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Your API key. See the [API key](/getting-started/api-key) page on
        details of how to generate and store your keys.

````