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

# Get product sizing

> Whether Kleep can size the product, its sizes, how it fits ("does it run small?") and, with `include=questions`, the questions to ask. No shopper data needed. Call it when the conversation turns to a product.



## OpenAPI

````yaml /partners/openapi.json get /products/{product_id}/sizing
openapi: 3.0.3
info:
  title: Kleep Partner API
  version: 1.0.0
  description: >-
    Size recommendations for conversational agents: customer-service agents, AI
    shopping assistants and AI agents, on behalf of Kleep retailers.
servers:
  - url: https://fit.kleep.ai/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /products/{product_id}/sizing:
    get:
      summary: Get product sizing
      description: >-
        Whether Kleep can size the product, its sizes, how it fits ("does it run
        small?") and, with `include=questions`, the questions to ask. No shopper
        data needed. Call it when the conversation turns to a product.
      operationId: getProductSizing
      parameters:
        - name: Kleep-Retailer
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            The retailer's Kleep `public_id`. Every call is scoped to one
            retailer.
        - name: product_id
          in: path
          required: true
          schema:
            type: string
          description: The retailer's product ID, as in its catalog.
        - name: include
          in: query
          schema:
            type: string
            enum:
              - questions
          description: Add the questions that apply to this product.
        - name: locale
          in: query
          schema:
            type: string
            default: en
          description: BCP 47 language tag for prompts and sentences, for example `fr-FR`.
        - name: market
          in: query
          schema:
            type: string
          description: ISO 3166-1 alpha-2 country, for market-specific size labels.
      responses:
        '200':
          description: Product sizing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductSizing'
              example:
                product_id: JEAN-0142
                supported: true
                category: clothing
                sizes:
                  - label: S
                    variant_id: JEAN-0142-S
                    available: true
                  - label: M
                    variant_id: JEAN-0142-M
                    available: true
                  - label: L
                    variant_id: JEAN-0142-L
                    available: false
                product_fit:
                  tendency: runs_small
                  score: -0.4
                  summary: >-
                    This style runs slightly small: most shoppers take one size
                    up.
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Invalid API key
        '403':
          description: This retailer has not enabled your integration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: retailer_not_enabled
                  message: Retailer 9b1f… has not enabled this partner
        '404':
          description: The product is not in the retailer's catalog.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: product_not_found
                  message: No product JEAN-9999 for this retailer
        '429':
          description: >-
            Rate limit reached. Retry after the number of seconds in
            `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Too many requests
components:
  schemas:
    ProductSizing:
      type: object
      required:
        - product_id
        - supported
      properties:
        product_id:
          type: string
        supported:
          type: boolean
          description: >-
            `true` when Kleep can recommend a size for this product. Offer size
            help only then.
        category:
          $ref: '#/components/schemas/Category'
        sizes:
          type: array
          items:
            $ref: '#/components/schemas/Size'
          description: The product's sizes, in size order.
        product_fit:
          $ref: '#/components/schemas/ProductFit'
        questions:
          type: array
          items:
            $ref: '#/components/schemas/Question'
          description: >-
            Questions that apply to this product, when `include=questions` is
            set.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - retailer_not_enabled
                - invalid_input
                - missing_inputs
                - product_not_found
                - product_not_supported
                - profile_not_found
                - recommendation_not_found
                - rate_limited
                - internal_error
              description: >-
                Stable, machine-readable error code. Branch on this, not on
                `message`.
            message:
              type: string
              description: >-
                Human-readable explanation, in English. Not meant to be shown to
                shoppers.
            missing:
              type: array
              items:
                type: string
              description: '`missing_inputs` only: the ids of the answers still needed.'
            questions:
              type: array
              items:
                $ref: '#/components/schemas/Question'
              description: >-
                `missing_inputs` only: the questions to ask for the missing
                answers, localized.
            details:
              type: object
              additionalProperties: true
              description: '`invalid_input` only: the offending fields.'
    Category:
      type: string
      enum:
        - clothing
        - lingerie
        - footwear
        - kids
      description: Sizing category of the product. It decides which questions apply.
    Size:
      type: object
      required:
        - label
        - variant_id
      properties:
        label:
          type: string
          description: >-
            Size label as the retailer displays it in this market, for example
            `M`, `38` or `32 Long`.
        variant_id:
          type: string
          description: >-
            The retailer's variant ID for this size, as in its catalog: use it
            to add to cart.
        available:
          type: boolean
          description: '`true` when the variant is in stock.'
    ProductFit:
      type: object
      nullable: true
      description: >-
        How the product fits compared to its size chart, from Kleep's purchase
        and return data. `null` when there isn't enough data.
      properties:
        tendency:
          type: string
          enum:
            - runs_very_small
            - runs_small
            - true_to_size
            - runs_large
            - runs_very_large
        score:
          type: number
          minimum: -1
          maximum: 1
          description: >-
            Same signal as a number: -1 runs very small, 0 true to size, 1 runs
            very large.
        summary:
          type: string
          description: Ready-to-say sentence in the requested locale.
    Question:
      type: object
      required:
        - id
        - required
        - type
        - prompt
      properties:
        id:
          type: string
          description: >-
            Path of the answer in `measurements`, for example `height_cm` or
            `body_shape.hips`.
        required:
          type: boolean
        type:
          type: string
          enum:
            - choice
            - number
            - integer
            - text
        prompt:
          type: string
          description: >-
            Ready-to-ask wording in the requested locale. Rephrase freely to
            match your bot's tone.
        unit:
          type: string
          enum:
            - cm
            - kg
        min:
          type: number
        max:
          type: number
        default:
          type: string
          description: Value Kleep assumes when an optional question is skipped.
        options:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
              label:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your partner API key: `kp_live_…` in production, `kp_test_…` on the
        sandbox retailer.

````

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