openapi: 3.0.2
info:
  title: SAT Personas Morales API
  description: <p>SAT Personas Morales API.<br/><br/><img src='https://developer.circulodecredito.com.mx/sites/default/files/2024-01/Logo-Swaggers.png' width='240'/></p>  
  termsOfService: https://developer.circulodecredito.com.mx/legal-mx
  contact:
    email: api@circulodecredito.com.mx
  license:
    name: Derechos reservados Circulo de Crédito 2020
    url: http://www.circulodecredito.com.mx
  version: "1.0"
servers:
- url: https://services.circulodecredito.com.mx/v1/sat
paths:
  /login:
    post:
      tags:
      - Credentials
      operationId: CreateCredential
      parameters:
      - name: x-signature
        in: header
        description: Firma generada con la llave privada
        required: true
        schema:
          type: string
          nullable: false
      - name: x-api-key
        in: header
        description: ConsumerKey obtenido desde el portal de desarrolladores
        required: true
        schema:
          type: string
          nullable: false
      - name: username
        in: header
        description: Usuario de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: password
        in: header
        description: Contraseña de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: subscriptionid
        in: header
        description: Id de su subscripción
        required: true
        schema:
          type: string
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
          nullable: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CredentialCiecInput'
        required: false
      responses:
        200:
          description: Taxpayer tax status collection response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseCredential'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseUnauthorized'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
  /taxpayers/{id}/invoices:
    get:
      tags:
      - Invoices
      summary: ListTaxpayerInvoice
      description: List all taxpayer invoices
      operationId: ListTaxpayerInvoice
      parameters:
      - name: x-signature
        in: header
        description: Firma generada con la llave privada
        required: true
        schema:
          type: string
          nullable: false
      - name: x-api-key
        in: header
        description: ConsumerKey obtenido desde el portal de desarrolladores
        required: true
        schema:
          type: string
          nullable: false
      - name: x-request-id
        in: header
        description: idA value returned in POST /login
        required: true
        schema:
          type: string
          nullable: false
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
      - name: x-data-provider
        in: header
        description: Id Data Provider
        required : true
        schema: 
          type: string
          enum: ["A", "B"]
          nullable: false
      - name: username
        in: header
        description: Usuario de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: password
        in: header
        description: Contraseña de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: id
        in: path
        description: RFC (Registro Federal de Contribuyentes)
        required: true
        schema:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
      - name: uuid
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by UUID/Folio Fiscal (exact match)
        schema:
          type: string
          format: uuid
      - name: version
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by CFDI version (exact match)
        schema:
          type: number
          format: double
      - name: type
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by type (exact match)
        schema:
          type: string
          enum:
          - I
          - E
          - P
          - N
          - T
      - name: usage
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by usage (exact match)
        schema:
          type: string
      - name: paymentType
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by payment type (exact match)
        schema:
          type: string
          enum:
          - PUE
          - PPD
      - name: paymentMethod
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by payment method (exact match)
        schema:
          type: string
      - name: issuer.rfc
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by issuer RFC (partial match)
        schema:
          maxLength: 13
          minLength: 12
          type: string
      - name: issuer.name
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by issuer name (partial match)
        schema:
          maxLength: 254
          minLength: 1
          type: string
      - name: issuer.taxRegime
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by issuer tax regime (partial match)
        schema:
          type: number
          format: double
      - name: issuer.blacklistStatus
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by issuer blacklist status
        schema:
          type: string
          enum:
          - presumed
          - dismissed
          - definitive
          - favorable
      - name: isIssuer
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter if the invoice issuer is the taxpayer from the link
        schema:
          type: boolean
      - name: receiver.rfc
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by receiver RFC (partial match)
        schema:
          maxLength: 13
          minLength: 12
          type: string
      - name: receiver.name
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by receiver name (partial match)
        schema:
          maxLength: 254
          minLength: 1
          type: string
      - name: receiver.blacklistStatus
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by receiver blacklist status
        schema:
          type: string
          enum:
          - presumed
          - dismissed
          - definitive
          - favorable
      - name: isReceiver
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter if the invoice receiver is the taxpayer from the link
        schema:
          type: boolean
      - name: currency
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by currency code (exact match)
        schema:
          maxLength: 3
          minLength: 3
          type: string
      - name: status
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by status (exact match)
        schema:
          type: string
          enum:
          - VIGENTE
          - CANCELADO
      - name: pac
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by certification provider (partial match)
        schema:
          maxLength: 12
          minLength: 12
          type: string
      - name: cancellationStatus
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by cancellation status (partial match)
        schema:
          type: string
          enum:
          - Cancelable sin aceptación
          - Cancelable con aceptación
          - No cancelable
      - name: cancellationStatusProcess
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by cancellation process status (partial match)
        schema:
          type: string
          enum:
          - En proceso
          - Solicitud rechazada
          - Cancelado sin aceptación
          - Cancelado con aceptación
          - Plazo vencido
      - name: issuedAt[before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by issue date (less than or equal `<=`)
        schema:
          type: string
          format: date-time
      - name: issuedAt[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by issue date (less than `<`)
        schema:
          type: string
          format: date-time
      - name: issuedAt[after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by issue date (greater than or equal `>=`)
        schema:
          type: string
          format: date-time
      - name: issuedAt[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by issue date (greater than `>`)
        schema:
          type: string
          format: date-time
      - name: canceledAt[before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by cancellation date (less than or equal `<=`)
        schema:
          type: string
          format: date-time
      - name: canceledAt[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by cancellation date (less than `<`)
        schema:
          type: string
          format: date-time
      - name: canceledAt[after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by cancellation date (greater than or equal `>=`)
        schema:
          type: string
          format: date-time
      - name: canceledAt[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by cancellation date (greater than `>`)
        schema:
          type: string
          format: date-time
      - name: createdAt[before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by creation date (less than or equal `<=`)
        schema:
          type: string
      - name: createdAt[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by creation date (less than `<`)
        schema:
          type: string
      - name: createdAt[after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by creation date (greater than or equal `>=`)
        schema:
          type: string
      - name: createdAt[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by creation date (greater than `>`)
        schema:
          type: string
      - name: updatedAt[before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by update date (less than or equal `<=`)
        schema:
          type: string
      - name: updatedAt[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by update date (less than `<`)
        schema:
          type: string
      - name: updatedAt[after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by update date (greater than or equal `>=`)
        schema:
          type: string
      - name: updatedAt[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by update date (greater than `>`)
        schema:
          type: string
      - name: certifiedAt[before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by certified date (less than or equal `<=`)
        schema:
          type: string
          format: date-time
      - name: certifiedAt[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by certified date (less than `<`)
        schema:
          type: string
          format: date-time
      - name: certifiedAt[after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by certified date (greater than or equal `>=`)
        schema:
          type: string
          format: date-time
      - name: certifiedAt[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by certified date (greater than `>`)
        schema:
          type: string
          format: date-time
      - name: lastPaymentDate[before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by last payment date (less than or equal `<=`)
        schema:
          type: string
          format: date-time
      - name: lastPaymentDate[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by last payment date (less than `<`)
        schema:
          type: string
          format: date-time
      - name: lastPaymentDate[after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by last payment date (greater than or equal `>=`)
        schema:
          type: string
          format: date-time
      - name: lastPaymentDate[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by last payment date (greater than `>`)
        schema:
          type: string
          format: date-time
      - name: fullyPaidAt[before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by fully paid date (less than or equal `<=`)
        schema:
          type: string
          format: date-time
      - name: fullyPaidAt[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by fully paid date (less than `<`)
        schema:
          type: string
          format: date-time
      - name: fullyPaidAt[after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by fully paid date (greater than or equal `>=`)
        schema:
          type: string
          format: date-time
      - name: fullyPaidAt[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by fully paid date (greater than `>`)
        schema:
          type: string
          format: date-time
      - name: tax[between]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by tax between two values
        schema:
          type: string
      - name: tax[gt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by tax (greater than `>`)
        schema:
          type: number
          format: double
      - name: tax[gte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by tax (greater than or equal `>=`)
        schema:
          type: number
          format: double
      - name: tax[lt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by tax (less than `<`)
        schema:
          type: number
          format: double
      - name: tax[lte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by tax (less than or equal `<=`)
        schema:
          type: number
          format: double
      - name: discount[between]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by discount between two values
        schema:
          type: string
      - name: discount[gt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by discount (greater than `>`)
        schema:
          type: number
          format: double
      - name: discount[gte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by discount (greater than or equal `>=`)
        schema:
          type: number
          format: double
      - name: discount[lt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by discount (less than `<`)
        schema:
          type: number
          format: double
      - name: discount[lte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by discount (less than or equal `<=`)
        schema:
          type: number
          format: double
      - name: subtotal[between]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by subtotal between two values
        schema:
          type: string
      - name: subtotal[gt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by subtotal (greater than `>`)
        schema:
          type: number
          format: double
      - name: subtotal[gte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by subtotal (greater than or equal `>=`)
        schema:
          type: number
          format: double
      - name: subtotal[lt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by subtotal (less than `<`)
        schema:
          type: number
          format: double
      - name: subtotal[lte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by subtotal (less than or equal `<=`)
        schema:
          type: number
          format: double
      - name: total[between]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by total between two values
        schema:
          type: string
      - name: total[gt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by total (greater than `>`)
        schema:
          type: number
          format: double
      - name: total[gte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by total (greater than or equal `>=`)
        schema:
          type: number
          format: double
      - name: total[lt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by total (less than `<`)
        schema:
          type: number
          format: double
      - name: total[lte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by total (less than or equal `<=`)
        schema:
          type: number
          format: double
      - name: paidAmount[between]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by paidAmount between two values
        schema:
          type: string
      - name: paidAmount[gt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by paidAmount (greater than `>`)
        schema:
          type: number
          format: double
      - name: paidAmount[gte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by paidAmount (greater than or equal `>=`)
        schema:
          type: number
          format: double
      - name: paidAmount[lt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by paidAmount (less than `<`)
        schema:
          type: number
          format: double
      - name: paidAmount[lte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by paidAmount (less than or equal `<=`)
        schema:
          type: number
          format: double
      - name: dueAmount[between]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by dueAmount between two values
        schema:
          type: string
      - name: dueAmount[gt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by dueAmount (greater than `>`)
        schema:
          type: number
          format: double
      - name: dueAmount[gte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by dueAmount (greater than or equal `>=`)
        schema:
          type: number
          format: double
      - name: dueAmount[lt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by dueAmount (less than `<`)
        schema:
          type: number
          format: double
      - name: dueAmount[lte]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by dueAmount (less than or equal `<=`)
        schema:
          type: number
          format: double
      - name: hasXml
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by invoices that have the CFDI available in XML format
        schema:
          type: boolean
      - name: hasPdf
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Filter by invoices that have the CFDI available in PDF format
        schema:
          type: boolean
      - name: order[issuedAt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Order by issue date
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: order[canceledAt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Order by cancellation date
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: order[certifiedAt]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Order by certification date
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: order[amount]
        in: query
        description: <b>Only for Data Provider "A".</b> <br> Order by amount
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: page
        in: query
        description: <b>Only for Data Provider "A".</b> <br> The collection page number
        schema:
          type: integer
          format: int32
          default: 1
      - name: itemsPerPage
        in: query
        description: <b>Only for Data Provider "A".</b> <br> The number of items per page
        schema:
          maximum: 100
          exclusiveMaximum: false
          minimum: 1
          exclusiveMinimum: false
          type: integer
          format: int32
          default: 30
      - name: fromDate
        in: query
        description: <b>Only for Data Provider "B".</b> <br> Date indicating the start date to filter against ( `>=`)
        schema:
          type: string
          format: date
          example: 2023-01-01
      - name: toDate
        in: query
        description: <b>Only for Data Provider "B".</b> <br> Date indicating the end date to filter against ( `<=`)
        schema:
          type: string
          format: date
          example: 2023-12-01
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                  oneOf:
                    - $ref: '#/components/schemas/responseTaxPayerInvoice'
                    - $ref: '#/components/schemas/invoicesResponsesProviderB'
              examples:
                DataProviderA:
                  summary: DataProviderA
                  description: 'DataProvider A Example'
                  value:
                    "@context": "/contexts/Invoice"
                    "@id": "/taxpayers/PEIC211118IS0/invoices"
                    "@type": hydra:Collection
                    hydra:member:
                    - "@id": "/invoices/91106968-1abd-4d64-85c1-4e73d96fb997"
                      "@type": Invoice
                      id: 91106968-1abd-4d64-85c1-4e73d96fb997
                      uuid: def404af-5eef-4112-aa99-d1ec8493b89a
                      version: 3.3
                      reference: Branch-A
                      internalIdentifier: '00001'
                      type: I
                      usage: G03
                      paymentType: PUE
                      paymentMethod: '04'
                      placeOfIssue: '01210'
                      issuer:
                        rfc: AOM920820BEA
                        name: APPLE OPERATIONS MEXICO S.A. DE C.V.
                        taxRegime: 601
                      isIssuer: true
                      receiver:
                        rfc: PEIC211118IS0
                        name: Pedro Infante Cruz
                        blacklistStatus: presumed
                      isReceiver: false
                      currency: MXN
                      discount: 3324
                      tax: 5224
                      subtotal: 51349.8
                      total: 53249.8
                      exchangeRate: 19.8
                      paidAmount: 53249.8
                      dueAmount: 0
                      lastPaymentDate: '2024-08-02T16:07:21.674Z'
                      fullyPaidAt: '2024-08-02T16:07:21.674Z'
                      paymentTermsRaw: Tarjeta de crédito
                      status: VIGENTE
                      pac: SAT970701NN3
                      issuedAt: '2019-01-03T21:10:40Z'
                      certifiedAt: '2019-01-03T21:10:41Z'
                      cancellationStatus: Cancelable con aceptación
                      cancellationProcessStatus: En proceso
                      canceledAt: '2024-08-02T16:07:21.674Z'
                      items:
                      - identificationNumber: Z0V0
                        productIdentification: '43211503'
                        description: MBP 15.4 SPACE GRAY
                        unitAmount: 45905
                        unitCode: H87
                        quantity: 1
                        discountAmount: 0
                        taxType: '002'
                        taxRate: 0.16
                        taxAmount: 7344.8
                        totalAmount: 45905
                      relations:
                      - "@id": "/invoices/relations/93a197e7-6baa-5dc5-bf8d-fb1645a770c1"
                        "@type": InvoiceRelation
                        id: 91106968-1abd-4d64-85c1-4e73d96fb997
                        type: 7
                        invoice: "/invoices/92106967-2abd-5d64-95c2-4e73d96fb998"
                        relatedInvoice: "/invoices/92106967-2abd-5d64-95c2-4e73d96fb998"
                        relatedInvoiceUuid: def404af-5eef-4112-aa99-d1ec8493b89a
                        createdAt: '2020-01-01T12:15:00.000Z'
                        updatedAt: '2020-01-01T12:15:00.000Z'
                      appliedCredits:
                      - "@id": "/invoices/credit-note/91106968-1abd-4d64-85c1-4e73d96fb997"
                        "@type": InvoicePayment
                        appliedInvoice: "/invoices/91106968-1abd-4d64-85c1-4e73d96fb997"
                        issuedInvoice: "/invoices/91106968-1abd-4d64-85c1-4e73d96fb997"
                        issuedAt: '2024-08-02T16:07:21.674Z'
                        proportionalRate: 19.8
                        amount: 19.8
                        issuedInvoiceTotal: 19.8
                        canceledAt: '2024-08-02T16:07:21.674Z'
                        createdAt: '2020-01-01T12:15:00.000Z'
                        updatedAt: '2020-01-01T12:15:00.000Z'
                      issuedCredits:
                      - "@id": "/invoices/credit-note/91106968-1abd-4d64-85c1-4e73d96fb997"
                        "@type": InvoicePayment
                        appliedInvoice: "/invoices/91106968-1abd-4d64-85c1-4e73d96fb997"
                        issuedInvoice: "/invoices/91106968-1abd-4d64-85c1-4e73d96fb997"
                        issuedAt: '2024-08-02T16:07:21.674Z'
                        proportionalRate: 19.8
                        amount: 19.8
                        issuedInvoiceTotal: 19.8
                        canceledAt: '2024-08-02T16:07:21.674Z'
                        createdAt: '2020-01-01T12:15:00.000Z'
                        updatedAt: '2020-01-01T12:15:00.000Z'
                      xml: true
                      pdf: true
                      createdAt: '2020-01-01T12:15:00.000Z'
                      updatedAt: '2020-01-01T12:15:00.000Z'
                    hydra:totalItems: 1

                DataProviderB:
                  summary: DataProviderB
                  description: 'DataProvider B Example'
                  value:
                    applicantId: '1007127097'
                    refApplicantId: b163b38f-6d43-4ead-b78c-315d9134ad41
                    customerInvoices:
                    - customerId: '18369754'
                      id1: 1AE7EB89-FA25-488E-A7E3-D759885B0541
                      issueDate: '2023-01-30T00:00:00'
                      amount: 7717.48
                      invoiceId: a61c8789-a33d-4580-8034-ca88d111301f
                      dueDate: '2023-04-30T00:00:00'
                      paymentDate: '2023-01-31T00:00:00'
                      balance: 0
                      credited: 0
                    - customerId: '18369754'
                      id1: 20B64AC4-097E-4D4F-B11F-F96DF4B78518
                      issueDate: '2023-01-30T00:00:00'
                      amount: 10289.2
                      invoiceId: 7f5f65ff-1374-4a58-8383-f7d553b81621
                      dueDate: '2023-04-30T00:00:00'
                      paymentDate: '2023-01-31T00:00:00'
                      balance: 0
                      credited: 0
                    - customerId: '18369761'
                      id1: 303440B2-B738-4BCF-8263-3F4692F13BE0
                      issueDate: '2023-01-18T00:00:00'
                      amount: 3722.27
                      invoiceId: 41095190-f1cb-43f8-87a8-4d416c7c6535
                      dueDate: '2023-04-18T00:00:00'
                      paymentDate: '2023-02-19T00:00:00'
                      balance: 0
                      credited: 0
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      deprecated: false
  /tax-returns/{id}/data:
    get:
      tags:
      - TaxReturns
      summary: GetTaxReturnData
      description: Process a legal taxpayer annual tax return pdf and extracts the
        content from incomes statement and balance sheet
      operationId: GetTaxReturnData
      parameters:
      - name: x-signature
        in: header
        description: Firma generada con la llave privada
        required: true
        schema:
          type: string
          nullable: false
      - name: x-api-key
        in: header
        description: ConsumerKey obtenido desde el portal de desarrolladores
        required: true
        schema:
          type: string
          nullable: false
      - name: x-data-provider
        in: header
        description: Id Data Provider
        required : true
        schema: 
          type: string
          enum: ["A"]
          nullable: false
      - name: x-request-id
        in: header
        description: idA value returned in POST /login
        required: true
        schema:
          type: string
          nullable: false
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
      - name: username
        in: header
        description: Usuario de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: password
        in: header
        description: Contraseña de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: id
        in: path
        description: Tax Return ID
        required: true
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Annual tax return data response
          content:
            application/json:
              schema:
                type: object
              example:
                ESTADO DE RESULTADOS:
                  VENTAS Y/O SERVICIOS NACIONALES:
                    PARTES NO RELACIONADAS: 25447832
                    TOTAL: 25447832
                  VENTAS Y/O SERVICIOS EXTRANJEROS:
                    PARTES NO RELACIONADAS: 12340
                    TOTAL: 12340
                  DEVOLUCIONES, DESCUENTOS Y BONIFICACIONES SOBRE VENTAS NACIONALES:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  DEVOLUCIONES, DESCUENTOS Y BONIFICACIONES SOBRE VENTAS AL EXTRANJERO:
                    PARTES RELACIONADAS: 0
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  INGRESOS NETOS:
                    PARTES RELACIONADAS: 0
                    PARTES NO RELACIONADAS: 17447933
                    TOTAL: 17447933
                  COMPRAS NETAS NACIONALES:
                    PARTES NO RELACIONADAS: 5100423
                    TOTAL: 5100423
                  COMPRAS NETAS DE IMPORTACIÓN:
                    PARTES NO RELACIONADAS: 1124038
                    TOTAL: 1124038
                  COSTO DE LAS MERCANCÍAS: 6024467
                  MANO DE OBRA:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  MAQUILAS:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  GASTOS INDIRECTOS DE FABRICACIÓN:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  COSTO DE VENTAS Y/O SERVICIOS:
                    PARTES RELACIONADAS: 6024467
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 6024467
                  UTILIDAD BRUTA: 9423466
                  PÉRDIDA BRUTA: 0
                  GASTOS DE OPERACIÓN:
                    PARTES NO RELACIONADAS: 8155730
                    TOTAL: 8155730
                  UTILIDAD DE OPERACIÓN: 267734
                  INTERESES DEVENGADOS A FAVOR NACIONALES:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  INTERESES DEVENGADOS A FAVOR DEL EXTRANJERO:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  INTERESES MORATORIOS A FAVOR NACIONALES:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  INTERESES MORATORIOS A FAVOR DEL EXTRANJERO:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  GANANCIA CAMBIARIA:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  INTERESES DEVENGADOS A CARGO NACIONALES:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  INTERESES DEVENGADOS A CARGO DEL EXTRANJERO:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  INTERESES MORATORIOS A CARGO NACIONALES:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  INTERESES MORATORIOS A CARGO DEL EXTRANJERO:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  PÉRDIDA CAMBIARIA:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  RESULTADO POR POSICIÓN MONETARIA FAVORABLE: {}
                  RESULTADO POR POSICIÓN MONETARIA DESFAVORABLE: {}
                  OTRAS OPERACIONES FINANCIERAS NACIONALES:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  OTRAS OPERACIONES FINANCIERAS EXTRANJERAS:
                    PARTES NO RELACIONADAS: 0
                    TOTAL: 0
                  OTRAS OPERACIONES FINANCIERAS: 0
                  RESULTADO INTEGRAL DE FINANCIAMIENTO: 0
                  OTROS GASTOS NACIONALES: 125381
                  OTROS GASTOS: 125381
                  OTROS PRODUCTOS NACIONALES: 0
                  OTROS PRODUCTOS EXTRANJEROS: 0
                  OTROS PRODUCTOS: 0
                  UTILIDAD ANTES DE IMPUESTOS: 82354
                  UTILIDAD NETA: 52355
                ESTADO DE POSICIÓN FINANCIERA (BALANCE):
                  ACTIVOS:
                    EFECTIVO EN CAJA Y DEPÓSITOS EN INSTITUCIONES DE CRÉDITO NACIONALES: 115202
                    CUENTAS Y DOCUMENTOS POR COBRAR NACIONALES:
                      PARTES NO RELACIONADAS: 230000
                      TOTAL: 230000
                    CUENTAS Y DOCUMENTOS POR COBRAR DEL EXTRANJERO:
                      PARTES NO RELACIONADAS: 0
                      TOTAL: 0
                    CONTRIBUCIONES A FAVOR: 43212
                    INVENTARIOS: 0
                    OTROS ACTIVOS CIRCULANTES: 5728
                    INVERSIONES EN ACCIONES DEL EXTRANJERO: 0
                    INVERSIONES EN ACCIONES (TOTAL): 0
                    SUMA ACTIVOS: 493142
                  PASIVOS:
                    CUENTAS Y DOCUMENTOS POR PAGAR NACIONALES:
                      PARTES NO RELACIONADAS: 976911
                      TOTAL: 976911
                    CUENTAS Y DOCUMENTOS POR PAGAR DEL EXTRANJERO:
                      PARTES NO RELACIONADAS: 0
                      TOTAL: 0
                    CONTRIBUCIONES POR PAGAR: 10474
                    ANTICIPOS DE CLIENTES:
                      PARTES NO RELACIONADAS: 0
                      TOTAL: 0
                    SUMA PASIVOS: 987385
                  CAPITAL CONTABLE:
                    CAPITAL SOCIAL PROVENIENTE DE APORTACIONES: 100000
                    UTILIDADES ACUMULADAS: 1399808
                    UTILIDAD DEL EJERCICIO: 62355
                    PÉRDIDAS ACUMULADAS: -2456702
                    INSUFICIENCIA EN LA ACTUALIZACIÓN DEL CAPITAL: 0
                    SUMA CAPITAL CONTABLE: -694233
                    SUMA PASIVO MÁS CAPITAL CONTABLE: 493132
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                - code: "400"
                  message: Missign parameters {x-api-key}.
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseUnauthorized'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      deprecated: false
  /taxpayers/{id}/tax-returns:
    get:
      tags:
      - TaxReturns
      summary: ListTaxpayerTaxReturn
      description: List all taxpayer tax returns
      operationId: ListTaxpayerTaxReturn
      parameters:
      - name: x-signature
        in: header
        description: Firma generada con la llave privada
        required: true
        schema:
          type: string
          nullable: false
      - name: x-api-key
        in: header
        description: ConsumerKey obtenido desde el portal de desarrolladores
        required: true
        schema:
          type: string
          nullable: false
      - name: x-request-id
        in: header
        description: idA value returned in POST /login
        required: true
        schema:
          type: string
          nullable: false
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
      - name: x-data-provider
        in: header
        description: Id Data Provider
        required : true
        schema: 
          type: string
          enum: ["A", "B"]
          nullable: false
      - name: username
        in: header
        description: Usuario de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: password
        in: header
        description: Contraseña de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: id
        in: path
        description: RFC (Registro Federal de Contribuyentes)
        required: true
        schema:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
      - name: operationNumber
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by operation number (partial match)
        schema:
          type: number
          format: double
      - name: type
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by type (exact match)
        schema:
          type: string
          enum:
          - Complementaria
          - Complementaria Corrección Fiscal
          - Complementaria Dictamen
          - Normal
          - Normal por Corrección Fiscal
      - name: intervalUnit
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by interval unit (exact match)
        schema:
          type: string
          enum:
          - Anual
          - Mensual
          - RIF
      - name: complementary
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by interval unit (partial match)
        schema:
          type: string
          enum:
          - Declaración no Presentada
          - Dejar sin Efecto Declaración
          - Dejar sin Efecto Obligación
          - Esquema Anterior
          - Modificación de Declaración
          - Modificación de Obligaciones
          - Obligación no presentada
      - name: captureLine
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by payment code (partial match)
        schema:
          type: string
      - name: period
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by period (exact match)
        schema:
          type: string
      - name: presentedAt[before]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by filing date (less than or equal `<=`)
        schema:
          type: string
          format: date-time
      - name: presentedAt[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by filing date (less than `<`)
        schema:
          type: string
          format: date-time
      - name: presentedAt[after]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by filing date (greater than or equal `>=`)
        schema:
          type: string
          format: date-time
      - name: presentedAt[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by filing date (greater than `>`)
        schema:
          type: string
          format: date-time
      - name: fiscalYear
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by fiscal year (exact match)
        schema:
          type: string
      - name: order[period]
        in: query
        description: <b>Only for Data Provider "A".</b> Order by period
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: order[presentedAt]
        in: query
        description: <b>Only for Data Provider "A".</b> Order by filing date
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: page
        in: query
        description: <b>Only for Data Provider "A".</b> The collection page number
        schema:
          type: integer
          format: int32
          default: 1
      - name: itemsPerPage
        in: query
        description: <b>Only for Data Provider "A".</b> The number of items per page
        schema:
          maximum: 100
          exclusiveMaximum: false
          minimum: 1
          exclusiveMinimum: false
          type: integer
          format: int32
          default: 30
      - name: financialYear
        in: query
        description: <b>Only for Data Provider "B".</b> Specify the financial Year. If the financialYear parameter is blank, the current year will be returned by default.
        schema:
          type: string
          enum: ["Current", "FinancialYearEnd", "PreviousFinancialYearEnd", "SecondPreviousFinancialYearEnd", "ThirdPreviousFinancialYearEnd"]
          nullable: false
      responses:
        200:
          description: Taxpayer tax return collection response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/responseTaxpayerTaxReturnCollection'
                  - $ref: '#/components/schemas/taxReturnResponseB'
              examples:
                DataProviderA:
                  summary: DataProviderA
                  description: 'DataProvider A Example'
                  value:
                    '@context': string
                    '@id': /taxpayers/PEIC211118IS0/tax-returns
                    '@type': hydra:Collection
                    hydra:member:
                      - '@id': /tax-returns/91106968-1abd-4d64-85c1-4e73d96fb997
                        '@type': TaxReturn
                        id: 91106968-1abd-4d64-85c1-4e73d96fb997
                        taxpayer:
                          '@id': /taxpayers/PEIC211118IS0
                          '@type': Taxpayer
                          id: PEIC211118IS0
                          personType: physical
                          registrationDate: '2024-10-12'
                          name: Pedro Infante Cruz
                        operationNumber: 200100172932
                        intervalUnit: Mensual
                        period: Diciembre
                        fiscalYear: '2019'
                        type: Complementaria
                        complementary: Modificación de Obligaciones
                        presentedAt: '2024-10-12T17:56:29.066Z'
                        captureLine: 042007HZ795527888246
                        payment:
                          dueAmount: 53249.8
                          dueDate: '2019-01-03T21:10:40Z'
                          code: '0777555544443332222'
                          bank: BBVA Bancomer, S.A.
                          paidAmount: 0
                          date: '2024-10-12T17:56:29.066Z'
                          operationNumber: '123456'
                        createdAt: '2020-01-01T12:15:00.000Z'
                        updatedAt: '2020-01-01T12:15:00.000Z'
                    hydra:totalItems: 1
                DataProviderB:
                  summary: DataProviderB
                  description: 'DataProvider B Example'
                  value:
                    applicantId: '1006886116'
                    refApplicantId: 15d8a4fd-89d2-460d-88ed-80b8a8747244
                    BalanceSheet:
                      - type: BalanceSheet
                        financialYear: SecondPreviousFinancialYearEnd
                        date: '2024-04-09T00:00:00'
                        fromDate: '2021-12-31T00:00:00'
                        toDate: '2021-12-31T00:00:00'
                        columns:
                          - null
                          - Total
                        titles:
                          - Balance Sheet
                          - SAT Declaration
                          - December 31 2021
                        rows:
                          - type: Row
                            cell1: EFECTIVO EN CAJA Y DEPÓSITOS EN INSTITUCIONES DE CRÉDITO NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: EFECTIVO EN CAJA Y DEPÓSITOS EN INSTITUCIONES DE CRÉDITO DEL EXTRANJERO
                            cell2: '0'
                          - type: Row
                            cell1: INVERSIONES EN VALORES CON INSTITUCIONES NACIONALES (EXCEPTO ACCIONES)
                            cell2: '0'
                          - type: Row
                            cell1: INVERSIONES EN VALORES CON INSTITUCIONES EXTRANJERAS (EXCEPTO ACCIONES)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR COBRAR NACIONALES (PARTES RELACIONADAS)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR COBRAR NACIONALES (PARTES NO RELACIONADAS)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR COBRAR NACIONALES (TOTAL)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR COBRAR DEL EXTRANJERO (PARTES RELACIONADAS)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR COBRAR DEL EXTRANJERO (PARTES NO RELACIONADAS)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR COBRAR DEL EXTRANJERO (TOTAL)
                            cell2: '0'
                          - type: Row
                            cell1: CONTRIBUCIONES A FAVOR
                            cell2: '0'
                          - type: Row
                            cell1: INVENTARIOS
                            cell2: '0'
                          - type: Row
                            cell1: OTROS ACTIVOS CIRCULANTES
                            cell2: '0'
                          - type: Row
                            cell1: INVERSIONES EN ACCIONES NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: INVERSIONES EN ACCIONES DEL EXTRANJERO
                            cell2: '0'
                          - type: Row
                            cell1: INVERSIONES EN ACCIONES (TOTAL)
                            cell2: '0'
                          - type: Row
                            cell1: TERRENOS
                            cell2: '0'
                          - type: Row
                            cell1: CONSTRUCCIONES
                            cell2: '0'
                          - type: Row
                            cell1: CONSTRUCCIONES EN PROCESO
                            cell2: '0'
                          - type: Row
                            cell1: MAQUINARIA Y EQUIPO
                            cell2: '0'
                          - type: Row
                            cell1: MOBILIARIO Y EQUIPO DE OFICINA
                            cell2: '0'
                          - type: Row
                            cell1: EQUIPO DE CÓMPUTO
                            cell2: '0'
                          - type: Row
                            cell1: EQUIPO DE TRANSPORTE
                            cell2: '0'
                          - type: Row
                            cell1: OTROS ACTIVOS FIJOS
                            cell2: '0'
                          - type: Row
                            cell1: DEPRECIACIÓN ACUMULADA
                            cell2: '0'
                          - type: Row
                            cell1: CARGOS Y GASTOS DIFERIDOS
                            cell2: '0'
                          - type: Row
                            cell1: AMORTIZACIÓN ACUMULADA
                            cell2: '0'
                          - type: Row
                            cell1: SUMA ACTIVO
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR PAGAR NACIONALES (PARTES RELACIONADAS)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR PAGAR NACIONALES (PARTES NO RELACIONADAS)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR PAGAR NACIONALES (TOTAL)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR PAGAR DEL EXTRANJERO (PARTES RELACIONADAS)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR PAGAR DEL EXTRANJERO (PARTES NO RELACIONADAS)
                            cell2: '0'
                          - type: Row
                            cell1: CUENTAS Y DOCUMENTOS POR PAGAR DEL EXTRANJERO (TOTAL)
                            cell2: '0'
                          - type: Row
                            cell1: CONTRIBUCIONES POR PAGAR
                            cell2: '0'
                          - type: Row
                            cell1: ANTICIPOS DE CLIENTES PARTES RELACIONADAS
                            cell2: '0'
                          - type: Row
                            cell1: ANTICIPOS DE CLIENTES PARTES NO RELACIONADAS
                            cell2: '0'
                          - type: Row
                            cell1: ANTICIPOS DE CLIENTES (TOTAL)
                            cell2: '0'
                          - type: Row
                            cell1: APORTACIONES PARA FUTUROS AUMENTOS DE CAPITAL
                            cell2: '0'
                          - type: Row
                            cell1: OTROS PASIVOS
                            cell2: '0'
                          - type: Row
                            cell1: SUMA PASIVO
                            cell2: '0'
                          - type: Row
                            cell1: CAPITAL SOCIAL PROVENIENTE DE APORTACIONES
                            cell2: '0'
                          - type: Row
                            cell1: CAPITAL SOCIAL PROVENIENTE DE CAPITALIZACIÓN
                            cell2: '0'
                          - type: Row
                            cell1: RESERVAS
                            cell2: '0'
                          - type: Row
                            cell1: OTRAS CUENTAS DE CAPITAL
                            cell2: '0'
                          - type: Row
                            cell1: APORTACIONES PARA FUTUROS AUMENTOS DE CAPITAL
                            cell2: '0'
                          - type: Row
                            cell1: UTILIDADES ACUMULADAS
                            cell2: '0'
                          - type: Row
                            cell1: UTILIDAD DEL EJERCICIO
                            cell2: '0'
                          - type: Row
                            cell1: PÉRDIDAS ACUMULADAS
                            cell2: '0'
                          - type: Row
                            cell1: PÉRDIDA DEL EJERCICIO
                            cell2: '0'
                          - type: Row
                            cell1: EXCESO EN LA ACTUALIZACIÓN DEL CAPITAL
                            cell2: '0'
                          - type: Row
                            cell1: INSUFICIENCIA EN LA ACTUALIZACIÓN DEL CAPITAL
                            cell2: '0'
                          - type: Row
                            cell1: ACTUALIZACIÓN DEL CAPITAL CONTABLE
                            cell2: '0'
                          - type: Row
                            cell1: SUMA CAPITAL CONTABLE
                            cell2: '0'
                          - type: Row
                            cell1: SUMA PASIVO MÁS CAPITAL CONTABLE
                            cell2: '0'
                        financialSource: CR-Automated
                    ProfitAndLoss:
                      - type: ProfitAndLoss
                        financialYear: SecondPreviousFinancialYearEnd
                        date: '2024-04-09T00:00:00'
                        fromDate: '2021-01-01T00:00:00'
                        toDate: '2021-12-31T00:00:00'
                        columns:
                          - null
                          - Total
                        titles:
                          - Profit & Loss
                          - SAT Declaration
                          - January 1 2021 TO December 31 2021
                        rows:
                          - type: Row
                            cell1: VENTAS Y/O SERVICIOS NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: VENTAS Y/O SERVICIOS EXTRANJEROS
                            cell2: '0'
                          - type: Row
                            cell1: DEVOLUCIONES, DESCUENTOS Y BONIFICACIONES SOBRE VENTAS NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: DEVOLUCIONES, DESCUENTOS Y BONIFICACIONES SOBRE VENTAS AL EXTRANJERO
                            cell2: '0'
                          - type: Row
                            cell1: INGRESOS NETOS
                            cell2: '0'
                          - type: Row
                            cell1: INVENTARIO INICIAL
                            cell2: '0'
                          - type: Row
                            cell1: COMPRAS NETAS NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: COMPRAS NETAS DE IMPORTACIÓN
                            cell2: '0'
                          - type: Row
                            cell1: INVENTARIO FINAL
                            cell2: '0'
                          - type: Row
                            cell1: COSTO DE LAS MERCANCÍAS
                            cell2: '0'
                          - type: Row
                            cell1: MANO DE OBRA
                            cell2: '0'
                          - type: Row
                            cell1: MAQUILAS
                            cell2: '0'
                          - type: Row
                            cell1: GASTOS INDIRECTOS DE FABRICACIÓN
                            cell2: '0'
                          - type: Row
                            cell1: COSTO DE VENTAS Y/O SERVICIOS
                            cell2: '0'
                          - type: Row
                            cell1: UTILIDAD BRUTA
                            cell2: '0'
                          - type: Row
                            cell1: PÉRDIDA BRUTA
                            cell2: '0'
                          - type: Row
                            cell1: GASTOS DE OPERACIÓN
                            cell2: '0'
                          - type: Row
                            cell1: UTILIDAD DE OPERACIÓN
                            cell2: '0'
                          - type: Row
                            cell1: PÉRDIDA DE OPERACIÓN
                            cell2: '0'
                          - type: Row
                            cell1: INTERESES DEVENGADOS A FAVOR NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: INTERESES DEVENGADOS A FAVOR DEL EXTRANJERO
                            cell2: '0'
                          - type: Row
                            cell1: INTERESES MORATORIOS A FAVOR NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: INTERESES MORATORIOS A FAVOR DEL EXTRANJERO
                            cell2: '0'
                          - type: Row
                            cell1: GANANCIA CAMBIARIA
                            cell2: '0'
                          - type: Row
                            cell1: INTERESES DEVENGADOS A CARGO NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: INTERESES DEVENGADOS A CARGO DEL EXTRANJERO
                            cell2: '0'
                          - type: Row
                            cell1: INTERESES MORATORIOS A CARGO NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: INTERESES MORATORIOS A CARGO DEL EXTRANJERO
                            cell2: '0'
                          - type: Row
                            cell1: PÉRDIDA CAMBIARIA
                            cell2: '0'
                          - type: Row
                            cell1: RESULTADO POR POSICIÓN MONETARIA FAVORABLE
                            cell2: '0'
                          - type: Row
                            cell1: RESULTADO POR POSICIÓN MONETARIA DESFAVORABLE
                            cell2: '0'
                          - type: Row
                            cell1: OTRAS OPERACIONES FINANCIERAS NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: OTRAS OPERACIONES FINANCIERAS EXTRANJERAS
                            cell2: '0'
                          - type: Row
                            cell1: OTRAS OPERACIONES FINANCIERAS
                            cell2: '0'
                          - type: Row
                            cell1: RESULTADO INTEGRAL DE FINANCIAMIENTO
                            cell2: '0'
                          - type: Row
                            cell1: OTROS GASTOS NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: OTROS GASTOS EXTRANJEROS
                            cell2: '0'
                          - type: Row
                            cell1: OTROS GASTOS
                            cell2: '0'
                          - type: Row
                            cell1: OTROS PRODUCTOS NACIONALES
                            cell2: '0'
                          - type: Row
                            cell1: OTROS PRODUCTOS EXTRANJEROS
                            cell2: '0'
                          - type: Row
                            cell1: OTROS PRODUCTOS
                            cell2: '0'
                          - type: Row
                            cell1: INGRESOS POR PARTIDAS DISCONTINUAS Y EXTRAORDINARIAS
                            cell2: '0'
                          - type: Row
                            cell1: GASTOS POR PARTIDAS DISCONTINUAS Y EXTRAORDINARIAS
                            cell2: '0'
                          - type: Row
                            cell1: UTILIDAD ANTES DE IMPUESTOS
                            cell2: '0'
                          - type: Row
                            cell1: PÉRDIDA ANTES DE IMPUESTOS
                            cell2: '0'
                          - type: Row
                            cell1: ISR
                            cell2: '0'
                          - type: Row
                            cell1: PTU
                            cell2: '0'
                          - type: Row
                            cell1: UTILIDAD EN PARTICIPACIÓN SUBSIDIARIA
                            cell2: '0'
                          - type: Row
                            cell1: PÉRDIDA EN PARTICIPACIÓN SUBSIDIARIA
                            cell2: '0'
                          - type: Row
                            cell1: EFECTOS DE REEXPRESIÓN FAVORABLES EXCEPTO RESULTADO POR POSICIÓN MONETARIA
                            cell2: '0'
                          - type: Row
                            cell1: EFECTOS DE REEXPRESIÓN DESFAVORABLES EXCEPTO RESULTADO POR POSICIÓN MONETARIA
                            cell2: '0'
                          - type: Row
                            cell1: UTILIDAD NETA
                            cell2: '0'
                          - type: Row
                            cell1: PÉRDIDA NETA
                            cell2: '0'
                        financialSource: CR-Automated

        400:
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                - code: "400"
                  message: Missign parameters {x-api-key}.
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseUnauthorized'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      deprecated: false
  /taxpayers/{id}/tax-compliance-checks:
    get:
      tags:
      - TaxComplianceChecks
      summary: ListTaxpayerTaxComplianceCheck
      description: List all taxpayer tax compliance checks
      operationId: ListTaxpayerTaxComplianceCheck
      parameters:
      - name: x-signature
        in: header
        description: Firma generada con la llave privada
        required: true
        schema:
          type: string
          nullable: false
      - name: x-api-key
        in: header
        description: ConsumerKey obtenido desde el portal de desarrolladores
        required: true
        schema:
          type: string
          nullable: false
      - name: x-request-id
        in: header
        description: idA value returned in POST /login
        required: true
        schema:
          type: string
          nullable: false
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
      - name: x-data-provider
        in: header
        description: Id Data Provider
        required : true
        schema: 
          type: string
          enum: ["A", "B"]
          nullable: false
      - name: username
        in: header
        description: Usuario de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: password
        in: header
        description: Contraseña de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: id
        in: path
        description: RFC (Registro Federal de Contribuyentes)
        required: true
        schema:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
      - name: internalIdentifier
        in: query
        description: <b>Only for Data Provider "A".</b> 
        schema:
          type: string
      - name: taxpayer.rfc
        in: query
        description: <b>Only for Data Provider "A".</b> 
        schema:
          maxLength: 13
          minLength: 12
          type: string
      - name: taxpayer.name
        in: query
        description: <b>Only for Data Provider "A".</b> 
        schema:
          maxLength: 254
          minLength: 1
          type: string
      - name: result
        in: query
        description: <b>Only for Data Provider "A".</b> 
        schema:
          type: string
          enum:
          - positive
          - negative
          - no_obligations
      - name: checkedAt[before]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by check date (less than or equal `<=`)
        schema:
          type: string
      - name: checkedAt[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by check date (less than `<`)
        schema:
          type: string
      - name: checkedAt[after]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by check date (greater than or equal `>=`)
        schema:
          type: string
      - name: checkedAt[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by check date (greater than `>`)
        schema:
          type: string
      - name: createdAt[before]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by creation date (less than or equal `<=`)
        schema:
          type: string
      - name: createdAt[strictly_before]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by creation date (less than `<`)
        schema:
          type: string
      - name: createdAt[after]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by creation date (greater than or equal `>=`)
        schema:
          type: string
      - name: createdAt[strictly_after]
        in: query
        description: <b>Only for Data Provider "A".</b> Filter by creation date (greater than `>`)
        schema:
          type: string
      - name: order[checkedAt]
        in: query
        description: <b>Only for Data Provider "A".</b> Order by check date
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: order[createdAt]
        in: query
        description: <b>Only for Data Provider "A".</b> Order by creation date
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: page
        in: query
        description: <b>Only for Data Provider "A".</b> The collection page number
        schema:
          type: integer
          format: int32
          default: 1
      - name: itemsPerPage
        in: query
        description: <b>Only for Data Provider "A".</b> The number of items per page
        schema:
          maximum: 100
          exclusiveMaximum: false
          minimum: 1
          exclusiveMinimum: false
          type: integer
          format: int32
          default: 30
      responses:
        200:
          description: Taxpayer tax compliance check collection response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/responseTaxpayerTaxComplianceCheckCollection'
                  - $ref: '#/components/schemas/taxComplianceChecksResponseB'
              examples:
                DataProviderA:
                  summary: DataProviderA
                  description: 'DataProvider A Example'
                  value:
                    '@context': string
                    '@id': /taxpayers/PEIC211118IS0/tax-compliance-checks
                    '@type': hydra:Collection
                    hydra:member:
                      - '@id': /tax-compliance-checks/91106968-1abd-4d64-85c1-4e73d96fb997
                        '@type': TaxComplianceCheck
                        id: 91106968-1abd-4d64-85c1-4e73d96fb997
                        internalIdentifier: 20NE1234567
                        taxpayer:
                          rfc: PEIC211118IS0
                          name: Pedro Infante Cruz
                        result: no_obligations
                        checkedAt: '2020-01-01T12:15:00.000Z'
                        createdAt: '2020-01-01T12:15:00.000Z'
                    hydra:totalItems: 1
                DataProviderB:
                  summary: DataProviderB
                  description: 'DataProvider B Example'
                  value:
                    applicantId: '1006886116'
                    refApplicantId: 15d8a4fd-89d2-460d-88ed-80b8a8747244
                    CompanyTaxStatus:
                      RFC: PEIC211118IS0
                      PayingTax: POSITIVO
                      ReportDataUpdateDate: '2024-04-09T00:00:00'
                    Success: true
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                - code: "400"
                  message: Missign parameters {x-api-key}.
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseUnauthorized'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      deprecated: false
  /taxpayers/{id}/tax-status:
    get:
      tags:
      - TaxStatus
      summary: ListTaxpayerTaxStatus
      description: List all taxpayer´s tax status
      operationId: ListTaxpayerTaxStatus
      parameters:
      - name: x-signature
        in: header
        description: Firma generada con la llave privada
        required: true
        schema:
          type: string
          nullable: false
      - name: x-api-key
        in: header
        description: ConsumerKey obtenido desde el portal de desarrolladores
        required: true
        schema:
          type: string
          nullable: false
      - name: x-request-id
        in: header
        description: idA value returned in POST /login
        required: true
        schema:
          type: string
          nullable: false
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
      - name: x-data-provider
        in: header
        description: Id Data Provider
        required : true
        schema: 
          type: string
          enum: ["A", "B"]
          nullable: false
      - name: username
        in: header
        description: Usuario de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: password
        in: header
        description: Contraseña de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: id
        in: path
        description: RFC (Registro Federal de Contribuyentes)
        required: true
        schema:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
      responses:
        200:
          description: Taxpayer tax status collection response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/responseTaxpayerTaxStatusCollection'
                  - $ref: '#/components/schemas/taxStatusResponseB'
              examples:
                DataProviderA:
                  summary: DataProviderA
                  description: 'DataProvider A Example'
                  value:
                    '@context': string
                    '@id': /taxpayers/PEIC211118IS0/tax-status
                    '@type': hydra:Collection
                    hydra:member:
                      - '@id': /tax-status/91106968-1abd-4d64-85c1-4e73d96fb997
                        '@type': TaxStatus
                        id: 91106968-1abd-4d64-85c1-4e73d96fb997
                        rfc: PEIC211118IS0
                        cif: '20060152922'
                        person:
                          fullName: Pedro Infante Cruz
                          firstName: Pedro
                          middleName: Infante
                          lastName: Cruz
                          curp: PEIC90110UEYBVT85
                        company:
                          legalName: APPLE OPERATIONS MEXICO
                          tradeName: APPLE OPERATIONS MEXICO S.A. DE C.V.
                          entityType: SOCIEDAD ANONIMA DE CAPITAL VARIABLE
                        email: my-email@test.com
                        phone: '5512345678'
                        address:
                          streetReferences:
                            - string
                          streetNumber: '8124'
                          buildingNumber: '496'
                          locality: TUXTLA GUTIERREZ
                          municipality: TUXTLA GUTIERREZ
                          postalCode: '29000'
                          state: CHIAPAS
                          streetName: Plaza Jorge Luis
                          streetType: Calle
                          neighborhood: Paseo Ricardo
                          statusRaw: LOCALIZADO - Domicilio Localizado
                        economicActivities:
                          - name: Asalariado
                            order: '1'
                            percentage: '100'
                            endDate: '2024-10-13'
                            startDate: '2024-10-13'
                        taxRegimes:
                          - name: Régimen de Sueldos y Salarios e Ingresos Asimilados a Salarios
                            endDate: '2024-10-13'
                            startDate: '2024-10-13'
                        obligations:
                          - description: Pago definitivo mensual de IVA.
                            dueDate: A más tardar el día 17 del mes inmediato posterior al periodo que corresponda.
                            endDate: '2024-10-13'
                            startDate: '2024-10-13'
                        startedOperationsAt: '2024-10-13T22:36:09.958Z'
                        status: Activo
                        statusUpdatedAt: '2024-10-13T22:36:09.958Z'
                        createdAt: '2020-01-01T12:15:00.000Z'
                        updatedAt: '2020-01-01T12:15:00.000Z'
                    hydra:totalItems: 1
                DataProviderB:
                  summary: DataProviderB
                  description: 'DataProvider B Example'
                  value:
                    applicantId: '1006886116'
                    refApplicantId: 15d8a4fd-89d2-460d-88ed-80b8a8747244
                    FiscalIdentifications:
                      - RFC: PEIC211118IS0
                        CompanyName: Pedro Infante Cruz
                        CapitalRegime: Sociedad por Acciones Simplificada de Capital Variable
                        CommercialName: APPLE OPERATIONS MEXICO
                        OperationStartDate: 05 DE JULIO DE 2017
                        FiscalStatus: ACTIVO
                        LastStatusChangeDate: 05 DE JULIO DE 2017
                    FiscalRegisteredAddress:
                      - ZipCode: '03930'
                        RoadType: CALLE
                        RoadName: TPlaza Jorge Luis
                        ExteriorNumber: '8124'
                        InteriorNumber: '496'
                        ColonyName: Paseo Ricardo
                        MunicipalityName: TUXTLA GUTIERREZ
                        TownName: OTRA NO ESPECIFICADA EN EL
                        FederalEntityName: CIUDAD DE MEXICO
                        BetweenStreet: NO ESPECIFICADO
                        AndStreet: NO ESPECIFICADO
                    FiscalEconomicActivity:
                      - EconomicActivity: Otros servicios profesionales, científicos y técnicos
                        Percentage: 90
                        StartDate: '2017-07-05T00:00:00'
                      - EconomicActivity: Sociedades financieras de objeto múltiple
                        Percentage: 10
                        StartDate: '2017-07-05T00:00:00'
                    FiscalRegimes:
                      - Regime: 'Régimen General de Ley Personas Morales '
                        StartDate: '2017-07-05T00:00:00'
                    FiscalObligations:
                      - ObligationDescription: Declaración anual de ISR del ejercicio Personas morales.
                        ObligationExpiration: Dentro de los tres meses siguientes al cierre del ejercicio.
                        StartDate: '2022-01-01T00:00:00'
                      - ObligationDescription: Declaración de proveedores de IVA
                        ObligationExpiration: A más tardar el último día del mes inmediato posterior al periodo que corresponda.
                        StartDate: '2017-07-05T00:00:00'
                      - ObligationDescription: Entero de retenciones mensuales de ISR por ingresos asimilados a salarios
                        ObligationExpiration: A más tardar el día 17 del mes inmediato posterior al periodo que corresponda.
                        StartDate: '2017-07-05T00:00:00'
                      - ObligationDescription: Pago definitivo mensual de IVA.
                        ObligationExpiration: A más tardar el día 17 del mes inmediato posterior al periodo que corresponda.
                        StartDate: '2017-07-05T00:00:00'
                      - ObligationDescription: Pago provisional mensual de ISR personas morales régimen  general
                        ObligationExpiration: A más tardar el día 17 del mes inmediato posterior al periodo que corresponda.
                        StartDate: '2022-01-01T00:00:00'
                    Success: true

        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseUnauthorized'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      deprecated: false
  /taxpayers/{id}/customers:
    get:
      tags:
      - Customers
      summary: ListTaxpayerCustomers
      description: List all taxpayer´s customers
      operationId: ListTaxpayerCustomers
      parameters:
      - name: x-signature
        in: header
        description: Firma generada con la llave privada
        required: true
        schema:
          type: string
          nullable: false
      - name: x-api-key
        in: header
        description: ConsumerKey obtenido desde el portal de desarrolladores
        required: true
        schema:
          type: string
          nullable: false
      - name: x-request-id
        in: header
        description: idA value returned in POST /login
        required: true
        schema:
          type: string
          nullable: false
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
      - name: x-data-provider
        in: header
        description: Id Data Provider
        required : true
        schema: 
          type: string
          enum: ["B"]
          nullable: false
      - name: username
        in: header
        description: Usuario de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: password
        in: header
        description: Contraseña de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: id
        in: path
        description: RFC (Registro Federal de Contribuyentes)
        required: true
        schema:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
      responses:
        200:
          description: Taxpayer customers collection response
          content:
            application/json:
              schema:
                  $ref: '#/components/schemas/customersResponseB'
              examples:
                DataProviderB:
                  summary: DataProviderB
                  description: 'DataProvider B Example'
                  value:
                    applicantId: '1006886116'
                    refApplicantId: 15d8a4fd-89d2-460d-88ed-80b8a8747244
                    customers:
                      - customerId: 121329
                        foreignId: 100
                        firstInvoiceDate: 2022-01-18T00:00:00
                        name: Pedro Infante Cruz
                        verifiedName: Pedro Infante Cruz
                        sectorNaicsId: null
                        sectorNaicsDescription: null
                        taxId: PEIC211118IS0
                        currency: USD
                        address:
                          city: CIUDAD DE MEXICO
                          country: MEX
                          postalCode: 66470
                          state: CIUDAD DE MEXICO
                          street: CALLE
                        contactDetails:
                          phone: 5555555555
                        financials:
                          finScore: null
                          totalSales: 918297.83
                          twelveMonthsSales: 90743.12
                          dueInvoices: 59788.12
                          overDueInvoices: 5255.99
                          creditMemos: 0.00
                          dso: 242
                          add: 2
                          cei: 105.09
                          monthlyFinancials:
                            - fiscalYear: 2022
                              month: 1
                              invoices: 6437.34
                              payments: 37226.76
                              openAR: -30789.42
                              dso: null
                              add: null
                              cei: null
                            - fiscalYear: 2018
                              month: 2
                              invoices: 39406.76
                              payments: 134670.12
                              openAR: -126052.78
                              dso: null
                              add: null
                              cei: null
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseUnauthorized'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      deprecated: false
  /taxpayers/{id}/suppliers:
    get:
      tags:
      - Suppliers
      summary: ListTaxpayerSuppliers
      description: List all taxpayer´s suppliers
      operationId: ListTaxpayerSuppliers
      parameters:
      - name: x-signature
        in: header
        description: Firma generada con la llave privada
        required: true
        schema:
          type: string
          nullable: false
      - name: x-api-key
        in: header
        description: ConsumerKey obtenido desde el portal de desarrolladores
        required: true
        schema:
          type: string
          nullable: false
      - name: x-request-id
        in: header
        description: idA value returned in POST /login
        required: true
        schema:
          type: string
          nullable: false
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
      - name: x-data-provider
        in: header
        description: Id Data Provider
        required : true
        schema: 
          type: string
          enum: ["B"]
          nullable: false
      - name: username
        in: header
        description: Usuario de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: password
        in: header
        description: Contraseña de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: id
        in: path
        description: RFC (Registro Federal de Contribuyentes)
        required: true
        schema:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
      responses:
        200:
          description: Taxpayer suppliers collection response
          content:
            application/json:
              schema:
                  $ref: '#/components/schemas/suppliersResponseB'
              examples:
                DataProviderB:
                  summary: DataProviderB
                  description: 'DataProvider B Example'
                  value:
                    applicantId: '1006886116'
                    refApplicantId: 15d8a4fd-89d2-460d-88ed-80b8a8747244
                    suppliers:
                      - supplierId: 121329
                        foreignId: 100
                        firstInvoiceDate: 2022-01-18T00:00:00
                        name: Pedro Infante Cruz
                        verifiedName: Pedro Infante Cruz
                        sectorNaicsId: null
                        sectorNaicsDescription: null
                        taxId: PEIC211118IS0
                        currency: USD
                        address:
                          city: CIUDAD DE MEXICO
                          country: MEX
                          postalCode: 66470
                          state: CIUDAD DE MEXICO
                          street: CALLE
                        contactDetails:
                          phone: 5555555555
                        financials:
                          totalPurchases: 918297.83
                          twelveMonthsPurchases: 90743.12
                          openPurchaseInvoices: 59788.12
                          creditMemos: 0.00
                          monthlyFinancials:
                            - fiscalYear: 2022
                              month: 1
                              invoices: 6437.34
                              payments: 37226.76
                              openAP: -30789.42
                            - fiscalYear: 2018
                              month: 2
                              invoices: 39406.76
                              payments: 134670.12
                              openAP: -126052.78
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseUnauthorized'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      deprecated: false
  /complete-data/{rfc}:
    get:
      summary: getAllData
      tags: 
        - GetAllData
      parameters:
        - name: x-signature
          in: header
          description: Firma generada con la llave privada
          required: true
          schema:
            type: string
            nullable: false
        - name: x-api-key
          in: header
          description: ConsumerKey obtenido desde el portal de desarrolladores
          required: true
          schema:
            type: string
            nullable: false
        - name: x-request-id
          in: header
          description: idA value returned in POST /login
          required: true
          schema:
            type: string
            nullable: false
            pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
        - name: username
          in: header
          description: Usuario de Círculo de Crédito
          required: true
          schema:
            type: string
            nullable: false
        - name: password
          in: header
          description: Contraseña de Círculo de Crédito
          required: true
          schema:
            type: string
            nullable: false
        - name: rfc
          in: path
          description: RFC (Registro Federal de Contribuyentes)
          required: true
          schema:
            maxLength: 13
            minLength: 12
            type: string
            pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseCompleteData'
      operationId: get-complete-data
  /indexpm/{id}:
    get:
      tags: 
        - Historical Index for PM
      summary: Historical Index for PM
      description: Get Historical Index for PM
      operationId: Historical Index for PM
      parameters:
      - name: x-signature
        in: header
        description: Firma generada con la llave privada
        required: true
        schema:
          type: string
          nullable: false
      - name: x-api-key
        in: header
        description: ConsumerKey obtenido desde el portal de desarrolladores
        required: true
        schema:
          type: string
          nullable: false
      - name: x-request-id
        in: header
        description: ID value returned in POST /login
        required: true
        schema:
          type: string
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
          nullable: false
      - name: x-data-provider
        in: header
        description: Id Data Provider
        required : true
        schema: 
          type: string
          enum: ["B"]
          nullable: false
      - name: username
        in: header
        description: Usuario de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: password
        in: header
        description: Contraseña de Círculo de Crédito
        required: true
        schema:
          type: string
          nullable: false
      - name: id
        in: path
        description: RFC (Registro Federal de Contribuyentes)
        required: true
        schema:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
      responses:
        200:
          description: Historical Index
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/historicalFinscoreResponse'
components:
  schemas:
    CredentialCiecInput:
      required:
      - password
      - rfc
      - type
      - email
      - requestId
      - dataProvider
      - privacyNotice
      type: object
      properties:
        type:
          type: string
        rfc:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
          description: Taxpayer ID (Registro Federal de Contribuyentes)
          example: PEIC211118IS0
        password:
          minLength: 8
          type: string
          description: CIEC's password
          example: secret123
        email:
          type: string
          description: personal corporate email
          pattern: '^([a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})$'
          example: usuario@circulodecredito.com.mx
        requestId:
          type: string
          pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$'
          description: Optionad id to identify client request
          example: 14d8a4fd-89d2-460d-88ed-80b8a8747108
        dataProvider:
          type: string
          enum: ["A", "B"]
          example: A
        privacyNotice:
          $ref: '#/components/schemas/PrivacyNotice'
      description: CIEC
    PrivacyNotice:
      required:
        - legalRepresentative
        - companyName
        - fiscalRegisteredAddress
        - acceptanceDate
        - acceptance
      type: object
      properties:
        legalRepresentative:
          type: string
          nullable: false
          minLength: 1
          description: Nombre completo del representante legal
          example: 'JUAN PRUEBAS'
        companyName:
          type: string
          nullable: false
          minLength: 1
          description: Razón Social
          example: 'EMPRESA TESTER SA DE CV'
        fiscalRegisteredAddress:
          type: string
          nullable: false
          minLength: 1
          description: Datos del domicilio fiscal de la persona moral a consultar.
          example: 'CALLE DEL CENTENO 14 0 LAS PALMAS CUAJIMALPA DE MORELOS DF'
        acceptanceDate:
          type: string
          pattern: '^[1-9]\d{3}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{2}Z$'
          description: Date and time of the privacy notice acceptance. As defined by date-time - RFC3339.
          format: date-time
          example: '2020-04-12T22:20:50.52Z'
        acceptance:
          type: boolean
          description: Indicates whether the Customer has accepted the privacy notice - `true` = accepted, `false` = not accepted.
    responseCredential:
      title: responseCredential
      type: object
      properties:
        '@context':
          type: string
          default: /contexts/Credential
        '@id':
          type: string
          description: Credential IRI reference
          readOnly: true
          example: /credentials/91106968-1abd-4d64-85c1-4e73d96fb997
        '@type':
          type: string
          readOnly: true
          default: CredeRF-400GenericFaultntial
        id:
          type: string
          format: uuid
          readOnly: true
          example: 91106968-1abd-4d64-85c1-4e73d96fb997       
        type:
          $ref: '#/components/schemas/responseCredentialType'
        rfc:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
          description: RFC (Registro Federal de Contribuyentes)
          example: PEIC211118IS0
        status:
          $ref: '#/components/schemas/responseCredentialStatus'
        createdAt:
          type: string
          description: Date and time the resource was created
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
        updatedAt:
          type: string
          description: Date and time the resource was last updated
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
    responseCredentialType:
      title: CredentialType
      type: string
      example: ciec
      enum:
      - ciec
      - efirma
    responseCredentialStatus:
      title: CredentialStatus
      type: string
      description: The initial _status_ is always **pending**. After a few seconds,
        it changes to **valid** or **invalid** depending on SAT's response to our
        login attempt.
      example: pending
      enum:
      - pending
      - valid
      - invalid
      - deactivated
      - error
    responseCredential400:
      title: responseCredential400
      type: object
      properties:
        '@context':
          type: string
          default: /contexts/ConstraintViolationList
        '@type':
          type: string
          default: ConstraintViolationList
        hydra:title:
          type: string
          default: An error occurred
        hydra:description:
          type: string
          description: Concatenated violation messages
          example: 'exampleField: This value should not be blank.'
        violations:
          type: array
          items:
            $ref: '#/components/schemas/responseCredential400Violation'
    Error:
      type: object
      properties:
        code:
          type: string
          description: Error code.
          example: "400"
        message:
          maxLength: 120
          type: string
          description: Descriptive and human-readable error message.
          example: External data source not available.
      description: Error
    Errors:
      type: object
      properties:
        errors:
          type: array
          description: List of errors.
          items:
            $ref: '#/components/schemas/Error'
      description: A list of errors.
    responseCredential400Violation:
      title: responseCredential400Violation
      type: object
      properties:
        propertyPath:
          type: string
          description: Property access path
          example: exampleField
        message:
          type: string
          description: Validaton error message
          example: This value should not be blank.
    responseUnauthorized:
      title: responseUnauthorized
      type: object
      properties:
        message:
          type: string
    responseTaxPayerInvoice:
      title: responseTaxPayerInvoice
      type: object
      properties:
        '@context':
          type: string
          example: /contexts/Invoice
        '@id':
          type: string
          example: /taxpayers/PEIC211118IS0/invoices
        '@type':
          type: string
          default: hydra:Collection
        hydra:member:
          type: array
          items:
            $ref: '#/components/schemas/responseInvoice'
        hydra:totalItems:
          minimum: 0
          type: integer
          description: The total number of items found
          format: int32
          example: 1
    responseInvoice:
      title: responseInvoice
      type: object
      properties:
        '@id':
          type: string
          description: Invoice IRI reference
          readOnly: true
          example: /invoices/91106968-1abd-4d64-85c1-4e73d96fb997
        '@type':
          type: string
          readOnly: true
          default: Invoice
        id:
          type: string
          description: Invoice ID
          format: uuid
          readOnly: true
          example: 91106968-1abd-4d64-85c1-4e73d96fb997
        uuid:
          type: string
          description: Invoice UUID (Folio fiscal)
          format: uuid
          readOnly: true
          example: def404af-5eef-4112-aa99-d1ec8493b89a
        version:
          type: number
          description: CFDI version
          format: double
          example: 3.3
        reference:
          maxLength: 25
          type: string
          description: It is an open field for internal identification. Communly it
            is used to identify a branch
          example: Branch-A
        internalIdentifier:
          maxLength: 40
          type: string
          description: It is an open field for internal identification. Communly it
            is used to identify an invoice
          example: "00001"
        type:
          $ref: '#/components/schemas/responseInvoiceType'
        usage:
          type: string
          description: Invoice usage code from `c_UsoCFDI` catalog
          example: G03
        paymentType:
          $ref: '#/components/schemas/responseInvoicePaymentType'
        paymentMethod:
          type: string
          description: Payment method code from `c_FormaPago` catalog
          example: "04"
        placeOfIssue:
          type: string
          description: Postal code of the place of issue
          readOnly: true
          example: "01210"
        issuer:
          $ref: '#/components/schemas/responseInvoiceIssuer'
        isIssuer:
          type: boolean
          description: '`true` if the invoice issuer is the taxpayer from the link'
          readOnly: true
          example: true
        receiver:
          $ref: '#/components/schemas/responseInvoiceReceiver'
        isReceiver:
          type: boolean
          description: '`true` if the invoice receiver is the taxpayer from the link'
          readOnly: true
          example: false
        currency:
          maxLength: 3
          minLength: 3
          type: string
          description: ISO 4217 alphabetic currency code
          example: MXN
        discount:
          type: number
          description: Discount amount
          format: double
          example: 3324.0
        tax:
          type: number
          description: Tax amount
          format: double
          example: 5224.0
        subtotal:
          type: number
          description: Subtotal amount
          format: double
          example: 51349.8
        total:
          type: number
          description: Invoice total amount
          format: double
          example: 53249.8
        exchangeRate:
          type: number
          description: Set when *currency* is different than MXN (Mexican Peso).
          format: double
          example: 19.8
        paidAmount:
          type: number
          description: For a deferred invoice this field state the paid amount. (Applies
            only for "PPD" invoices).
          format: double
          example: 53249.8
        dueAmount:
          type: number
          description: For a deferred invoice this field state the due amount. (Applies
            only for "PPD" invoices).
          format: double
          example: 0.0
        lastPaymentDate:
          type: string
          description: This field is populated with the last related payment date
            (Applies only for "PPD" invoices).
          format: date-time
        fullyPaidAt:
          type: string
          description: This field is populated when the total debt is paid. (Applies
            only for "PPD" invoices).
          format: date-time
        paymentTermsRaw:
          type: string
          description: The invoice payment terms text exactly as it comes from the
            invoice, i.e. immediate, 30 days, cash, credit card, etc
          example: Tarjeta de crédito
        status:
          $ref: '#/components/schemas/responseInvoiceStatus'
        pac:
          maxLength: 12
          minLength: 12
          type: string
          description: Certification provider tax ID (Proveedor Autorizado de Certificación)
          example: SAT970701NN3
        issuedAt:
          type: string
          description: Invoice issue date
          format: date-time
          example: 2019-01-03T21:10:40Z
        certifiedAt:
          type: string
          description: Invoice certification date
          format: date-time
          example: 2019-01-03T21:10:41Z
        cancellationStatus:
          $ref: '#/components/schemas/responseInvoiceCancellationStatus'
        cancellationProcessStatus:
          $ref: '#/components/schemas/responseInvoiceCancellationStatusProcess'
        canceledAt:
          type: string
          description: Set when *status* is `CANCELADO`
          format: date-time
        items:
          type: array
          items:
            $ref: '#/components/schemas/responseInvoiceItem'
        relations:
          type: array
          items:
            $ref: '#/components/schemas/responseInvoiceRelation'
        appliedCredits:
          type: array
          items:
            $ref: '#/components/schemas/responseInvoiceCreditNote'
        issuedCredits:
          type: array
          items:
            $ref: '#/components/schemas/responseInvoiceCreditNote'
        xml:
          type: boolean
          description: '`true` when the CFDI is available in the XML format. The file
            can be downloaded through the [retrieve an invoice CFDI](#operation/GetInvoiceCFDI)
            operation'
          readOnly: true
        pdf:
          type: boolean
          description: '`true` when the CFDI is available in the PDF format. The file
            can be downloaded through the [retrieve an invoice CFDI](#operation/GetInvoiceCFDI)
            operation'
          readOnly: true
        createdAt:
          type: string
          description: Date and time the resource was created
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
        updatedAt:
          type: string
          description: Date and time the resource was last updated
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
    responseHydraView:
      title: responseHydraView
      type: object
      properties:
        '@id':
          type: string
          description: Current page IRI reference
        '@type':
          type: string
          default: hydra:PartialCollectionView
        hydra:first:
          type: string
          description: First page IRI reference. This property is omitted if there
            is no pagination.
        hydra:next:
          type: string
          description: Next page IRI reference. This property is omitted if there
            is no pagination.
        hydra:last:
          type: string
          description: Last page IRI reference. This property is omitted if there
            is no pagination.
      description: Pagination information
    responseHydraSearch:
      title: responseHydraSearch
      type: object
      properties:
        '@type':
          type: string
        hydra:template:
          type: string
        hydra:variableRepresentation:
          type: string
        hydra:mapping:
          type: array
          items:
            $ref: '#/components/schemas/responseHydraMapping'
    responseHydraMapping:
      title: responseHydraMapping
      type: object
      properties:
        '@type':
          type: string
        variable:
          type: string
        property:
          type: string
        required:
          type: boolean
    responseInvoicePaymentType:
      title: responseInvoicePaymentType
      type: string
      description: Payment type code from `c_MetodoPago` catalog
      example: PUE
      externalDocs:
        url: https://sat.ws/docs/catalogs#c_metodopago
      enum:
      - PUE
      - PPD
    responseInvoiceType:
      title: responseInvoiceType
      type: string
      description: Invoice type code from `c_TipoDeComprobante` catalog
      externalDocs:
        url: https://sat.ws/docs/catalogs/#c_tipodecomprobante
      enum:
      - I
      - E
      - P
      - N
      - T
    responseInvoiceIssuer:
      title: responseInvoiceIssuer
      type: object
      properties:
        rfc:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
          description: RFC (Registro Federal de Contribuyentes)
          example: PEIC211118IS0
        name:
          maxLength: 254
          minLength: 1
          type: string
          description: Taxpayer name
          example: Pedro Infante Cruz
        taxRegime:
          type: number
          description: Tax regime code from `c_RegimenFiscal` catalog
          format: double
          example: 601.0
        blacklistStatus:
          $ref: '#/components/schemas/responseTaxpayerBlacklistStatus'
      example:
        rfc: AOM920820BEA
        name: APPLE OPERATIONS MEXICO S.A. DE C.V.
        taxRegime: 601
    responseInvoiceReceiver:
      title: responseInvoiceReceiver
      type: object
      properties:
        rfc:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
          description: RFC (Registro Federal de Contribuyentes)
          example: PEIC211118IS0
        name:
          maxLength: 254
          minLength: 1
          type: string
          description: Taxpayer name
          example: Pedro Infante Cruz
        blacklistStatus:
          $ref: '#/components/schemas/responseTaxpayerBlacklistStatus'
    responseTaxpayerBlacklistStatus:
      title: responseTaxpayerBlacklistStatus
      type: string
      description: Show the blacklist status if a taxpayer is found in the list 69-B
        from SAT
      example: presumed
      enum:
      - presumed
      - dismissed
      - definitive
      - favorable
    responseInvoiceCancellationStatusProcess:
      title: responseInvoiceCancellationStatusProcess
      type: string
      description: Set when the cancellation process starts
      example: En proceso
      enum:
      - En proceso
      - Solicitud rechazada
      - Cancelado sin aceptación
      - Cancelado con aceptación
      - Plazo vencido
    responseInvoiceCancellationStatus:
      title: responseInvoiceCancellationStatus
      type: string
      description: Whether or not the invoice can be canceled
      example: Cancelable con aceptación
      enum:
      - Cancelable sin aceptación
      - Cancelable con aceptación
      - No cancelable
    responseInvoiceStatus:
      title: responseInvoiceStatus
      type: string
      description: Whether the invoice is active or canceled
      example: VIGENTE
      enum:
      - VIGENTE
      - CANCELADO
    responseInvoiceItem:
      title: responseInvoiceItem
      type: object
      properties:
        identificationNumber:
          type: string
          example: Z0V0
        productIdentification:
          type: string
          example: "43211503"
        description:
          type: string
          example: MBP 15.4 SPACE GRAY
        unitAmount:
          type: number
          format: double
          example: 45905.0
        unitCode:
          type: string
          example: H87
        quantity:
          type: number
          format: double
          example: 1.0
        discountAmount:
          type: number
          format: double
          example: 0.0
        taxType:
          type: string
          example: "002"
        taxRate:
          type: number
          format: double
          example: 0.16
        taxAmount:
          type: number
          format: double
          example: 7344.8
        totalAmount:
          type: number
          format: double
          example: 45905.0
    responseInvoiceRelation:
      title: responseInvoiceRelation
      type: object
      properties:
        '@id':
          type: string
          description: Invoice relation IRI reference
          readOnly: true
          example: /invoices/relations/93a197e7-6baa-5dc5-bf8d-fb1645a770c1
        '@type':
          type: string
          readOnly: true
          default: InvoiceRelation
        id:
          type: string
          description: Invoice relation ID
          format: uuid
          readOnly: true
          example: 91106968-1abd-4d64-85c1-4e73d96fb997
        type:
          type: number
          description: Invoice relation type code from `c_TipoRelacion` catalog
          format: double
          example: 7.0
        invoice:
          type: string
          description: Invoice IRI reference
          example: /invoices/92106967-2abd-5d64-95c2-4e73d96fb998
        relatedInvoice:
          type: string
          description: Invoice IRI reference
          example: /invoices/92106967-2abd-5d64-95c2-4e73d96fb998
        relatedInvoiceUuid:
          type: string
          description: The related Invoice UUID (Folio fiscal)
          format: uuid
          readOnly: true
          example: def404af-5eef-4112-aa99-d1ec8493b89a
        createdAt:
          type: string
          description: Date and time the resource was created
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
        updatedAt:
          type: string
          description: Date and time the resource was last updated
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
    responseInvoiceCreditNote:
      title: responseInvoiceCreditNote
      type: object
      properties:
        '@id':
          type: string
          description: Credit Note IRI reference
          readOnly: true
          example: /invoices/credit-note/91106968-1abd-4d64-85c1-4e73d96fb997
        '@type':
          type: string
          readOnly: true
          default: InvoicePayment
        appliedInvoice:
          type: string
          description: Invoice IRI reference
          readOnly: true
          example: /invoices/91106968-1abd-4d64-85c1-4e73d96fb997
        issuedInvoice:
          type: string
          description: Invoice IRI reference
          readOnly: true
          example: /invoices/91106968-1abd-4d64-85c1-4e73d96fb997
        issuedAt:
          type: string
          description: Set when the payment invoice is canceled
          format: date-time
        proportionalRate:
          type: number
          description: The proportional credit rate applied to the target invoice.
          format: double
          example: 19.8
        amount:
          type: number
          description: The total amount of credits applied to the target invoice.
          format: double
          example: 19.8
        issuedInvoiceTotal:
          type: number
          description: The total of the issued invoice that was taken into account
            to calculate the credit.
          format: double
          example: 19.8
        canceledAt:
          type: string
          description: Set when the payment invoice is canceled
          format: date-time
        createdAt:
          type: string
          description: Date and time the resource was created
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
        updatedAt:
          type: string
          description: Date and time the resource was last updated
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
    responseNotFound:
      type: object
      properties:
        message:
          type: string
    responseTaxpayerTaxReturnCollection:
      title: TaxpayerTaxReturnCollection
      type: object
      properties:
        '@context':
          type: string
        '@id':
          type: string
          example: /taxpayers/PEIC211118IS0/tax-returns
        '@type':
          type: string
          default: hydra:Collection
        hydra:member:
          type: array
          items:
            $ref: '#/components/schemas/responseTaxReturn'
        hydra:totalItems:
          minimum: 0
          type: integer
          description: The total number of items found
          format: int32
          example: 1
    responseTaxReturn:
      title: responseTaxReturn
      type: object
      properties:
        '@id':
          type: string
          description: Tax return IRI reference
          readOnly: true
          example: /tax-returns/91106968-1abd-4d64-85c1-4e73d96fb997
        '@type':
          type: string
          readOnly: true
          default: TaxReturn
        id:
          type: string
          description: Tax Return ID
          format: uuid
          readOnly: true
          example: 91106968-1abd-4d64-85c1-4e73d96fb997
        taxpayer:
          $ref: '#/components/schemas/responseTaxpayer'
        operationNumber:
          type: number
          description: Tax return operation code generated by SAT (Número de operación)
          format: double
          readOnly: true
          example: 200100172932
        intervalUnit:
          $ref: '#/components/schemas/responseTaxReturnIntervalUnit'
        period:
          type: string
          description: Fiscal period. For an annual tax return, it is a year and for
            monthly tax return it is a month
          example: Diciembre
        fiscalYear:
          type: string
          description: Fiscal year
          readOnly: true
          example: "2019"
        type:
          $ref: '#/components/schemas/responseTaxReturnType'
        complementary:
          $ref: '#/components/schemas/responseTaxReturnComplementary'
        presentedAt:
          type: string
          description: Tax return filing date
          format: date-time
        captureLine:
          type: string
          description: Set when the an amount should be paid back to SAT
          example: 042007HZ795527888246
        payment:
          $ref: '#/components/schemas/responseTaxReturnPayment'
        createdAt:
          type: string
          description: Date and time the resource was created
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
        updatedAt:
          type: string
          description: Date and time the resource was last updated
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
    responseTaxpayer:
      title: responseTaxpayer
      type: object
      properties:
        '@id':
          type: string
          description: Taxpayer IRI reference
          readOnly: true
          example: /taxpayers/PEIC211118IS0
        '@type':
          type: string
          readOnly: true
          default: Taxpayer
        id:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
          description: RFC (Registro Federal de Contribuyentes)
          example: PEIC211118IS0
        personType:
          $ref: '#/components/schemas/responseTaxpayerPersonType'
        registrationDate:
          type: string
          format: date
        name:
          maxLength: 254
          minLength: 1
          type: string
          description: Taxpayer name
          example: Pedro Infante Cruz
    responseTaxpayerPersonType:
      title: responseTaxpayerPersonType
      type: string
      example: physical
      enum:
      - physical
      - legal
    responseTaxReturnIntervalUnit:
      title: responseTaxReturnIntervalUnit
      type: string
      example: Mensual
      enum:
      - Anual
      - Mensual
      - RIF
    responseTaxReturnType:
      title: responseTaxReturnType
      type: string
      example: Complementaria
      enum:
      - Complementaria
      - Complementaria Corrección Fiscal
      - Complementaria Dictamen
      - Normal
      - Normal por Corrección Fiscal
    responseTaxReturnComplementary:
      title: responseTaxReturnComplementary
      type: string
      description: Set when *type* is `complementaria*`
      example: Modificación de Obligaciones
      enum:
      - Declaración no Presentada
      - Dejar sin Efecto Declaración
      - Dejar sin Efecto Obligación
      - Esquema Anterior
      - Modificación de Declaración
      - Modificación de Obligaciones
      - Obligación no presentada
    responseTaxReturnPayment:
      title: responseTaxReturnPayment
      type: object
      properties:
        dueAmount:
          type: number
          format: double
          example: 53249.8
        dueDate:
          type: string
          format: date-time
          example: 2019-01-03T21:10:40Z
        code:
          type: string
          description: Payment code
          example: "0777555544443332222"
        bank:
          type: string
          description: Payer bank
          example: BBVA Bancomer, S.A.
        paidAmount:
          type: number
          description: Tax return paid amount
          format: double
        date:
          type: string
          description: Payment date
          format: date-time
        operationNumber:
          type: string
          example: "123456"
      description: Payment
    responseTaxpayerTaxComplianceCheckCollection:
      title: responseTaxpayerTaxComplianceCheckCollection
      type: object
      properties:
        '@context':
          type: string
        '@id':
          type: string
          example: /taxpayers/PEIC211118IS0/tax-compliance-checks
        '@type':
          type: string
          default: hydra:Collection
        hydra:member:
          type: array
          items:
            $ref: '#/components/schemas/responseTaxComplianceCheck'
        hydra:totalItems:
          minimum: 0
          type: integer
          description: The total number of items found
          format: int32
          example: 1
    responseTaxComplianceCheck:
      title: responseTaxComplianceCheck
      type: object
      properties:
        '@id':
          type: string
          description: Tax compliance check IRI reference
          readOnly: true
          example: /tax-compliance-checks/91106968-1abd-4d64-85c1-4e73d96fb997
        '@type':
          type: string
          readOnly: true
          default: TaxComplianceCheck
        id:
          type: string
          example: 91106968-1abd-4d64-85c1-4e73d96fb997
        internalIdentifier:
          type: string
          description: The internal identifier (folio) generated by the SAT
          example: 20NE1234567
        taxpayer:
          $ref: '#/components/schemas/responseTaxComplianceTaxpayer'
        result:
          $ref: '#/components/schemas/responseTaxComplianceCheckResult'
        checkedAt:
          type: string
          description: Check date
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
        createdAt:
          type: string
          description: Date and time the resource was created
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
    responseTaxComplianceTaxpayer:
      title: responseTaxComplianceTaxpayer
      type: object
      properties:
        rfc:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
          description: RFC (Registro Federal de Contribuyentes)
          example: PEIC211118IS0
        name:
          maxLength: 254
          minLength: 1
          type: string
          description: Taxpayer name
          example: Pedro Infante Cruz
    responseTaxComplianceCheckResult:
      title: responseTaxComplianceCheckResult
      type: string
      example: no_obligations
      enum:
      - positive
      - negative
      - no_obligations
    responseTaxpayerTaxStatusCollection:
      title: responseTaxpayerTaxStatusCollection
      type: object
      properties:
        '@context':
          type: string
        '@id':
          type: string
          example: /taxpayers/PEIC211118IS0/tax-status
        '@type':
          type: string
          default: hydra:Collection
        hydra:member:
          type: array
          items:
            $ref: '#/components/schemas/responseTaxStatus'
        hydra:totalItems:
          minimum: 0
          type: integer
          description: The total number of items found
          format: int32
          example: 1
    responseTaxStatus:
      title: responseTaxStatus
      type: object
      properties:
        '@id':
          type: string
          description: Tax status IRI reference
          readOnly: true
          example: /tax-status/91106968-1abd-4d64-85c1-4e73d96fb997
        '@type':
          type: string
          readOnly: true
          default: TaxStatus
        id:
          type: string
          example: 91106968-1abd-4d64-85c1-4e73d96fb997
        rfc:
          maxLength: 13
          minLength: 12
          type: string
          pattern: '^([A-ZÑ&]{3,4}) ?(?:- ?)?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])) ?(?:- ?)?([A-Z\d]{2})([A\d])$'
          description: RFC (Registro Federal de Contribuyentes)
          example: PEIC211118IS0
        cif:
          type: string
          example: "20060152922"
        person:
          $ref: '#/components/schemas/responseTaxStatusPerson'
        company:
          $ref: '#/components/schemas/responseTaxStatusCompany'
        email:
          type: string
          example: my-email@test.com
        phone:
          maxLength: 10
          type: string
          example: "5512345678"
        address:
          $ref: '#/components/schemas/responseTaxStatusAddress'
        economicActivities:
          type: array
          items:
            $ref: '#/components/schemas/responseTaxStatusEconomicActivity'
        taxRegimes:
          type: array
          items:
            $ref: '#/components/schemas/responseTaxStatusTaxRegime'
        obligations:
          type: array
          items:
            $ref: '#/components/schemas/responseTaxStatusObligation'
        startedOperationsAt:
          type: string
          format: date-time
        status:
          type: string
          example: Activo
        statusUpdatedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          description: Date and time the resource was created
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
        updatedAt:
          type: string
          description: Date and time the resource was last updated
          readOnly: true
          example: 2020-01-01T12:15:00.000Z
    responseTaxStatusPerson:
      title: responseTaxStatusPerson
      type: object
      properties:
        fullName:
          type: string
          example: Pedro Infante Cruz
        firstName:
          type: string
          example: Pedro
        middleName:
          type: string
          example: Infante
        lastName:
          type: string
          example: Cruz
        curp:
          type: string
          example: PEIC90110UEYBVT85
      description: Person information. Null when the taxpayer is not a physical person.
    responseTaxStatusCompany:
      title: responseTaxStatusCompany
      type: object
      properties:
        legalName:
          type: string
          example: APPLE OPERATIONS MEXICO
        tradeName:
          type: string
          example: APPLE OPERATIONS MEXICO S.A. DE C.V.
        entityType:
          type: string
          example: SOCIEDAD ANONIMA DE CAPITAL VARIABLE
      description: Company information. Null when the taxpayer is not a legal person.
    responseTaxStatusAddress:
      title: responseTaxStatusAddress
      type: object
      properties:
        streetReferences:
          minItems: 1
          type: array
          items:
            type: string
        streetNumber:
          type: string
          example: "8124"
        buildingNumber:
          type: string
          example: "496"
        locality:
          type: string
          example: TUXTLA GUTIERREZ
        municipality:
          type: string
          example: TUXTLA GUTIERREZ
        postalCode:
          type: string
          example: "29000"
        state:
          type: string
          example: CHIAPAS
        streetName:
          type: string
          example: Plaza Jorge Luis
        streetType:
          type: string
          example: Calle
        neighborhood:
          type: string
          example: Paseo Ricardo
        statusRaw:
          type: string
          example: LOCALIZADO - Domicilio Localizado
    responseTaxStatusEconomicActivity:
      title: responseTaxStatusEconomicActivity
      type: object
      properties:
        name:
          type: string
          example: Asalariado
        order:
          type: string
          example: "1"
        percentage:
          type: string
          example: "100"
        endDate:
          type: string
          format: date
        startDate:
          type: string
          format: date
    responseTaxStatusTaxRegime:
      title: responseTaxStatusTaxRegime
      type: object
      properties:
        name:
          type: string
          example: Régimen de Sueldos y Salarios e Ingresos Asimilados a Salarios
        endDate:
          type: string
          format: date
        startDate:
          type: string
          format: date
    responseTaxStatusObligation:
      title: responseTaxStatusObligation
      type: object
      properties:
        description:
          type: string
          example: Pago definitivo mensual de IVA.
        dueDate:
          type: string
          example: A más tardar el día 17 del mes inmediato posterior al periodo que
            corresponda.
        endDate:
          type: string
          format: date
        startDate:
          type: string
          format: date
    responseRFCValidator:
      title: responseRFCValidator
      type: object
      properties:
        '@context':
          type: string
          example: /contexts/ValidateRfcResponse
        '@id':
          type: string
          example: /rfc/validate/PEIC211118IS0
        '@type':
          type: string
          default: ValidateRfcResponse
        valid:
          type: boolean
          description: It is `true` if the format is correct
          example: true
        active:
          type: boolean
          description: Due to the removal of the service used to determine the active
            status of an RFC, the `active` field will always return `null`
        type:
          $ref: '#/components/schemas/responseRFCType'
        createdAt:
          type: string
    responseRFCType:
      title: responseRFCType
      type: string
      description: Taxpayer type
      example: physical
      enum:
      - physical
      - legal
    responseCompleteData:
      title: ResponseCompleteData
      type: object
      properties:
        invoices:
          $ref: '#/components/schemas/responseTaxPayerInvoice'
        taxReturns:
          $ref: '#/components/schemas/responseTaxpayerTaxReturnCollection'
        taxComplianceChecks:
          $ref: '#/components/schemas/responseTaxpayerTaxComplianceCheckCollection'
        taxStatus:
          $ref: '#/components/schemas/responseTaxpayerTaxStatusCollection'
        rfcValidate:
          $ref: '#/components/schemas/responseRFCValidator'
      description: ''
    invoicesResponsesProviderB:
      title: invoicesResponsesProviderB
      type: object
      properties:
        refApplicantId:
          type: string
          example: b163b38f-6d43-4ead-b78c-315d9134ad42
        customerInvoices:
          type: array
          items:
            type: object
            properties:
              customerId: 
                type: string
                example: "18369755"
              id1:
                type: string
                example: "1AE7EB89-FA25-488E-A7E3-D759885B0542"
              issueDate: 
                type: string
                example: "2023-01-30T00:00:00"
              amount:
                type: number
                example: 7717.48
              invoiceId:
                type: string
                example: "61c8789-a33d-4580-8034-ca88d1113011"
              dueDate:
                type: string
                example: "2023-04-30T00:00:00"
              lastPaymentDate:
                type: string
                example: "2023-01-31T00:00:00"
              balance:
                type: number
                example: 0
              credited:
                type: number
                example: 0
    taxReturnResponseB:
      title: taxReturnResponseB
      type: object
      properties: 
        applicantId: 
          type: "string"
        refApplicantId: 
          type: "string"
        BalanceSheet: 
          type: "array"
          items: 
            type: "object"
            properties: 
              type: 
                type: "string"
              financialYear: 
                type: "string"
              date: 
                type: "string"
              fromDate: 
                type: "string"
              toDate: 
                type: "string"
              columns: 
                type: "array"
                items: 
                  type: "string"
                  nullable: true
              titles: 
                type: "array"
                items: 
                  type: "string"
              rows: 
                type: "array"
                items: 
                  type: "object"
                  properties: 
                    type: 
                      type: "string"
                    cell1: 
                      type: "string"
                    cell2: 
                      type: "string"
              financialSource: 
                type: "string"
        ProfitAndLoss: 
          type: "array"
          items: 
            type: "object"
            properties: 
              type: 
                type: "string"
              financialYear: 
                type: "string"
              date: 
                type: "string"
              fromDate: 
                type: "string"
              toDate: 
                type: "string"
              columns: 
                type: "array"
                items: 
                  type: "string"
                  nullable: true
              titles: 
                type: "array"
                items: 
                  type: "string"
              rows: 
                type: "array"
                items: 
                  type: "object"
                  properties: 
                    type: 
                      type: "string"
                    cell1: 
                      type: "string"
                    cell2: 
                      type: "string"
              financialSource: 
                type: "string"
    taxComplianceChecksResponseB:
      title: taxComplianceChecksResponseB
      type: object
      properties: 
        applicantId: 
          type: "string"
        refApplicantId: 
          type: "string"
        CompanyTaxStatus: 
          properties: 
            RFC: 
              type: "string"
            PayingTax: 
              type: "string"
            ReportDataUpdateDate: 
              type: "string"
          type: "object"
        Success: 
          type: "boolean"
    taxStatusResponseB:
      title: taxStatusResponseB
      type: object
      properties: 
        applicantId: 
          type: "string"
        refApplicantId: 
          type: "string"
        FiscalIdentifications: 
          type: "array"
          items: 
            type: "object"
            properties: 
              RFC: 
                type: "string"
              CompanyName: 
                type: "string"
              CapitalRegime: 
                type: "string"
              CommercialName: 
                type: "string"
              OperationStartDate: 
                type: "string"
              FiscalStatus: 
                type: "string"
              LastStatusChangeDate: 
                type: "string"
        FiscalRegisteredAddress: 
          type: "array"
          items: 
            type: "object"
            properties: 
              ZipCode: 
                type: "string"
              RoadType: 
                type: "string"
              RoadName: 
                type: "string"
              ExteriorNumber: 
                type: "string"
              InteriorNumber: 
                type: "string"
              ColonyName: 
                type: "string"
              MunicipalityName: 
                type: "string"
              TownName: 
                type: "string"
              FederalEntityName: 
                type: "string"
              BetweenStreet: 
                type: "string"
              AndStreet: 
                type: "string"
        FiscalEconomicActivity: 
          type: "array"
          items: 
            type: "object"
            properties: 
              EconomicActivity: 
                type: "string"
              Percentage: 
                type: "number"
              StartDate: 
                type: "string"
        FiscalRegimes: 
          type: "array"
          items: 
            type: "object"
            properties: 
              Regime: 
                type: "string"
              StartDate: 
                type: "string"
        FiscalObligations: 
          type: "array"
          items: 
            type: "object"
            properties: 
              ObligationDescription: 
                type: "string"
              ObligationExpiration: 
                type: "string"
              StartDate: 
                type: "string"
        Success: 
          type: "boolean"
    customersResponseB:
      title: customersResponseB
      type: object
      properties:
        applicantId:
          type: string
        refApplicantId:
          type: string
        customers:
          type: array
          items:
            type: object
            properties:
              customerId:
                type: string
              foreignId:
                type: string
              firstInvoiceDate:
                type: string
              name:
                type: string
              verifiedName:
                type: string
              sectorNaicsId:
                type: string
              sectorNaicsDescription:
                type: string
              taxId:
                type: string
              currency:
                type: string
              address:
                type: object
                properties:
                  city:
                    type: string
                  country:
                    type: string
                  postalCode:
                    type: string
                  state:
                    type: string
                  street:
                    type: string
              contactDetails:
                type: object
                properties:
                  phone:
                    type: string
              financials:
                type: object
                properties:
                  finScore:
                    type: number
                  totalSales:
                    type: number
                  twelveMonthsSales:
                    type: number
                  dueInvoices:
                    type: number
                  overDueInvoices:
                    type: number
                  creditMemos:
                    type: number
                  dso:
                    type: number
                  add:
                    type: number
                  cei:
                    type: number
                  monthlyFinancials:
                    type: array
                    items:
                      type: object
                      properties:
                        year:
                          type: number
                        month:
                          type: number
                        invoices:
                          type: number
                        payments:
                          type: number
                        openAR:
                          type: number
                        dso:
                          type: number
                        add:
                          type: number
                        cei:
                          type: number
    suppliersResponseB:
      title: suppliersResponseB
      type: object
      properties:
        applicantId:
          type: string
        refApplicantId:
          type: string
        suppliers:
          type: array
          items:
            type: object
            properties:
              supplierId:
                type: string
              foreignId:
                type: string
              firstInvoiceDate:
                type: string
              name:
                type: string
              verifiedName:
                type: string
              sectorNaicsId:
                type: string
              sectorNaicsDescription:
                type: string
              taxId:
                type: string
              currency:
                type: string
              address:
                type: object
                properties:
                  city:
                    type: string
                  country:
                    type: string
                  postalCode:
                    type: string
                  state:
                    type: string
                  street:
                    type: string
              contactDetails:
                type: object
                properties:
                  phone:
                    type: string
              financials:
                type: object
                properties:
                  totalPurchases:
                    type: number
                  twelveMonthsPurchases:
                    type: number
                  openPurchaseInvoices:
                    type: number
                  creditMemos:
                    type: number
                  monthlyFinancials:
                    type: array
                    items:
                      type: object
                      properties:
                        year:
                          type: number
                        month:
                          type: number
                        invoices:
                          type: number
                        payments:
                          type: number
                        openAP:
                          type: number
    historicalFinscoreResponse:
      title: historicalFinscoreResponse
      type: object
      properties:
        applicantId: 
          type: string
          example: 1105600364
        refApplicantId: 
          type: string
          example: ''
          nullable: true
        HistoricalFinscores: 
          type: array
          items: 
            type: object
            properties: 
              Year: 
                type: integer
                format: int32
                example: 2023
              Month: 
                type: integer
                format: int32
                example: 3
              FinScore: 
                type: integer
                format: int32
                example: 595
          example: [
            {
            "Year": 2023,
            "Month": 3,
            "FinScore": 595.00
            },
            {
                "Year": 2023,
                "Month": 2,
                "FinScore": 610.00
            },
            {
                "Year": 2023,
                "Month": 1,
                "FinScore": 613.00
            },
            {
                "Year": 2022,
                "Month": 12,
                "FinScore": 581.00
            }
          ]
        Success: 
          type: boolean
        message: 
          type: string
          example: ''
          nullable: true