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

# Obtener producto por ID

> Devuelve el detalle persistido del producto.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/products/{product_id}
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/products/{product_id}:
    get:
      tags:
        - API
      summary: Obtener producto por ID
      description: Devuelve el detalle persistido del producto.
      operationId: getApiProductById
      parameters:
        - name: product_id
          in: path
          description: ID del producto
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Producto obtenido exitosamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiProductDetailResponse'
        '400':
          description: Parámetro inválido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_product_detail_1
                    error:
                      code: INVALID_REQUEST
                      message: Invalid parameters for retrieving the product
                      retryable: false
                      type: invalid_request_error
                      details: []
        '401':
          description: API key faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: AUTHENTICATION_REQUIRED
                  value:
                    request_id: req_product_detail_1
                    error:
                      code: AUTHENTICATION_REQUIRED
                      message: API key is required in the Authorization header
                      retryable: false
                      type: invalid_request_error
                      details: []
        '403':
          description: Scopes insuficientes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: FORBIDDEN
                  value:
                    request_id: req_product_detail_1
                    error:
                      code: FORBIDDEN
                      message: Your API key does not have permission for this operation
                      retryable: false
                      type: invalid_request_error
                      details: []
        '404':
          description: Producto no encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: NOT_FOUND
                  value:
                    request_id: req_product_detail_1
                    error:
                      code: NOT_FOUND
                      message: Product not found
                      retryable: false
                      type: invalid_request_error
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INTERNAL_ERROR
                  value:
                    request_id: req_product_detail_1
                    error:
                      code: INTERNAL_ERROR
                      message: Could not retrieve the product
                      retryable: false
                      type: invalid_request_error
                      details: []
      x-codeSamples:
        - lang: typescript
          label: La Pyme SDK
          source: |
            import { Lapyme } from "lapyme";

            const lapyme = new Lapyme({
              bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
            });

            const product = await lapyme.products.getProductById({
              productId: "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
            });
components:
  schemas:
    ApiProductDetailResponse:
      type: object
      properties:
        request_id:
          type: string
        data:
          $ref: '#/components/schemas/ApiSharedObject36dfdd5b32'
      required:
        - request_id
        - data
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObjectc671832641'
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedObject36dfdd5b32:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
        category:
          anyOf:
            - $ref: '#/components/schemas/ApiSharedObject8aeeceaf0f'
            - type: 'null'
        sku:
          type: string
        barcode:
          anyOf:
            - type: string
            - type: 'null'
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            External product image URL reference. La Pyme displays it best
            effort and does not copy, ingest, or host the image.
        currency:
          type: string
        cost:
          type: number
        price:
          type: number
        tax_rate:
          $ref: '#/components/schemas/ApiSharedObjectee5eae48b0'
        default_supplier:
          anyOf:
            - $ref: '#/components/schemas/ApiSharedObject8aeeceaf0f'
            - type: 'null'
        product_type:
          $ref: '#/components/schemas/ApiSharedEnumff49232140'
        is_active:
          type: boolean
        organization_slug:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        effective_price:
          type: number
        price_source:
          $ref: '#/components/schemas/ApiSharedEnumfe93f70a59'
        applied_price_list:
          $ref: '#/components/schemas/ApiSharedObjectfc277c542a'
        object:
          type: string
          const: product
        tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject8a94344083'
        variant_group_id:
          type: string
          format: uuid
        variant_options:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties:
                type: string
            - type: 'null'
        is_exempt:
          type: boolean
        metafields:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject0347948139'
        stock_summary:
          $ref: '#/components/schemas/ApiSharedObjecta9f7340006'
      required:
        - id
        - name
        - description
        - category
        - sku
        - barcode
        - image_url
        - currency
        - cost
        - price
        - tax_rate
        - default_supplier
        - product_type
        - is_active
        - organization_slug
        - created_at
        - updated_at
        - object
        - tags
        - variant_group_id
        - variant_options
        - is_exempt
        - metafields
        - stock_summary
      additionalProperties: false
    ApiSharedObjectc671832641:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
      required:
        - code
        - message
      additionalProperties: false
    ApiSharedObject8aeeceaf0f:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
      required:
        - id
        - name
      additionalProperties: false
    ApiSharedObjectee5eae48b0:
      type: object
      properties:
        id:
          type: number
        value:
          type: number
      required:
        - id
        - value
      additionalProperties: false
    ApiSharedEnumff49232140:
      type: string
      enum:
        - product
        - service
        - combo
        - kit
    ApiSharedEnumfe93f70a59:
      type: string
      enum:
        - automatic
        - manual_override
        - manual_fallback
        - base
    ApiSharedObjectfc277c542a:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        is_automatic:
          type: boolean
        automatic_pricing_mode:
          $ref: '#/components/schemas/ApiSharedEnum3c5633618c'
        adjustment_percentage:
          anyOf:
            - type: number
            - type: 'null'
        tax_inclusive:
          type: boolean
      required:
        - id
        - name
        - is_automatic
        - automatic_pricing_mode
        - adjustment_percentage
        - tax_inclusive
      additionalProperties: false
    ApiSharedObject8a94344083:
      type: object
      properties:
        object:
          type: string
          const: tag
        id:
          type: string
          format: uuid
        scope:
          $ref: '#/components/schemas/ApiSharedEnum09f8155a9a'
        name:
          type: string
        slug:
          type: string
        color:
          anyOf:
            - $ref: '#/components/schemas/ApiSharedEnum599647cb76'
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
        archived_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - object
        - id
        - scope
        - name
        - slug
        - color
        - description
        - archived_at
        - created_at
        - updated_at
      additionalProperties: false
    ApiSharedObject0347948139:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
      required:
        - key
        - value
      additionalProperties: false
    ApiSharedObjecta9f7340006:
      type: object
      properties:
        total_quantity:
          type: number
        warehouse_count:
          type: integer
          minimum: 0
        by_warehouse:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObjectf20bf16616'
      required:
        - total_quantity
        - warehouse_count
        - by_warehouse
      additionalProperties: false
    ApiSharedEnum3c5633618c:
      type: string
      enum:
        - base_price_adjustment
        - cost_markup
    ApiSharedEnum09f8155a9a:
      type: string
      enum:
        - customer
        - supplier
        - product
        - sale
        - purchase
        - purchase_order
        - transfer
    ApiSharedEnum599647cb76:
      type: string
      enum:
        - slate
        - red
        - orange
        - amber
        - yellow
        - lime
        - green
        - teal
        - cyan
        - blue
        - indigo
        - violet
        - pink
    ApiSharedObjectf20bf16616:
      type: object
      properties:
        warehouse_id:
          type: string
          format: uuid
        warehouse_name:
          type: string
        quantity:
          type: number
        on_hand:
          type: number
        reserved_quantity:
          type: number
        incoming_quantity:
          type: number
      required:
        - warehouse_id
        - warehouse_name
        - quantity
        - on_hand
        - reserved_quantity
        - incoming_quantity
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````