swagger: '2.0'
info:
  version: '1.0'
  title: API SAT
  description: <p></p><br/>
  contact:
    email: api@circulodecredito.com.mx
host: services.circulodecredito.com.mx
basePath: /sandbox/v1/sat
securityDefinitions: {}
schemes:
- https
consumes:
- application/json
produces:
- application/json
paths:
  /login:
    post:
      description: ''
      summary: CreateCredential
      tags:
      - Credentials
      operationId: CreateCredential
      deprecated: false
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - name: x-api-key
        in: header
        required: true
        type: string
        description: ConsumerKey obtenido desde el portal de desarrolladores
      - name: Content-Type
        in: header
        required: false
        enum:
        - application/json
        type: string
        description: ''
      - name: body
        in: body
        required: false
        description: ''
        schema:
          $ref: '#/definitions/CredentialCiecInput'
      responses:
        '202':
          description: Accepted
          schema:
            $ref: '#/definitions/responseCredential'
          headers: {}
        '400':
          description: Validation Error
          schema:
            $ref: '#/definitions/responseCredential400'
          headers: {}
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/responseUnauthorized'
          headers: {}
  /taxpayers/{id}/invoices:
    get:
      description: List all taxpayer invoices
      summary: ListTaxpayerInvoice
      tags:
      - Invoices
      operationId: ListTaxpayerInvoice
      deprecated: false
      produces:
      - application/json
      parameters:
      - name: x-api-key
        in: header
        required: true
        type: string
        description: ConsumerKey obtenido desde el portal de desarrolladores
      - name: x-request-id
        in: header
        required: true
        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: ID returned in POST Credentials
      - name: id
        in: path
        required: true
        type: string
        minLength: 12
        maxLength: 13
        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)
      - name: uuid
        in: query
        required: false
        type: string
        format: uuid
        description: Filter by UUID/Folio Fiscal (exact match)
      - name: version
        in: query
        required: false
        type: number
        format: double
        description: Filter by CFDI version (exact match)
      - name: type
        in: query
        required: false
        enum:
        - I
        - E
        - P
        - N
        - T
        type: string
        description: Filter by type (exact match)
      - name: usage
        in: query
        required: false
        type: string
        description: Filter by usage (exact match)
      - name: paymentType
        in: query
        required: false
        enum:
        - PUE
        - PPD
        type: string
        description: Filter by payment type (exact match)
      - name: paymentMethod
        in: query
        required: false
        type: string
        description: Filter by payment method (exact match)
      - name: issuer.rfc
        in: query
        required: false
        type: string
        minLength: 12
        maxLength: 13
        description: Filter by issuer RFC (partial match)
      - name: issuer.name
        in: query
        required: false
        type: string
        minLength: 1
        maxLength: 254
        description: Filter by issuer name (partial match)
      - name: issuer.taxRegime
        in: query
        required: false
        type: number
        format: double
        description: Filter by issuer tax regime (partial match)
      - name: issuer.blacklistStatus
        in: query
        required: false
        enum:
        - presumed
        - dismissed
        - definitive
        - favorable
        type: string
        description: Filter by issuer blacklist status
      - name: isIssuer
        in: query
        required: false
        type: boolean
        description: Filter if the invoice issuer is the taxpayer from the link
      - name: receiver.rfc
        in: query
        required: false
        type: string
        minLength: 12
        maxLength: 13
        description: Filter by receiver RFC (partial match)
      - name: receiver.name
        in: query
        required: false
        type: string
        minLength: 1
        maxLength: 254
        description: Filter by receiver name (partial match)
      - name: receiver.blacklistStatus
        in: query
        required: false
        enum:
        - presumed
        - dismissed
        - definitive
        - favorable
        type: string
        description: Filter by receiver blacklist status
      - name: isReceiver
        in: query
        required: false
        type: boolean
        description: Filter if the invoice receiver is the taxpayer from the link
      - name: currency
        in: query
        required: false
        type: string
        minLength: 3
        maxLength: 3
        description: Filter by currency code (exact match)
      - name: status
        in: query
        required: false
        enum:
        - VIGENTE
        - CANCELADO
        type: string
        description: Filter by status (exact match)
      - name: pac
        in: query
        required: false
        type: string
        minLength: 12
        maxLength: 12
        description: Filter by certification provider (partial match)
      - name: cancellationStatus
        in: query
        required: false
        enum:
        - Cancelable sin aceptación
        - Cancelable con aceptación
        - No cancelable
        type: string
        description: Filter by cancellation status (partial match)
      - name: cancellationStatusProcess
        in: query
        required: false
        enum:
        - En proceso
        - Solicitud rechazada
        - Cancelado sin aceptación
        - Cancelado con aceptación
        - Plazo vencido
        type: string
        description: Filter by cancellation process status (partial match)
      - name: issuedAt[before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by issue date (less than or equal `<=`)
      - name: issuedAt[strictly_before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by issue date (less than `<`)
      - name: issuedAt[after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by issue date (greater than or equal `>=`)
      - name: issuedAt[strictly_after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by issue date (greater than `>`)
      - name: canceledAt[before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by cancellation date (less than or equal `<=`)
      - name: canceledAt[strictly_before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by cancellation date (less than `<`)
      - name: canceledAt[after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by cancellation date (greater than or equal `>=`)
      - name: canceledAt[strictly_after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by cancellation date (greater than `>`)
      - name: createdAt[before]
        in: query
        required: false
        type: string
        description: Filter by creation date (less than or equal `<=`)
      - name: createdAt[strictly_before]
        in: query
        required: false
        type: string
        description: Filter by creation date (less than `<`)
      - name: createdAt[after]
        in: query
        required: false
        type: string
        description: Filter by creation date (greater than or equal `>=`)
      - name: createdAt[strictly_after]
        in: query
        required: false
        type: string
        description: Filter by creation date (greater than `>`)
      - name: updatedAt[before]
        in: query
        required: false
        type: string
        description: Filter by update date (less than or equal `<=`)
      - name: updatedAt[strictly_before]
        in: query
        required: false
        type: string
        description: Filter by update date (less than `<`)
      - name: updatedAt[after]
        in: query
        required: false
        type: string
        description: Filter by update date (greater than or equal `>=`)
      - name: updatedAt[strictly_after]
        in: query
        required: false
        type: string
        description: Filter by update date (greater than `>`)
      - name: certifiedAt[before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by certified date (less than or equal `<=`)
      - name: certifiedAt[strictly_before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by certified date (less than `<`)
      - name: certifiedAt[after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by certified date (greater than or equal `>=`)
      - name: certifiedAt[strictly_after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by certified date (greater than `>`)
      - name: lastPaymentDate[before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by last payment date (less than or equal `<=`)
      - name: lastPaymentDate[strictly_before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by last payment date (less than `<`)
      - name: lastPaymentDate[after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by last payment date (greater than or equal `>=`)
      - name: lastPaymentDate[strictly_after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by last payment date (greater than `>`)
      - name: fullyPaidAt[before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by fully paid date (less than or equal `<=`)
      - name: fullyPaidAt[strictly_before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by fully paid date (less than `<`)
      - name: fullyPaidAt[after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by fully paid date (greater than or equal `>=`)
      - name: fullyPaidAt[strictly_after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by fully paid date (greater than `>`)
      - name: tax[between]
        in: query
        required: false
        type: string
        description: Filter by tax between two values
      - name: tax[gt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by tax (greater than `>`)
      - name: tax[gte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by tax (greater than or equal `>=`)
      - name: tax[lt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by tax (less than `<`)
      - name: tax[lte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by tax (less than or equal `<=`)
      - name: discount[between]
        in: query
        required: false
        type: string
        description: Filter by discount between two values
      - name: discount[gt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by discount (greater than `>`)
      - name: discount[gte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by discount (greater than or equal `>=`)
      - name: discount[lt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by discount (less than `<`)
      - name: discount[lte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by discount (less than or equal `<=`)
      - name: subtotal[between]
        in: query
        required: false
        type: string
        description: Filter by subtotal between two values
      - name: subtotal[gt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by subtotal (greater than `>`)
      - name: subtotal[gte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by subtotal (greater than or equal `>=`)
      - name: subtotal[lt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by subtotal (less than `<`)
      - name: subtotal[lte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by subtotal (less than or equal `<=`)
      - name: total[between]
        in: query
        required: false
        type: string
        description: Filter by total between two values
      - name: total[gt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by total (greater than `>`)
      - name: total[gte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by total (greater than or equal `>=`)
      - name: total[lt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by total (less than `<`)
      - name: total[lte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by total (less than or equal `<=`)
      - name: paidAmount[between]
        in: query
        required: false
        type: string
        description: Filter by paidAmount between two values
      - name: paidAmount[gt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by paidAmount (greater than `>`)
      - name: paidAmount[gte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by paidAmount (greater than or equal `>=`)
      - name: paidAmount[lt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by paidAmount (less than `<`)
      - name: paidAmount[lte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by paidAmount (less than or equal `<=`)
      - name: dueAmount[between]
        in: query
        required: false
        type: string
        description: Filter by dueAmount between two values
      - name: dueAmount[gt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by dueAmount (greater than `>`)
      - name: dueAmount[gte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by dueAmount (greater than or equal `>=`)
      - name: dueAmount[lt]
        in: query
        required: false
        type: number
        format: double
        description: Filter by dueAmount (less than `<`)
      - name: dueAmount[lte]
        in: query
        required: false
        type: number
        format: double
        description: Filter by dueAmount (less than or equal `<=`)
      - name: hasXml
        in: query
        required: false
        type: boolean
        description: Filter by invoices that have the CFDI available in XML format
      - name: hasPdf
        in: query
        required: false
        type: boolean
        description: Filter by invoices that have the CFDI available in PDF format
      - name: order[issuedAt]
        in: query
        required: false
        enum:
        - asc
        - desc
        type: string
        description: Order by issue date
      - name: order[canceledAt]
        in: query
        required: false
        enum:
        - asc
        - desc
        type: string
        description: Order by cancellation date
      - name: order[certifiedAt]
        in: query
        required: false
        enum:
        - asc
        - desc
        type: string
        description: Order by certification date
      - name: order[amount]
        in: query
        required: false
        enum:
        - asc
        - desc
        type: string
        description: Order by amount
      - name: page
        in: query
        required: false
        default: 1
        type: integer
        format: int32
        description: The collection page number
      - name: itemsPerPage
        in: query
        required: false
        default: 30
        type: integer
        format: int32
        minimum: 1
        maximum: 100
        exclusiveMaximum: false
        exclusiveMinimum: false
        description: The number of items per page
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/responseTaxPayerInvoice'
          headers: {}
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/responseUnauthorized'
          headers: {}
  /tax-returns/{id}/data:
    get:
      description: Process a legal taxpayer annual tax return pdf and extracts the content from incomes statement and balance sheet
      summary: GetTaxReturnData
      tags:
      - TaxReturns
      operationId: GetTaxReturnData
      deprecated: false
      produces:
      - application/json
      parameters:
      - name: x-api-key
        in: header
        required: true
        type: string
        description: ConsumerKey obtenido desde el portal de desarrolladores
      - name: x-request-id
        in: header
        required: true
        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: ID returned in POST Credentials
      - name: id
        in: path
        required: true
        type: string
        format: uuid
        description: Tax Return ID
      responses:
        '200':
          description: Annual tax return data response
          schema:
            type: object
            default: ''
          examples:
            application/json:
              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
          headers: {}
        '400':
          description: Bad request.
          schema:
            $ref: '#/definitions/Errors'
          examples:
            application/json:
              errors:
              - code: '400'
                message: Missign parameters {x-api-key}.
          headers: {}
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/responseUnauthorized'
          headers: {}
        '404':
          description: Not found
          schema:
            $ref: '#/definitions/responseNotFound'
          headers: {}
  /taxpayers/{id}/tax-returns:
    get:
      description: List all taxpayer tax returns
      summary: ListTaxpayerTaxReturn
      tags:
      - TaxReturns
      operationId: ListTaxpayerTaxReturn
      deprecated: false
      produces:
      - application/json
      parameters:
      - name: x-api-key
        in: header
        required: true
        type: string
        description: ConsumerKey obtenido desde el portal de desarrolladores
      - name: x-request-id
        in: header
        required: true
        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: ID returned in POST Credentials
      - name: id
        in: path
        required: true
        type: string
        minLength: 12
        maxLength: 13
        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)
      - name: operationNumber
        in: query
        required: false
        type: number
        format: double
        description: Filter by operation number (partial match)
      - name: type
        in: query
        required: false
        enum:
        - Complementaria
        - Complementaria Corrección Fiscal
        - Complementaria Dictamen
        - Normal
        - Normal por Corrección Fiscal
        type: string
        description: Filter by type (exact match)
      - name: intervalUnit
        in: query
        required: false
        enum:
        - Anual
        - Mensual
        - RIF
        type: string
        description: Filter by interval unit (exact match)
      - name: complementary
        in: query
        required: false
        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
        type: string
        description: Filter by interval unit (partial match)
      - name: captureLine
        in: query
        required: false
        type: string
        description: Filter by payment code (partial match)
      - name: period
        in: query
        required: false
        type: string
        description: Filter by period (exact match)
      - name: presentedAt[before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by filing date (less than or equal `<=`)
      - name: presentedAt[strictly_before]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by filing date (less than `<`)
      - name: presentedAt[after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by filing date (greater than or equal `>=`)
      - name: presentedAt[strictly_after]
        in: query
        required: false
        type: string
        format: date-time
        description: Filter by filing date (greater than `>`)
      - name: fiscalYear
        in: query
        required: false
        type: string
        description: Filter by fiscal year (exact match)
      - name: order[period]
        in: query
        required: false
        enum:
        - asc
        - desc
        type: string
        description: Order by period
      - name: order[presentedAt]
        in: query
        required: false
        enum:
        - asc
        - desc
        type: string
        description: Order by filing date
      - name: page
        in: query
        required: false
        default: 1
        type: integer
        format: int32
        description: The collection page number
      - name: itemsPerPage
        in: query
        required: false
        default: 30
        type: integer
        format: int32
        minimum: 1
        maximum: 100
        exclusiveMaximum: false
        exclusiveMinimum: false
        description: The number of items per page
      responses:
        '200':
          description: Taxpayer tax return collection response
          schema:
            $ref: '#/definitions/TaxpayerTaxReturnCollection'
          headers: {}
        '400':
          description: Bad request.
          schema:
            $ref: '#/definitions/Errors'
          examples:
            application/json:
              errors:
              - code: '400'
                message: Missign parameters {x-api-key}.
          headers: {}
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/responseUnauthorized'
          headers: {}
        '404':
          description: Not found
          schema:
            $ref: '#/definitions/responseNotFound'
          headers: {}
  /taxpayers/{id}/tax-compliance-checks:
    get:
      description: List all taxpayer tax compliance checks
      summary: ListTaxpayerTaxComplianceCheck
      tags:
      - TaxComplianceChecks
      operationId: ListTaxpayerTaxComplianceCheck
      deprecated: false
      produces:
      - application/json
      parameters:
      - name: x-api-key
        in: header
        required: true
        type: string
        description: ConsumerKey obtenido desde el portal de desarrolladores
      - name: x-request-id
        in: header
        required: true
        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: ID returned in POST Credentials
      - name: id
        in: path
        required: true
        type: string
        minLength: 12
        maxLength: 13
        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)
      - name: internalIdentifier
        in: query
        required: false
        type: string
        description: ''
      - name: taxpayer.rfc
        in: query
        required: false
        type: string
        minLength: 12
        maxLength: 13
        description: ''
      - name: taxpayer.name
        in: query
        required: false
        type: string
        minLength: 1
        maxLength: 254
        description: ''
      - name: result
        in: query
        required: false
        enum:
        - positive
        - negative
        - no_obligations
        type: string
      - name: checkedAt[before]
        in: query
        required: false
        type: string
        description: Filter by check date (less than or equal `<=`)
      - name: checkedAt[strictly_before]
        in: query
        required: false
        type: string
        description: Filter by check date (less than `<`)
      - name: checkedAt[after]
        in: query
        required: false
        type: string
        description: Filter by check date (greater than or equal `>=`)
      - name: checkedAt[strictly_after]
        in: query
        required: false
        type: string
        description: Filter by check date (greater than `>`)
      - name: createdAt[before]
        in: query
        required: false
        type: string
        description: Filter by creation date (less than or equal `<=`)
      - name: createdAt[strictly_before]
        in: query
        required: false
        type: string
        description: Filter by creation date (less than `<`)
      - name: createdAt[after]
        in: query
        required: false
        type: string
        description: Filter by creation date (greater than or equal `>=`)
      - name: createdAt[strictly_after]
        in: query
        required: false
        type: string
        description: Filter by creation date (greater than `>`)
      - name: order[checkedAt]
        in: query
        required: false
        enum:
        - asc
        - desc
        type: string
        description: Order by check date
      - name: order[createdAt]
        in: query
        required: false
        enum:
        - asc
        - desc
        type: string
        description: Order by creation date
      - name: page
        in: query
        required: false
        default: 1
        type: integer
        format: int32
        description: The collection page number
      - name: itemsPerPage
        in: query
        required: false
        default: 30
        type: integer
        format: int32
        minimum: 1
        maximum: 100
        exclusiveMaximum: false
        exclusiveMinimum: false
        description: The number of items per page
      responses:
        '200':
          description: Taxpayer tax compliance check collection response
          schema:
            $ref: '#/definitions/responseTaxpayerTaxComplianceCheckCollection'
          headers: {}
        '400':
          description: Bad request.
          schema:
            $ref: '#/definitions/Errors'
          examples:
            application/json:
              errors:
              - code: '400'
                message: Missign parameters {x-api-key}.
          headers: {}
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/responseUnauthorized'
          headers: {}
        '404':
          description: Not found
          schema:
            $ref: '#/definitions/responseNotFound'
          headers: {}
  /taxpayers/{id}/tax-status:
    get:
      description: List all taxpayer´s tax status
      summary: ListTaxpayerTaxStatus
      tags:
      - TaxStatus
      operationId: ListTaxpayerTaxStatus
      deprecated: false
      produces:
      - application/json
      parameters:
      - name: x-api-key
        in: header
        required: true
        type: string
        description: ConsumerKey obtenido desde el portal de desarrolladores
      - name: x-request-id
        in: header
        required: true
        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: ID returned in POST Credentials
      - name: id
        in: path
        required: true
        type: string
        minLength: 12
        maxLength: 13
        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)
      responses:
        '200':
          description: Taxpayer tax status collection response
          schema:
            $ref: '#/definitions/responseTaxpayerTaxStatusCollection'
          headers: {}
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/responseUnauthorized'
          headers: {}
        '404':
          description: Not found
          schema:
            $ref: '#/definitions/responseNotFound'
          headers: {}
  /rfc/validate/{id}:
    get:
      description: RFC validator
      summary: GetRFCValidator
      tags:
      - RFCValidator
      operationId: GetRFCValidator
      deprecated: false
      produces:
      - application/json
      parameters:
      - name: x-api-key
        in: header
        required: true
        type: string
        description: ConsumerKey obtenido desde el portal de desarrolladores
      - name: x-request-id
        in: header
        required: true
        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: ID returned in POST Credentials
      - name: id
        in: path
        required: true
        type: string
        minLength: 12
        maxLength: 13
        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)
      responses:
        '200':
          description: RFC validator
          schema:
            $ref: '#/definitions/responseRFCValidator'
          headers: {}
definitions:
  CredentialCiecInput:
    title: CredentialCiecInput
    description: CIEC
    type: object
    properties:
      type:
        type: string
      rfc:
        description: Taxpayer ID (Registro Federal de Contribuyentes)
        example: PEIC211118IS0
        type: string
        minLength: 12
        maxLength: 13
        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])$
      password:
        description: CIEC's password
        example: secret123
        type: string
        minLength: 8
    required:
    - type
    - rfc
    - password
  responseCredential:
    title: responseCredential
    type: object
    properties:
      '@context':
        type: string
        default: /contexts/Credential
      '@id':
        description: Credential IRI reference
        example: /credentials/91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
      '@type':
        readOnly: true
        type: string
        default: Credential
      id:
        example: 91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
        format: uuid
      type:
        type: object
        allOf:
        - $ref: '#/definitions/CredentialType'
        - example: ciec
      rfc:
        description: RFC (Registro Federal de Contribuyentes)
        example: PEIC211118IS0
        type: string
        minLength: 12
        maxLength: 13
        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])$
      status:
        type: object
        allOf:
        - $ref: '#/definitions/CredentialStatus'
        - 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
      createdAt:
        description: Date and time the resource was created
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
      updatedAt:
        description: Date and time the resource was last updated
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
  CredentialType:
    title: CredentialType
    example: ciec
    type: string
    enum:
    - ciec
    - efirma
  CredentialStatus:
    title: CredentialStatus
    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
    type: string
    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:
        description: Concatenated violation messages
        example: 'exampleField: This value should not be blank.'
        type: string
      violations:
        type: array
        items:
          $ref: '#/definitions/responseCredential400Violation'
  Error:
    title: Error
    description: Error
    type: object
    properties:
      code:
        description: Error code.
        example: '400'
        type: string
      message:
        description: Descriptive and human-readable error message.
        example: External data source not available.
        type: string
        maxLength: 120
  Errors:
    title: Errors
    description: A list of errors.
    type: object
    properties:
      errors:
        description: List of errors.
        type: array
        items:
          $ref: '#/definitions/Error'
  responseCredential400Violation:
    title: responseCredential400Violation
    type: object
    properties:
      propertyPath:
        description: Property access path
        example: exampleField
        type: string
      message:
        description: Validaton error message
        example: This value should not be blank.
        type: string
  responseUnauthorized:
    title: responseUnauthorized
    type: object
    properties:
      message:
        type: string
  responseTaxPayerInvoice:
    title: responseTaxPayerInvoice
    type: object
    properties:
      '@context':
        example: /contexts/Invoice
        type: string
      '@id':
        example: /taxpayers/PEIC211118IS0/invoices
        type: string
      '@type':
        type: string
        default: hydra:Collection
      hydra:member:
        type: array
        items:
          $ref: '#/definitions/responseInvoice'
      hydra:totalItems:
        description: The total number of items found
        example: 1
        type: integer
        minimum: 0
        format: int32
      hydra:view:
        type: object
        allOf:
        - $ref: '#/definitions/responseHydraView'
        - description: Pagination information
      hydra:search:
        $ref: '#/definitions/responseHydraSearch'
  responseInvoice:
    title: responseInvoice
    type: object
    properties:
      '@id':
        description: Invoice IRI reference
        example: /invoices/91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
      '@type':
        readOnly: true
        type: string
        default: Invoice
      id:
        description: Invoice ID
        example: 91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
        format: uuid
      uuid:
        description: Invoice UUID (Folio fiscal)
        example: def404af-5eef-4112-aa99-d1ec8493b89a
        readOnly: true
        type: string
        format: uuid
      version:
        description: CFDI version
        example: 3.3
        type: number
        format: double
      reference:
        description: It is an open field for internal identification. Communly it is used to identify a branch
        example: Branch-A
        type: string
        maxLength: 25
      internalIdentifier:
        description: It is an open field for internal identification. Communly it is used to identify an invoice
        example: '00001'
        type: string
        maxLength: 40
      type:
        type: object
        allOf:
        - $ref: '#/definitions/responseInvoiceType'
        - description: Invoice type code from `c_TipoDeComprobante` catalog
          externalDocs:
            url: https://sat.ws/docs/catalogs/#c_tipodecomprobante
      usage:
        description: Invoice usage code from `c_UsoCFDI` catalog
        example: G03
        type: string
      paymentType:
        type: object
        allOf:
        - $ref: '#/definitions/responseInvoicePaymentType'
        - description: Payment type code from `c_MetodoPago` catalog
          example: PUE
          externalDocs:
            url: https://sat.ws/docs/catalogs#c_metodopago
      paymentMethod:
        description: Payment method code from `c_FormaPago` catalog
        example: '04'
        type: string
      placeOfIssue:
        description: Postal code of the place of issue
        example: '01210'
        readOnly: true
        type: string
      issuer:
        type: object
        allOf:
        - $ref: '#/definitions/responseInvoiceIssuer'
        - example:
            rfc: AOM920820BEA
            name: APPLE OPERATIONS MEXICO S.A. DE C.V.
            taxRegime: 601
      isIssuer:
        description: '`true` if the invoice issuer is the taxpayer from the link'
        example: true
        readOnly: true
        type: boolean
      receiver:
        $ref: '#/definitions/responseInvoiceReceiver'
      isReceiver:
        description: '`true` if the invoice receiver is the taxpayer from the link'
        example: false
        readOnly: true
        type: boolean
      currency:
        description: ISO 4217 alphabetic currency code
        example: MXN
        type: string
        minLength: 3
        maxLength: 3
      discount:
        description: Discount amount
        example: 3324
        type: number
        format: double
      tax:
        description: Tax amount
        example: 5224
        type: number
        format: double
      subtotal:
        description: Subtotal amount
        example: 51349.8
        type: number
        format: double
      total:
        description: Invoice total amount
        example: 53249.8
        type: number
        format: double
      exchangeRate:
        description: Set when *currency* is different than MXN (Mexican Peso).
        example: 19.8
        type: number
        format: double
      paidAmount:
        description: For a deferred invoice this field state the paid amount. (Applies only for "PPD" invoices).
        example: 53249.8
        type: number
        format: double
      dueAmount:
        description: For a deferred invoice this field state the due amount. (Applies only for "PPD" invoices).
        example: 0
        type: number
        format: double
      lastPaymentDate:
        description: This field is populated with the last related payment date (Applies only for "PPD" invoices).
        type: string
        format: date-time
      fullyPaidAt:
        description: This field is populated when the total debt is paid. (Applies only for "PPD" invoices).
        type: string
        format: date-time
      paymentTermsRaw:
        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
        type: string
      status:
        type: object
        allOf:
        - $ref: '#/definitions/responseInvoiceStatus'
        - description: Whether the invoice is active or canceled
          example: VIGENTE
      pac:
        description: Certification provider tax ID (Proveedor Autorizado de Certificación)
        example: SAT970701NN3
        type: string
        minLength: 12
        maxLength: 12
      issuedAt:
        description: Invoice issue date
        example: 2019-01-03T21:10:40Z
        type: string
        format: date-time
      certifiedAt:
        description: Invoice certification date
        example: 2019-01-03T21:10:41Z
        type: string
        format: date-time
      cancellationStatus:
        type: object
        allOf:
        - $ref: '#/definitions/responseInvoiceCancellationStatus'
        - description: Whether or not the invoice can be canceled
          example: Cancelable con aceptación
      cancellationProcessStatus:
        type: object
        allOf:
        - $ref: '#/definitions/responseInvoiceCancellationStatusProcess'
        - description: Set when the cancellation process starts
          example: En proceso
      canceledAt:
        description: Set when *status* is `CANCELADO`
        type: string
        format: date-time
      items:
        type: array
        items:
          $ref: '#/definitions/responseInvoiceItem'
      relations:
        type: array
        items:
          $ref: '#/definitions/responseInvoiceRelation'
      appliedCredits:
        type: array
        items:
          $ref: '#/definitions/responseInvoiceCreditNote'
      issuedCredits:
        type: array
        items:
          $ref: '#/definitions/responseInvoiceCreditNote'
      xml:
        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
        type: boolean
      pdf:
        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
        type: boolean
      createdAt:
        description: Date and time the resource was created
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
      updatedAt:
        description: Date and time the resource was last updated
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
  responseHydraView:
    title: responseHydraView
    description: Pagination information
    type: object
    properties:
      '@id':
        description: Current page IRI reference
        type: string
      '@type':
        type: string
        default: hydra:PartialCollectionView
      hydra:first:
        description: First page IRI reference. This property is omitted if there is no pagination.
        type: string
      hydra:next:
        description: Next page IRI reference. This property is omitted if there is no pagination.
        type: string
      hydra:last:
        description: Last page IRI reference. This property is omitted if there is no pagination.
        type: string
  responseHydraSearch:
    title: responseHydraSearch
    type: object
    properties:
      '@type':
        type: string
      hydra:template:
        type: string
      hydra:variableRepresentation:
        type: string
      hydra:mapping:
        type: array
        items:
          $ref: '#/definitions/responseHydraMapping'
  responseHydraMapping:
    title: responseHydraMapping
    type: object
    properties:
      '@type':
        type: string
      variable:
        type: string
      property:
        type: string
      required:
        type: boolean
  responseInvoicePaymentType:
    title: responseInvoicePaymentType
    description: Payment type code from `c_MetodoPago` catalog
    externalDocs:
      url: https://sat.ws/docs/catalogs#c_metodopago
    example: PUE
    type: string
    enum:
    - PUE
    - PPD
  responseInvoiceType:
    title: responseInvoiceType
    description: Invoice type code from `c_TipoDeComprobante` catalog
    externalDocs:
      url: https://sat.ws/docs/catalogs/#c_tipodecomprobante
    type: string
    enum:
    - I
    - E
    - P
    - N
    - T
  responseInvoiceIssuer:
    title: responseInvoiceIssuer
    example:
      rfc: AOM920820BEA
      name: APPLE OPERATIONS MEXICO S.A. DE C.V.
      taxRegime: 601
    type: object
    properties:
      rfc:
        description: RFC (Registro Federal de Contribuyentes)
        example: PEIC211118IS0
        type: string
        minLength: 12
        maxLength: 13
        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:
        description: Taxpayer name
        example: Pedro Infante Cruz
        type: string
        minLength: 1
        maxLength: 254
      taxRegime:
        description: Tax regime code from `c_RegimenFiscal` catalog
        example: 601
        type: number
        format: double
      blacklistStatus:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxpayerBlacklistStatus'
        - description: Show the blacklist status if a taxpayer is found in the list 69-B from SAT
          example: presumed
  responseInvoiceReceiver:
    title: responseInvoiceReceiver
    type: object
    properties:
      rfc:
        description: RFC (Registro Federal de Contribuyentes)
        example: PEIC211118IS0
        type: string
        minLength: 12
        maxLength: 13
        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:
        description: Taxpayer name
        example: Pedro Infante Cruz
        type: string
        minLength: 1
        maxLength: 254
      blacklistStatus:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxpayerBlacklistStatus'
        - description: Show the blacklist status if a taxpayer is found in the list 69-B from SAT
          example: presumed
  responseTaxpayerBlacklistStatus:
    title: responseTaxpayerBlacklistStatus
    description: Show the blacklist status if a taxpayer is found in the list 69-B from SAT
    example: presumed
    type: string
    enum:
    - presumed
    - dismissed
    - definitive
    - favorable
  responseInvoiceCancellationStatusProcess:
    title: responseInvoiceCancellationStatusProcess
    description: Set when the cancellation process starts
    example: En proceso
    type: string
    enum:
    - En proceso
    - Solicitud rechazada
    - Cancelado sin aceptación
    - Cancelado con aceptación
    - Plazo vencido
  responseInvoiceCancellationStatus:
    title: responseInvoiceCancellationStatus
    description: Whether or not the invoice can be canceled
    example: Cancelable con aceptación
    type: string
    enum:
    - Cancelable sin aceptación
    - Cancelable con aceptación
    - No cancelable
  responseInvoiceStatus:
    title: responseInvoiceStatus
    description: Whether the invoice is active or canceled
    example: VIGENTE
    type: string
    enum:
    - VIGENTE
    - CANCELADO
  responseInvoiceItem:
    title: responseInvoiceItem
    type: object
    properties:
      identificationNumber:
        example: Z0V0
        type: string
      productIdentification:
        example: '43211503'
        type: string
      description:
        example: MBP 15.4 SPACE GRAY
        type: string
      unitAmount:
        example: 45905
        type: number
        format: double
      unitCode:
        example: H87
        type: string
      quantity:
        example: 1
        type: number
        format: double
      discountAmount:
        example: 0
        type: number
        format: double
      taxType:
        example: '002'
        type: string
      taxRate:
        example: 0.16
        type: number
        format: double
      taxAmount:
        example: 7344.8
        type: number
        format: double
      totalAmount:
        example: 45905
        type: number
        format: double
  responseInvoiceRelation:
    title: responseInvoiceRelation
    type: object
    properties:
      '@id':
        description: Invoice relation IRI reference
        example: /invoices/relations/93a197e7-6baa-5dc5-bf8d-fb1645a770c1
        readOnly: true
        type: string
      '@type':
        readOnly: true
        type: string
        default: InvoiceRelation
      id:
        description: Invoice relation ID
        example: 91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
        format: uuid
      type:
        description: Invoice relation type code from `c_TipoRelacion` catalog
        example: 7
        type: number
        format: double
      invoice:
        description: Invoice IRI reference
        example: /invoices/92106967-2abd-5d64-95c2-4e73d96fb998
        type: string
      relatedInvoice:
        description: Invoice IRI reference
        example: /invoices/92106967-2abd-5d64-95c2-4e73d96fb998
        type: string
      relatedInvoiceUuid:
        description: The related Invoice UUID (Folio fiscal)
        example: def404af-5eef-4112-aa99-d1ec8493b89a
        readOnly: true
        type: string
        format: uuid
      createdAt:
        description: Date and time the resource was created
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
      updatedAt:
        description: Date and time the resource was last updated
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
  responseInvoiceCreditNote:
    title: responseInvoiceCreditNote
    type: object
    properties:
      '@id':
        description: Credit Note IRI reference
        example: /invoices/credit-note/91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
      '@type':
        readOnly: true
        type: string
        default: InvoicePayment
      appliedInvoice:
        description: Invoice IRI reference
        example: /invoices/91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
      issuedInvoice:
        description: Invoice IRI reference
        example: /invoices/91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
      issuedAt:
        description: Set when the payment invoice is canceled
        type: string
        format: date-time
      proportionalRate:
        description: The proportional credit rate applied to the target invoice.
        example: 19.8
        type: number
        format: double
      amount:
        description: The total amount of credits applied to the target invoice.
        example: 19.8
        type: number
        format: double
      issuedInvoiceTotal:
        description: The total of the issued invoice that was taken into account to calculate the credit.
        example: 19.8
        type: number
        format: double
      canceledAt:
        description: Set when the payment invoice is canceled
        type: string
        format: date-time
      createdAt:
        description: Date and time the resource was created
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
      updatedAt:
        description: Date and time the resource was last updated
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
  responseNotFound:
    title: responseNotFound
    type: object
    properties:
      message:
        type: string
  TaxpayerTaxReturnCollection:
    title: TaxpayerTaxReturnCollection
    type: object
    properties:
      '@context':
        type: string
      '@id':
        example: /taxpayers/PEIC211118IS0/tax-returns
        type: string
      '@type':
        type: string
        default: hydra:Collection
      hydra:member:
        type: array
        items:
          $ref: '#/definitions/responseTaxReturn'
      hydra:totalItems:
        description: The total number of items found
        example: 1
        type: integer
        minimum: 0
        format: int32
      hydra:view:
        type: object
        allOf:
        - $ref: '#/definitions/responseHydraView'
        - description: Pagination information
      hydra:search:
        $ref: '#/definitions/responseHydraSearch'
  responseTaxReturn:
    title: responseTaxReturn
    type: object
    properties:
      '@id':
        description: Tax return IRI reference
        example: /tax-returns/91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
      '@type':
        readOnly: true
        type: string
        default: TaxReturn
      id:
        description: Tax Return ID
        example: 91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
        format: uuid
      taxpayer:
        $ref: '#/definitions/responseTaxpayer'
      operationNumber:
        description: Tax return operation code generated by SAT (Número de operación)
        example: 200100172932
        readOnly: true
        type: number
        format: double
      intervalUnit:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxReturnIntervalUnit'
        - example: Mensual
      period:
        description: Fiscal period. For an annual tax return, it is a year and for monthly tax return it is a month
        example: Diciembre
        type: string
      fiscalYear:
        description: Fiscal year
        example: '2019'
        readOnly: true
        type: string
      type:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxReturnType'
        - example: Complementaria
      complementary:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxReturnComplementary'
        - description: Set when *type* is `complementaria*`
          example: Modificación de Obligaciones
      presentedAt:
        description: Tax return filing date
        type: string
        format: date-time
      captureLine:
        description: Set when the an amount should be paid back to SAT
        example: 042007HZ795527888246
        type: string
      files:
        description: Tax return PDF files (ack receipt, transcript and payment receipt)
        type: array
        items:
          $ref: '#/definitions/responseFile'
      payment:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxReturnPayment'
        - description: Payment
      createdAt:
        description: Date and time the resource was created
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
      updatedAt:
        description: Date and time the resource was last updated
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
  responseTaxpayer:
    title: responseTaxpayer
    type: object
    properties:
      '@id':
        description: Taxpayer IRI reference
        example: /taxpayers/PEIC211118IS0
        readOnly: true
        type: string
      '@type':
        readOnly: true
        type: string
        default: Taxpayer
      id:
        description: RFC (Registro Federal de Contribuyentes)
        example: PEIC211118IS0
        type: string
        minLength: 12
        maxLength: 13
        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])$
      personType:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxpayerPersonType'
        - example: physical
      registrationDate:
        type: string
        format: date
      name:
        description: Taxpayer name
        example: Pedro Infante Cruz
        type: string
        minLength: 1
        maxLength: 254
  responseTaxpayerPersonType:
    title: responseTaxpayerPersonType
    example: physical
    type: string
    enum:
    - physical
    - legal
  responseTaxReturnIntervalUnit:
    title: responseTaxReturnIntervalUnit
    example: Mensual
    type: string
    enum:
    - Anual
    - Mensual
    - RIF
  responseTaxReturnType:
    title: responseTaxReturnType
    example: Complementaria
    type: string
    enum:
    - Complementaria
    - Complementaria Corrección Fiscal
    - Complementaria Dictamen
    - Normal
    - Normal por Corrección Fiscal
  responseTaxReturnComplementary:
    title: responseTaxReturnComplementary
    description: Set when *type* is `complementaria*`
    example: Modificación de Obligaciones
    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
  responseFile:
    title: responseFile
    type: object
    properties:
      '@id':
        description: File IRI reference
        example: /files/91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
      '@type':
        readOnly: true
        type: string
        default: File
      id:
        example: 91106968-1abd-4d64-85c1-4e73d96fb997
        type: string
        format: uuid
      type:
        type: string
      resource:
        type: string
      mimeType:
        type: string
      extension:
        type: string
      size:
        example: 40544
        type: integer
        format: int32
      filename:
        type: string
      createdAt:
        description: Date and time the resource was created
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
      updatedAt:
        description: Date and time the resource was last updated
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
  responseTaxReturnPayment:
    title: responseTaxReturnPayment
    description: Payment
    type: object
    properties:
      dueAmount:
        example: 53249.8
        type: number
        format: double
      dueDate:
        example: 2019-01-03T21:10:40Z
        type: string
        format: date-time
      code:
        description: Payment code
        example: '0777555544443332222'
        type: string
      bank:
        description: Payer bank
        example: BBVA Bancomer, S.A.
        type: string
      paidAmount:
        description: Tax return paid amount
        type: number
        format: double
      date:
        description: Payment date
        type: string
        format: date-time
      operationNumber:
        example: '123456'
        type: string
  responseTaxpayerTaxComplianceCheckCollection:
    title: responseTaxpayerTaxComplianceCheckCollection
    type: object
    properties:
      '@context':
        type: string
      '@id':
        example: /taxpayers/PEIC211118IS0/tax-compliance-checks
        type: string
      '@type':
        type: string
        default: hydra:Collection
      hydra:member:
        type: array
        items:
          $ref: '#/definitions/responseTaxComplianceCheck'
      hydra:totalItems:
        description: The total number of items found
        example: 1
        type: integer
        minimum: 0
        format: int32
      hydra:view:
        type: object
        allOf:
        - $ref: '#/definitions/responseHydraView'
        - description: Pagination information
      hydra:search:
        $ref: '#/definitions/responseHydraSearch'
  responseTaxComplianceCheck:
    title: responseTaxComplianceCheck
    type: object
    properties:
      '@id':
        description: Tax compliance check IRI reference
        example: /tax-compliance-checks/91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
      '@type':
        readOnly: true
        type: string
        default: TaxComplianceCheck
      id:
        example: 91106968-1abd-4d64-85c1-4e73d96fb997
        type: string
      file:
        $ref: '#/definitions/responseFile'
      internalIdentifier:
        description: The internal identifier (folio) generated by the SAT
        example: 20NE1234567
        type: string
      taxpayer:
        $ref: '#/definitions/responseTaxComplianceTaxpayer'
      result:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxComplianceCheckResult'
        - example: no_obligations
      checkedAt:
        description: Check date
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
      createdAt:
        description: Date and time the resource was created
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
  responseTaxComplianceTaxpayer:
    title: responseTaxComplianceTaxpayer
    type: object
    properties:
      rfc:
        description: RFC (Registro Federal de Contribuyentes)
        example: PEIC211118IS0
        type: string
        minLength: 12
        maxLength: 13
        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:
        description: Taxpayer name
        example: Pedro Infante Cruz
        type: string
        minLength: 1
        maxLength: 254
  responseTaxComplianceCheckResult:
    title: responseTaxComplianceCheckResult
    example: no_obligations
    type: string
    enum:
    - positive
    - negative
    - no_obligations
  responseTaxpayerTaxStatusCollection:
    title: responseTaxpayerTaxStatusCollection
    type: object
    properties:
      '@context':
        type: string
      '@id':
        example: /taxpayers/PEIC211118IS0/tax-status
        type: string
      '@type':
        type: string
        default: hydra:Collection
      hydra:member:
        type: array
        items:
          $ref: '#/definitions/responseTaxStatus'
      hydra:totalItems:
        description: The total number of items found
        example: 1
        type: integer
        minimum: 0
        format: int32
      hydra:view:
        type: object
        allOf:
        - $ref: '#/definitions/responseHydraView'
        - description: Pagination information
      hydra:search:
        $ref: '#/definitions/responseHydraSearch'
  responseTaxStatus:
    title: responseTaxStatus
    type: object
    properties:
      '@id':
        description: Tax status IRI reference
        example: /tax-status/91106968-1abd-4d64-85c1-4e73d96fb997
        readOnly: true
        type: string
      '@type':
        readOnly: true
        type: string
        default: TaxStatus
      id:
        example: 91106968-1abd-4d64-85c1-4e73d96fb997
        type: string
      file:
        type: string
      rfc:
        description: RFC (Registro Federal de Contribuyentes)
        example: PEIC211118IS0
        type: string
        minLength: 12
        maxLength: 13
        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])$
      cif:
        example: '20060152922'
        type: string
      person:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxStatusPerson'
        - description: Person information. Null when the taxpayer is not a physical person.
      company:
        type: object
        allOf:
        - $ref: '#/definitions/responseTaxStatusCompany'
        - description: Company information. Null when the taxpayer is not a legal person.
      email:
        example: my-email@test.com
        type: string
      phone:
        example: '5512345678'
        type: string
        maxLength: 10
      address:
        $ref: '#/definitions/responseTaxStatusAddress'
      economicActivities:
        type: array
        items:
          $ref: '#/definitions/responseTaxStatusEconomicActivity'
      taxRegimes:
        type: array
        items:
          $ref: '#/definitions/responseTaxStatusTaxRegime'
      obligations:
        type: array
        items:
          $ref: '#/definitions/responseTaxStatusObligation'
      startedOperationsAt:
        type: string
        format: date-time
      status:
        example: Activo
        type: string
      statusUpdatedAt:
        type: string
        format: date-time
      createdAt:
        description: Date and time the resource was created
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
      updatedAt:
        description: Date and time the resource was last updated
        example: 2020-01-01T12:15:00.000Z
        readOnly: true
        type: string
  responseTaxStatusPerson:
    title: responseTaxStatusPerson
    description: Person information. Null when the taxpayer is not a physical person.
    type: object
    properties:
      fullName:
        example: Pedro Infante Cruz
        type: string
      firstName:
        example: Pedro
        type: string
      middleName:
        example: Infante
        type: string
      lastName:
        example: Cruz
        type: string
      curp:
        example: PEIC90110UEYBVT85
        type: string
  responseTaxStatusCompany:
    title: responseTaxStatusCompany
    description: Company information. Null when the taxpayer is not a legal person.
    type: object
    properties:
      legalName:
        example: APPLE OPERATIONS MEXICO
        type: string
      tradeName:
        example: APPLE OPERATIONS MEXICO S.A. DE C.V.
        type: string
      entityType:
        example: SOCIEDAD ANONIMA DE CAPITAL VARIABLE
        type: string
  responseTaxStatusAddress:
    title: responseTaxStatusAddress
    type: object
    properties:
      streetReferences:
        type: array
        items:
          type: string
        minItems: 1
      streetNumber:
        example: '8124'
        type: string
      buildingNumber:
        example: '496'
        type: string
      locality:
        example: TUXTLA GUTIERREZ
        type: string
      municipality:
        example: TUXTLA GUTIERREZ
        type: string
      postalCode:
        example: '29000'
        type: string
      state:
        example: CHIAPAS
        type: string
      streetName:
        example: Plaza Jorge Luis
        type: string
      streetType:
        example: Calle
        type: string
      neighborhood:
        example: Paseo Ricardo
        type: string
      statusRaw:
        example: LOCALIZADO - Domicilio Localizado
        type: string
  responseTaxStatusEconomicActivity:
    title: responseTaxStatusEconomicActivity
    type: object
    properties:
      name:
        example: Asalariado
        type: string
      order:
        example: '1'
        type: string
      percentage:
        example: '100'
        type: string
      endDate:
        type: string
        format: date
      startDate:
        type: string
        format: date
  responseTaxStatusTaxRegime:
    title: responseTaxStatusTaxRegime
    type: object
    properties:
      name:
        example: Régimen de Sueldos y Salarios e Ingresos Asimilados a Salarios
        type: string
      endDate:
        type: string
        format: date
      startDate:
        type: string
        format: date
  responseTaxStatusObligation:
    title: responseTaxStatusObligation
    type: object
    properties:
      description:
        example: Pago definitivo mensual de IVA.
        type: string
      dueDate:
        example: A más tardar el día 17 del mes inmediato posterior al periodo que corresponda.
        type: string
      endDate:
        type: string
        format: date
      startDate:
        type: string
        format: date
  responseRFCValidator:
    title: responseRFCValidator
    type: object
    properties:
      valid:
        description: It is `true` if the format is correct
        example: true
        type: boolean
      active:
        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: boolean
      type:
        type: object
        allOf:
        - $ref: '#/definitions/responseRFCType'
        - description: Taxpayer type
          example: physical
      createdAt:
        type: string
  responseRFCType:
    title: responseRFCType
    description: Taxpayer type
    example: physical
    type: string
    enum:
    - physical
    - legal
  cancellationStatus:
    title: cancellationStatus
    type: string
    enum:
    - Cancelable sin aceptación
    - Cancelable con aceptación
    - No cancelable
  cancellationStatusProcess:
    title: cancellationStatusProcess
    type: string
    enum:
    - En proceso
    - Solicitud rechazada
    - Cancelado sin aceptación
    - Cancelado con aceptación
    - Plazo vencido
  complementary:
    title: complementary
    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
  issuer.blacklistStatus:
    title: issuer.blacklistStatus
    type: string
    enum:
    - presumed
    - dismissed
    - definitive
    - favorable
  order[amount]:
    title: order[amount]
    type: string
    enum:
    - asc
    - desc
  order[canceledAt]:
    title: order[canceledAt]
    type: string
    enum:
    - asc
    - desc
  order[certifiedAt]:
    title: order[certifiedAt]
    type: string
    enum:
    - asc
    - desc
  order[checkedAt]:
    title: order[checkedAt]
    type: string
    enum:
    - asc
    - desc
  order[createdAt]:
    title: order[createdAt]
    type: string
    enum:
    - asc
    - desc
  order[issuedAt]:
    title: order[issuedAt]
    type: string
    enum:
    - asc
    - desc
  order[period]:
    title: order[period]
    type: string
    enum:
    - asc
    - desc
  order[presentedAt]:
    title: order[presentedAt]
    type: string
    enum:
    - asc
    - desc
  paymentType:
    title: paymentType
    type: string
    enum:
    - PUE
    - PPD
  receiver.blacklistStatus:
    title: receiver.blacklistStatus
    type: string
    enum:
    - presumed
    - dismissed
    - definitive
    - favorable
  status:
    title: status
    type: string
    enum:
    - VIGENTE
    - CANCELADO
  type:
    title: type
    type: string
    enum:
    - I
    - E
    - P
    - N
    - T
tags:
- name: Credentials
  description: ''
- name: Invoices
  description: ''
- name: TaxReturns
  description: ''
- name: TaxComplianceChecks
  description: ''
- name: TaxStatus
  description: ''
- name: RFCValidator
  description: ''
