Facturación

Listar Billing Documents

Changed on

Lista los billing documents de la organización que coinciden con los filtros indicados.

Devuelve los billing documents (CFDI) filtrables por los parámetros de query. Falla con 404 si no se encuentran resultados para los filtros dados.

get/billing-documents

Request

  • Base URL
    https://api.trytoku.com
  • URL
    https://api.trytoku.com/billing-documents
  • Auth
    API key in header x-api-key

Query parameters

integer
OR
string
integer
OR
string
checkout_session_idstring

Identificador de la Checkout Session con la que se cobró.

foliostring

Folio con que se timbró el CFDI.

start_datestring date-time

Acota el listado a los billing documents emitidos desde esta fecha, inclusive.

end_datestring date-time

Acota el listado a los billing documents emitidos hasta esta fecha, inclusive.

status'ISSUED' | 'FAILED' | 'CANCELLED' | 'PENDING_CANCELLATION'

Estado de un comprobante fiscal mexicano ante el SAT. Nace ISSUED, que es el documento ya timbrado y vigente. Pedir su cancelación lo deja en PENDING_CANCELLATION mientras el receptor la acepta, y el documento sigue vigente durante esa espera: pasa a CANCELLED si la acepta, y vuelve a ISSUED si la ventana de aceptación vence sin respuesta.

FAILED está declarado pero ningún flujo lo emite: el comprobante se registra solo después de timbrarse, así que un timbrado fallido no deja documento.

Estado del billing document ante el SAT: ISSUED timbrado, FAILED fallido, CANCELLED cancelado y PENDING_CANCELLATION con la cancelación pedida y en espera de respuesta del SAT.

limitinteger

Cantidad máxima de billing documents a devolver.

offsetinteger

Cantidad de billing documents a saltar antes de empezar a devolver, para paginar.

Headers

x-account-keystring

Llave de API de una Account, para operar sobre esa Account en lugar de la principal.

Response

Successful Response

billing_addressstring
billing_emailstring
checkout_session_idstring
discountnumber required
fiscal_billing_idstring required
foliostring required
id_accountstring required
id_billing_documentstring required
id_customerstring
id_invoicestring
id_transactionstring
issue_datestring date-time required
pdf_urlstring required
provider_external_idstring required
public_pdf_urlstring
public_xml_urlstring
related_fiscal_billing_idstring
status'ISSUED' | 'FAILED' | 'CANCELLED' | 'PENDING_CANCELLATION'

Estado de un comprobante fiscal mexicano ante el SAT. Nace ISSUED, que es el documento ya timbrado y vigente. Pedir su cancelación lo deja en PENDING_CANCELLATION mientras el receptor la acepta, y el documento sigue vigente durante esa espera: pasa a CANCELLED si la acepta, y vuelve a ISSUED si la ventana de aceptación vence sin respuesta.

FAILED está declarado pero ningún flujo lo emite: el comprobante se registra solo después de timbrarse, así que un timbrado fallido no deja documento.

sub_totalnumber required
tax_idstring required
tax_regimestring required
tax_zip_codestring required
totalnumber required
type'INVOICE' | 'CREDIT_NOTE' | 'COMPLEMENT'

Clase de comprobante fiscal mexicano (CFDI) que se emitió: INVOICE es la factura de ingreso que documenta la venta, COMPLEMENT el complemento de pago que acusa el pago de una factura PPD ya emitida, y CREDIT_NOTE la nota de crédito que rebaja o revierte un comprobante anterior, relacionada al CFDI original.

xml_urlstring required

Changes

    • breaking

      the / response's property type changed from no type to string for status

    • breaking

      the / response's property type changed from no type to string for status

    • breaking

      the / response's property type changed from integer to number for status

    • breaking

      the / response's property type changed from string to no type for status

    • breaking

      the / response's property type changed from integer to number for status

    • breaking

      the / response's property type changed from integer to number for status

    • breaking

      the / response's property type changed from string to no type for status

    • warning

      added the new CANCELLED enum value to the / response property for the response status

    • warning

      added the new COMPLEMENT enum value to the / response property for the response status

    • warning

      added the new CREDIT_NOTE enum value to the / response property for the response status

    • warning

      added the new FAILED enum value to the / response property for the response status

    • warning

      added the new INVOICE enum value to the / response property for the response status

    • warning

      added the new ISSUED enum value to the / response property for the response status

    • warning

      added the new PENDING_CANCELLATION enum value to the / response property for the response status

    • info

      api operation id obtener-facturas removed and replaced with get_billing_document

    • info

      api tag Facturación added

    • info

      added the new optional header request parameter x-account-key

    • info

      added the new optional query request parameter checkout_session_id

    • info

      query request parameter id_invoice list-of-types was widened by adding types integer

    • info

      query request parameter id_transaction list-of-types was widened by adding types integer

    • info

      for the query request parameter end_date, the format was generalized from date to date-time

    • info

      for the query request parameter id_invoice, the type was generalized from string to no type

    • info

      for the query request parameter id_transaction, the type was generalized from string to no type

    • info

      for the query request parameter limit, the format was generalized from int32 to no format

    • info

      for the query request parameter offset, the format was generalized from int32 to no format

    • info

      for the query request parameter start_date, the format was generalized from date to date-time

    • info

      for the query request parameter status, the type was generalized from string to no type

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response's property default value 0 was removed for the status

    • info

      the response's property default value 0 was removed for the status

    • info

      the response's property default value 0 was removed for the status