> ## Documentation Index
> Fetch the complete documentation index at: https://staging-docs.arcade.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview a seller pricing rule

> Calculates a hypothetical recommendation if you set or clear the direct rule. Returns saved configuration under current and hypothetical pricing under preview.



## OpenAPI

````yaml /openapi.json post /pricing/previewRule
openapi: 3.1.1
info:
  title: Arcade API
  version: '1'
  description: >-
    Generate patterns and custom products from text prompts, and order them.
    Every request is a POST with a JSON body.
servers:
  - url: https://staging-platform.arcade.ai/v1
    description: Staging
security:
  - apiKey: []
tags:
  - name: Patterns
    description: Reusable print patterns you generate or upload.
  - name: Refine
    description: Edit, recolor, crop and extend patterns.
  - name: Jobs
    description: Long-running work.
  - name: References
    description: Images that guide generation.
  - name: Models
    description: The models that generate patterns.
  - name: Categories
    description: Product types and their options.
  - name: Products
    description: Products generated from a prompt or made from your patterns.
  - name: Pricing
    description: Your seller pricing rules and previews.
  - name: Checkouts
    description: Checkouts for ordering products.
  - name: Orders
    description: Your orders.
  - name: Feedback
    description: Reports about the API to Arcade.
paths:
  /pricing/previewRule:
    post:
      tags:
        - Pricing
      summary: Preview a seller pricing rule
      description: >-
        Calculates a hypothetical recommendation if you set or clear the direct
        rule. Returns saved configuration under current and hypothetical pricing
        under preview.
      operationId: pricing.previewRule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target:
                  anyOf:
                    - type: object
                      properties:
                        type:
                          const: account
                      required:
                        - type
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: category
                        categoryId:
                          type: string
                          minLength: 1
                          description: The category's ID, from `categories/list`.
                      required:
                        - type
                        - categoryId
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          const: product
                        productId:
                          type: string
                          minLength: 1
                          description: The product's ID.
                      required:
                        - type
                        - productId
                      additionalProperties: false
                change:
                  anyOf:
                    - type: object
                      properties:
                        operation:
                          const: set
                        rule:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  const: fixed
                                price:
                                  type: object
                                  properties:
                                    amount:
                                      type: string
                                      pattern: ^\d{1,10}(?:\.\d{1,2})?$
                                      description: >-
                                        A nonnegative USD amount up to
                                        9999999999.99, with up to two decimal
                                        places.
                                    currency:
                                      const: USD
                                  required:
                                    - amount
                                    - currency
                                  additionalProperties: false
                              required:
                                - type
                                - price
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  const: wholesale_amount
                                delta:
                                  type: object
                                  properties:
                                    amount:
                                      type: string
                                      pattern: ^[+-]?\d{1,10}(?:\.\d{1,2})?$
                                      description: >-
                                        A signed USD amount up to 9999999999.99
                                        in magnitude, with up to two decimal
                                        places.
                                    currency:
                                      const: USD
                                  required:
                                    - amount
                                    - currency
                                  additionalProperties: false
                              required:
                                - type
                                - delta
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  const: wholesale_percent
                                percent:
                                  type: string
                                  pattern: ^[+-]?\d{1,5}(?:\.\d{1,2})?$
                                  description: >-
                                    A signed percent from -100.00 through
                                    10000.00, with up to two decimal places.
                              required:
                                - type
                                - percent
                              additionalProperties: false
                      required:
                        - operation
                        - rule
                      additionalProperties: false
                    - type: object
                      properties:
                        operation:
                          const: clear
                      required:
                        - operation
                      additionalProperties: false
                exampleProductId:
                  type: string
                  minLength: 1
                  description: >-
                    An owned, offered saved product to price as a sample. For a
                    category, it must belong to that exact category.
              required:
                - target
                - change
              additionalProperties: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  operation:
                    const: previewRule
                  current:
                    anyOf:
                      - type: object
                        properties:
                          ruleId:
                            type: string
                            minLength: 1
                            maxLength: 1024
                            description: An opaque ID for a rule owned by your account.
                          revision:
                            type: string
                            minLength: 1
                            maxLength: 1024
                            description: >-
                              The current direct revision from pricing.listRules
                              or a write receipt.
                          configuredRule:
                            anyOf:
                              - anyOf:
                                  - type: object
                                    properties:
                                      type:
                                        const: fixed
                                      price:
                                        type: object
                                        properties:
                                          amount:
                                            type: string
                                            pattern: ^\d{1,10}(?:\.\d{1,2})?$
                                            description: >-
                                              A nonnegative USD amount up to
                                              9999999999.99, with up to two decimal
                                              places.
                                          currency:
                                            const: USD
                                        required:
                                          - amount
                                          - currency
                                        additionalProperties: false
                                    required:
                                      - type
                                      - price
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      type:
                                        const: wholesale_amount
                                      delta:
                                        type: object
                                        properties:
                                          amount:
                                            type: string
                                            pattern: ^[+-]?\d{1,10}(?:\.\d{1,2})?$
                                            description: >-
                                              A signed USD amount up to 9999999999.99
                                              in magnitude, with up to two decimal
                                              places.
                                          currency:
                                            const: USD
                                        required:
                                          - amount
                                          - currency
                                        additionalProperties: false
                                    required:
                                      - type
                                      - delta
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      type:
                                        const: wholesale_percent
                                      percent:
                                        type: string
                                        pattern: ^[+-]?\d{1,5}(?:\.\d{1,2})?$
                                        description: >-
                                          A signed percent from -100.00 through
                                          10000.00, with up to two decimal places.
                                    required:
                                      - type
                                      - percent
                                    additionalProperties: false
                              - type: 'null'
                          target:
                            anyOf:
                              - type: object
                                properties:
                                  type:
                                    const: account
                                required:
                                  - type
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    const: category
                                  categoryId:
                                    type: string
                                    minLength: 1
                                    description: The category's ID, from `categories/list`.
                                required:
                                  - type
                                  - categoryId
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    const: product
                                  productId:
                                    type: string
                                    minLength: 1
                                    description: The product's ID.
                                required:
                                  - type
                                  - productId
                                additionalProperties: false
                          targetStatus:
                            const: active
                        required:
                          - ruleId
                          - revision
                          - configuredRule
                          - target
                          - targetStatus
                      - type: object
                        properties:
                          ruleId:
                            type: string
                            minLength: 1
                            maxLength: 1024
                            description: An opaque ID for a rule owned by your account.
                          revision:
                            type: string
                            minLength: 1
                            maxLength: 1024
                            description: >-
                              The current direct revision from pricing.listRules
                              or a write receipt.
                          configuredRule:
                            anyOf:
                              - anyOf:
                                  - type: object
                                    properties:
                                      type:
                                        const: fixed
                                      price:
                                        type: object
                                        properties:
                                          amount:
                                            type: string
                                            pattern: ^\d{1,10}(?:\.\d{1,2})?$
                                            description: >-
                                              A nonnegative USD amount up to
                                              9999999999.99, with up to two decimal
                                              places.
                                          currency:
                                            const: USD
                                        required:
                                          - amount
                                          - currency
                                        additionalProperties: false
                                    required:
                                      - type
                                      - price
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      type:
                                        const: wholesale_amount
                                      delta:
                                        type: object
                                        properties:
                                          amount:
                                            type: string
                                            pattern: ^[+-]?\d{1,10}(?:\.\d{1,2})?$
                                            description: >-
                                              A signed USD amount up to 9999999999.99
                                              in magnitude, with up to two decimal
                                              places.
                                          currency:
                                            const: USD
                                        required:
                                          - amount
                                          - currency
                                        additionalProperties: false
                                    required:
                                      - type
                                      - delta
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      type:
                                        const: wholesale_percent
                                      percent:
                                        type: string
                                        pattern: ^[+-]?\d{1,5}(?:\.\d{1,2})?$
                                        description: >-
                                          A signed percent from -100.00 through
                                          10000.00, with up to two decimal places.
                                    required:
                                      - type
                                      - percent
                                    additionalProperties: false
                              - type: 'null'
                          targetStatus:
                            const: inactive
                        required:
                          - ruleId
                          - revision
                          - configuredRule
                          - targetStatus
                  preview:
                    type: object
                    properties:
                      basis:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                const: product
                              productId:
                                type: string
                                minLength: 1
                                description: The product's ID.
                              quantity:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                                exclusiveMinimum: 0
                                description: >-
                                  The requested product quantity. Prices are per
                                  sellable unit. The legacy unitPrice floor can
                                  depend on the quantity.
                            required:
                              - type
                              - productId
                              - quantity
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                const: unsampled
                            required:
                              - type
                      effectiveRule:
                        type: object
                        properties:
                          source:
                            anyOf:
                              - type: object
                                properties:
                                  type:
                                    const: account
                                required:
                                  - type
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    const: category
                                  categoryId:
                                    type: string
                                    minLength: 1
                                    description: The category's ID, from `categories/list`.
                                required:
                                  - type
                                  - categoryId
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    const: product
                                  productId:
                                    type: string
                                    minLength: 1
                                    description: The product's ID.
                                required:
                                  - type
                                  - productId
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    const: msrp
                                required:
                                  - type
                                additionalProperties: false
                          rule:
                            anyOf:
                              - anyOf:
                                  - type: object
                                    properties:
                                      type:
                                        const: fixed
                                      price:
                                        type: object
                                        properties:
                                          amount:
                                            type: string
                                            pattern: ^\d{1,10}(?:\.\d{1,2})?$
                                            description: >-
                                              A nonnegative USD amount up to
                                              9999999999.99, with up to two decimal
                                              places.
                                          currency:
                                            const: USD
                                        required:
                                          - amount
                                          - currency
                                        additionalProperties: false
                                    required:
                                      - type
                                      - price
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      type:
                                        const: wholesale_amount
                                      delta:
                                        type: object
                                        properties:
                                          amount:
                                            type: string
                                            pattern: ^[+-]?\d{1,10}(?:\.\d{1,2})?$
                                            description: >-
                                              A signed USD amount up to 9999999999.99
                                              in magnitude, with up to two decimal
                                              places.
                                          currency:
                                            const: USD
                                        required:
                                          - amount
                                          - currency
                                        additionalProperties: false
                                    required:
                                      - type
                                      - delta
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      type:
                                        const: wholesale_percent
                                      percent:
                                        type: string
                                        pattern: ^[+-]?\d{1,5}(?:\.\d{1,2})?$
                                        description: >-
                                          A signed percent from -100.00 through
                                          10000.00, with up to two decimal places.
                                    required:
                                      - type
                                      - percent
                                    additionalProperties: false
                              - type: 'null'
                        required:
                          - source
                          - rule
                      msrp:
                        anyOf:
                          - type: object
                            properties:
                              status:
                                const: available
                              price:
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    description: Decimal amount, e.g. "48.00"
                                  currency:
                                    type: string
                                    description: >-
                                      The currency, as an ISO 4217 code such as
                                      USD.
                                required:
                                  - amount
                                  - currency
                            required:
                              - status
                              - price
                          - type: object
                            properties:
                              status:
                                const: unavailable
                            required:
                              - status
                        description: >-
                          Arcade's merchandise price for the saved
                          configuration.
                      wholesale:
                        anyOf:
                          - type: object
                            properties:
                              status:
                                const: available
                              price:
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    description: Decimal amount, e.g. "48.00"
                                  currency:
                                    type: string
                                    description: >-
                                      The currency, as an ISO 4217 code such as
                                      USD.
                                required:
                                  - amount
                                  - currency
                            required:
                              - status
                              - price
                          - type: object
                            properties:
                              status:
                                const: unavailable
                            required:
                              - status
                        description: >-
                          Arcade's pre-discount wholesale price disclosed to
                          this caller.
                      resale:
                        anyOf:
                          - type: object
                            properties:
                              status:
                                const: available
                              price:
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    description: Decimal amount, e.g. "48.00"
                                  currency:
                                    type: string
                                    description: >-
                                      The currency, as an ISO 4217 code such as
                                      USD.
                                required:
                                  - amount
                                  - currency
                            required:
                              - status
                              - price
                          - type: object
                            properties:
                              status:
                                const: unavailable
                              reason:
                                enum:
                                  - wholesale_unavailable
                                  - msrp_unavailable
                                  - product_required
                                  - unsupported_currency
                                  - rule_out_of_range
                                type: string
                            required:
                              - status
                              - reason
                        description: >-
                          Advisory resale price per sellable unit, before
                          shipping, duty, tax and discounts.
                      floor:
                        anyOf:
                          - type: object
                            properties:
                              status:
                                const: below
                              price:
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    description: Decimal amount, e.g. "48.00"
                                  currency:
                                    type: string
                                    description: >-
                                      The currency, as an ISO 4217 code such as
                                      USD.
                                required:
                                  - amount
                                  - currency
                            required:
                              - status
                              - price
                          - type: object
                            properties:
                              status:
                                const: at_or_above
                              price:
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    description: Decimal amount, e.g. "48.00"
                                  currency:
                                    type: string
                                    description: >-
                                      The currency, as an ISO 4217 code such as
                                      USD.
                                required:
                                  - amount
                                  - currency
                            required:
                              - status
                              - price
                          - type: object
                            properties:
                              status:
                                const: unknown
                            required:
                              - status
                        description: >-
                          The minimum resale price for the saved product. Uses
                          published wholesale when present, or the existing
                          unitPrice when no wholesale rule applies.
                      calculatedResale:
                        type: object
                        properties:
                          amount:
                            type: string
                            description: Decimal amount, e.g. "48.00"
                          currency:
                            type: string
                            description: The currency, as an ISO 4217 code such as USD.
                        required:
                          - amount
                          - currency
                        description: >-
                          The calculated amount before the purchase-price floor
                          increased the effective resale price. Present only
                          when the floor applied.
                    required:
                      - basis
                      - effectiveRule
                      - msrp
                      - wholesale
                      - resale
                      - floor
                    description: Hypothetical pricing. A preview saves no rule.
                required:
                  - operation
                  - current
                  - preview
        '401':
          description: An API key is required.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - status
                  - message
                properties:
                  code:
                    type: string
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
        '403':
          description: The API key is outside the seller pricing cohort.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - status
                  - message
                properties:
                  code:
                    type: string
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
        '404':
          description: The product, category, or sample is missing or inaccessible.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - status
                  - message
                properties:
                  code:
                    type: string
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
        '422':
          description: >-
            Invalid input, or the supplied sample belongs to a different
            category.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - status
                  - message
                properties:
                  code:
                    type: string
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
        5XX:
          description: The service could not establish the requested rule or price inputs.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - status
                  - message
                properties:
                  code:
                    type: string
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: An API key from Settings → API keys in Arcade Studio.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.