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

# Crear proveedor

> Crea un proveedor. **El cuerpo va dentro de la clave `data`.**

**Permiso requerido:** `providers`



## OpenAPI

````yaml /api-reference/openapi.json post /providers
openapi: 3.0.3
info:
  title: FileXpress API Externa
  version: 1.0.0
  description: >-
    API para integrar sistemas de terceros con FileXpress: facturación, RRHH y
    contabilidad.
servers:
  - url: https://api.filexpress.app/api/external
    description: Producción
security:
  - ApiKey: []
tags:
  - name: General
  - name: Facturación · Ventas
  - name: Facturación · Compras
  - name: Facturación · Clientes
  - name: Facturación · Proveedores
  - name: Facturación · Productos
  - name: Catálogos
  - name: RRHH · Empleados
  - name: RRHH · Asistencia
  - name: RRHH · Permisos
  - name: RRHH · Planillas
  - name: Contabilidad
paths:
  /providers:
    post:
      tags:
        - Facturación · Proveedores
      summary: Crear proveedor
      description: |-
        Crea un proveedor. **El cuerpo va dentro de la clave `data`.**

        **Permiso requerido:** `providers`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  $ref: '#/components/schemas/ProviderRequest'
            example:
              data:
                provider_name: Distribuidora XYZ
                legal_name: Distribuidora XYZ S.A. de C.V.
                register_number: 54321-0
                tax_number: 0614-000000-000-0
                address: San Salvador
                country_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                state_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                city_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                phone: 2222-3333
                email: ventas@xyz.com
                business_type: legal
                branch_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
      responses:
        '200':
          description: Proveedor creado
          content:
            application/json:
              example:
                success: true
                data:
                  id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                  provider_name: Distribuidora XYZ
                  legal_name: Distribuidora XYZ S.A. de C.V.
                  register_number: 54321-0
                  tax_number: 0614-000000-000-0
                  address: San Salvador
                  country_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                  state_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                  city_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                  phone: 2222-3333
                  email: ventas@xyz.com
                  business_type: legal
                message: Data retrieved successfully.
        '401':
          $ref: '#/components/responses/E401'
        '403':
          $ref: '#/components/responses/E403'
        '404':
          $ref: '#/components/responses/ELegacyValidation'
        '429':
          $ref: '#/components/responses/E429'
components:
  schemas:
    ProviderRequest:
      type: object
      properties:
        provider_name:
          type: string
        legal_name:
          type: string
        register_number:
          type: string
        tax_number:
          type: string
        address:
          type: string
        country_id:
          type: string
          format: uuid
        state_id:
          type: string
          format: uuid
        city_id:
          type: string
          format: uuid
        phone:
          type: string
        email:
          type: string
        business_type:
          type: string
          description: Tipo.
          enum:
            - natural
            - legal
        branch_id:
          type: string
          format: uuid
      required:
        - provider_name
        - address
        - country_id
        - state_id
        - city_id
        - phone
        - email
        - business_type
        - branch_id
  responses:
    E401:
      description: API Key ausente o inválida
      content:
        application/json:
          example:
            status: false
            message: Invalid API Key.
    E403:
      description: Integración sin el permiso requerido o desactivada
      content:
        application/json:
          example:
            status: false
            message: This integration does not have the 'hr.employees' permission.
            required_scope: hr.employees
    ELegacyValidation:
      description: 'Error de validación (formato heredado: responde 404)'
      content:
        application/json:
          example:
            success: false
            message: Validation Error.
            data:
              email:
                - The email field is required.
    E429:
      description: Límite de peticiones excedido
      content:
        application/json:
          example:
            status: false
            message: Rate limit exceeded. Please try again later.
            rate_limit: 100
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key de la integración (Integraciones → Nueva Integración).

````

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