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

# Bulk import products

> Import multiple products at once. Products with existing IDs will be updated (upsert). Maximum 1000 products per import.



## OpenAPI

````yaml /api-reference/link-product-openapi.json post /products/bulk-import
openapi: 3.0.0
info:
  title: Link Product API
  description: RESTful API for managing payment links, customers, and invoices
  version: 1.0.0
servers:
  - url: https://api.sandbox.cheqpay.mx/lps
    description: Sandbox environment
  - url: https://prod.cheqpay.mx/lps
    description: Production environment
security: []
tags:
  - name: Payment Links
    description: Operations related to payment links
  - name: Invoices
    description: Invoice creation and retrieval
  - name: Products
    description: Product management operations
paths:
  /products/bulk-import:
    post:
      tags:
        - Products
      summary: Bulk import products
      description: >-
        Import multiple products at once. Products with existing IDs will be
        updated (upsert). Maximum 1000 products per import.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkImportProductsRequest'
            example:
              products:
                - name: Product 1
                  price: 1000
                  status: active
                - id: existing-product-id
                  name: Updated Product
                  price: 2000
      responses:
        '200':
          description: Products imported successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkImportProductsResponse'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    BulkImportProductsRequest:
      type: object
      description: Request to bulk import products
      required:
        - products
      properties:
        merchantId:
          type: string
          pattern: ^[a-f\d]{24}$
          description: Merchant ID (defaults to authenticated merchant if not provided)
        products:
          type: array
          minItems: 1
          maxItems: 1000
          description: Array of products to import
          items:
            type: object
            required:
              - name
              - price
            properties:
              id:
                type: string
                description: Custom product identifier (for upsert operations)
              name:
                type: string
                minLength: 1
                description: Product name
              description:
                type: string
                description: Product description
              price:
                type: number
                minimum: 0
                description: Product price
              status:
                type: string
                enum:
                  - active
                  - inactive
                default: active
                description: Product status
              imageUrl:
                type: string
                format: uri
                description: Product image URL
    BulkImportProductsResponse:
      type: object
      description: Response from bulk importing products
      required:
        - success
        - imported
        - total
      properties:
        success:
          type: boolean
          description: Whether the import was successful
          example: true
        imported:
          type: integer
          description: Number of new products imported
          example: 95
        total:
          type: integer
          description: Total number of products in the request
          example: 100
    ValidationError:
      type: object
      description: Validation error response
      properties:
        message:
          type: string
          description: Error message
          example: Validation failed
    UnauthorizedError:
      type: object
      description: Unauthorized error response
      properties:
        message:
          type: string
          description: Error message
          example: Unauthorized
    InternalError:
      type: object
      description: Internal server error response
      properties:
        message:
          type: string
          description: Error message
          example: Internal server error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for merchant authentication

````