curl --request GET \
--url https://api.newinvoice.dev/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.newinvoice.dev/v1/invoices/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.newinvoice.dev/v1/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.newinvoice.dev/v1/invoices/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.newinvoice.dev/v1/invoices/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.newinvoice.dev/v1/invoices/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.newinvoice.dev/v1/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "invoice",
"id": "obj_2P9K3sample",
"livemode": false,
"status": "draft",
"type": "I",
"fiscal_profile_id": "fp_2P9K3sample",
"serie": "string",
"folio": "string",
"customer": {
"rfc": "XAXX010101000",
"name": "string",
"zip": "string",
"tax_regime": "string",
"use": "string"
},
"currency": "MXN",
"subtotal": "116.00",
"total": "116.00",
"uuid": "5FB2822E-396D-4725-8521-CDC4BDD20CCF",
"stamped_at": "2026-07-10T18:25:43Z",
"sello_cfd": "string",
"sello_sat": "string",
"no_certificado_sat": "string",
"cancellation": {
"status": "none",
"reason": "string",
"substitute_invoice_id": "inv_2P9K3sample",
"acuse_available": true
},
"error": "string",
"xml_url": "https://example.com/webhooks/invoice",
"pdf_url": "https://example.com/webhooks/invoice",
"metadata": {},
"fiscal_profile": {
"object": "fiscal_profile",
"id": "obj_2P9K3sample",
"rfc": "XAXX010101000",
"legal_name": "string",
"tax_regime": "string",
"zip": "string",
"csd": {
"serial": "string",
"valid_from": "string",
"valid_to": "string",
"rfc": "XAXX010101000"
},
"status": "requires_action",
"has_fiel": true,
"manifest_status": "pending_signature",
"manifest_signed_at": "2026-07-10T18:25:43Z",
"next_actions": [
{
"type": "string",
"message": "string",
"endpoint": "string",
"requires": [
"string"
]
}
],
"pending_actions": [
{
"type": "string",
"message": "string",
"endpoint": "string",
"requires": [
"string"
]
}
],
"metadata": {},
"brand_color": "string",
"has_logo": true,
"livemode": false,
"created_at": "2026-07-10T18:25:43Z",
"updated_at": "2026-07-10T18:25:43Z"
},
"created_at": "2026-07-10T18:25:43Z",
"updated_at": "2026-07-10T18:25:43Z"
}{
"type": "https://errors.invoiceapi.mx/auth_unauthorized",
"title": "Authentication required",
"status": 401,
"code": "auth.unauthorized",
"detail": "Missing or invalid API key.",
"remediation": "Send `Authorization: Bearer sk_test_...` (or sk_live_...) with a valid API key.",
"doc_url": "/docs/errors#auth-unauthorized",
"request_id": "req_2P9K3sample"
}{
"type": "https://errors.invoiceapi.mx/resource_not_found",
"title": "Resource not found",
"status": 404,
"code": "resource.not_found",
"detail": "No such id in this org + mode.",
"remediation": "Verify the id and that the key mode (test/live) matches the id.",
"doc_url": "/docs/errors#resource-not_found",
"request_id": "req_2P9K3sample"
}{
"type": "https://errors.invoiceapi.mx/cfdi_invalid_input",
"title": "Invalid invoice",
"status": 422,
"code": "cfdi.invalid_input",
"detail": "items.0.unit_price: expected a decimal string.",
"remediation": "Fix every field listed in `errors` and resubmit. See /openapi.json for the schema.",
"doc_url": "/docs/errors#cfdi-invalid_input",
"request_id": "req_2P9K3sample"
}{
"type": "https://errors.invoiceapi.mx/rate_limit_exceeded",
"title": "Rate limit exceeded",
"status": 429,
"code": "rate_limit.exceeded",
"detail": "Too many requests for this key + request class (reads and writes are limited separately).",
"remediation": "Back off and retry after the number of seconds in the Retry-After header; batch work or lower your request rate.",
"doc_url": "/docs/errors#rate_limit-exceeded",
"request_id": "req_2P9K3sample"
}{
"type": "https://errors.invoiceapi.mx/internal_error",
"title": "Internal server error",
"status": 500,
"code": "internal.error",
"detail": "An unexpected error occurred.",
"remediation": "Retry later; contact support with the request_id if it persists.",
"doc_url": "/docs/errors#internal-error",
"request_id": "req_2P9K3sample"
}Retrieve an invoice
Fetch one invoice by id. Pass expand=fiscal_profile to inline the issuer profile.
curl --request GET \
--url https://api.newinvoice.dev/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.newinvoice.dev/v1/invoices/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.newinvoice.dev/v1/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.newinvoice.dev/v1/invoices/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.newinvoice.dev/v1/invoices/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.newinvoice.dev/v1/invoices/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.newinvoice.dev/v1/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "invoice",
"id": "obj_2P9K3sample",
"livemode": false,
"status": "draft",
"type": "I",
"fiscal_profile_id": "fp_2P9K3sample",
"serie": "string",
"folio": "string",
"customer": {
"rfc": "XAXX010101000",
"name": "string",
"zip": "string",
"tax_regime": "string",
"use": "string"
},
"currency": "MXN",
"subtotal": "116.00",
"total": "116.00",
"uuid": "5FB2822E-396D-4725-8521-CDC4BDD20CCF",
"stamped_at": "2026-07-10T18:25:43Z",
"sello_cfd": "string",
"sello_sat": "string",
"no_certificado_sat": "string",
"cancellation": {
"status": "none",
"reason": "string",
"substitute_invoice_id": "inv_2P9K3sample",
"acuse_available": true
},
"error": "string",
"xml_url": "https://example.com/webhooks/invoice",
"pdf_url": "https://example.com/webhooks/invoice",
"metadata": {},
"fiscal_profile": {
"object": "fiscal_profile",
"id": "obj_2P9K3sample",
"rfc": "XAXX010101000",
"legal_name": "string",
"tax_regime": "string",
"zip": "string",
"csd": {
"serial": "string",
"valid_from": "string",
"valid_to": "string",
"rfc": "XAXX010101000"
},
"status": "requires_action",
"has_fiel": true,
"manifest_status": "pending_signature",
"manifest_signed_at": "2026-07-10T18:25:43Z",
"next_actions": [
{
"type": "string",
"message": "string",
"endpoint": "string",
"requires": [
"string"
]
}
],
"pending_actions": [
{
"type": "string",
"message": "string",
"endpoint": "string",
"requires": [
"string"
]
}
],
"metadata": {},
"brand_color": "string",
"has_logo": true,
"livemode": false,
"created_at": "2026-07-10T18:25:43Z",
"updated_at": "2026-07-10T18:25:43Z"
},
"created_at": "2026-07-10T18:25:43Z",
"updated_at": "2026-07-10T18:25:43Z"
}{
"type": "https://errors.invoiceapi.mx/auth_unauthorized",
"title": "Authentication required",
"status": 401,
"code": "auth.unauthorized",
"detail": "Missing or invalid API key.",
"remediation": "Send `Authorization: Bearer sk_test_...` (or sk_live_...) with a valid API key.",
"doc_url": "/docs/errors#auth-unauthorized",
"request_id": "req_2P9K3sample"
}{
"type": "https://errors.invoiceapi.mx/resource_not_found",
"title": "Resource not found",
"status": 404,
"code": "resource.not_found",
"detail": "No such id in this org + mode.",
"remediation": "Verify the id and that the key mode (test/live) matches the id.",
"doc_url": "/docs/errors#resource-not_found",
"request_id": "req_2P9K3sample"
}{
"type": "https://errors.invoiceapi.mx/cfdi_invalid_input",
"title": "Invalid invoice",
"status": 422,
"code": "cfdi.invalid_input",
"detail": "items.0.unit_price: expected a decimal string.",
"remediation": "Fix every field listed in `errors` and resubmit. See /openapi.json for the schema.",
"doc_url": "/docs/errors#cfdi-invalid_input",
"request_id": "req_2P9K3sample"
}{
"type": "https://errors.invoiceapi.mx/rate_limit_exceeded",
"title": "Rate limit exceeded",
"status": 429,
"code": "rate_limit.exceeded",
"detail": "Too many requests for this key + request class (reads and writes are limited separately).",
"remediation": "Back off and retry after the number of seconds in the Retry-After header; batch work or lower your request rate.",
"doc_url": "/docs/errors#rate_limit-exceeded",
"request_id": "req_2P9K3sample"
}{
"type": "https://errors.invoiceapi.mx/internal_error",
"title": "Internal server error",
"status": 500,
"code": "internal.error",
"detail": "An unexpected error occurred.",
"remediation": "Retry later; contact support with the request_id if it persists.",
"doc_url": "/docs/errors#internal-error",
"request_id": "req_2P9K3sample"
}Authorizations
API key: Authorization: Bearer sk_test_... or sk_live_....
Headers
Pin a dated API release (Stripe-style). Omit to use the current version. An unknown value returns 400 request.invalid_version. Echoed back on every response.
"2026-07-10"
Connect: act on behalf of one of your connected accounts (its acct_…/org_… id). Omit to act as your own organization. Not honored on /v1/api_keys.
"org_2P9connectedacct"
Path Parameters
Invoice id, e.g. "inv_2P9K3sample".
1Query Parameters
Comma-separated related objects to inline, e.g. "fiscal_profile".
Bracket-array form of expand, e.g. ?expand[]=fiscal_profile.
Response
Default Response
Always "invoice".
invoice Invoice id, e.g. "inv_2P9K3sample".
True if stamped with a live-mode key against the real SAT.
Lifecycle status: draft, stamping (in flight), stamped, or stamp_failed.
draft, stamping, stamped, stamp_failed CFDI TipoDeComprobante: "I" ingreso, "E" egreso (nota de crédito), "P" pago.
I, E, P Id of the fiscal profile (issuer) that stamped this invoice.
CFDI Serie, or null if unset.
CFDI Folio, or null if unset.
The receptor (customer) as stamped onto the CFDI.
Show child attributes
Show child attributes
c_Moneda currency code, e.g. "MXN".
Sum of line amounts before taxes, decimal string, e.g. "100.00".
Grand total including taxes, decimal string, e.g. "116.00".
SAT folio fiscal (UUID) once stamped, else null.
When the CFDI was stamped (ISO-8601 UTC), or null.
Issuer digital seal (Sello del CFDI), or null.
SAT digital seal from the TimbreFiscalDigital, or null.
SAT certificate serial that timbró the CFDI, or null.
Cancellation status for this CFDI.
Show child attributes
Show child attributes
The last stamping error (problem+json shape) when status is stamp_failed, else null.
Path to download the CFDI XML, e.g. "/v1/invoices/:id/xml".
Path to download the CFDI PDF, e.g. "/v1/invoices/:id/pdf".
Integrator-owned key-value map echoed back.
Show child attributes
Show child attributes
Creation timestamp, ISO-8601 UTC.
Last-update timestamp, ISO-8601 UTC.
The full issuer profile — present only when ?expand=fiscal_profile is requested.
Show child attributes
Show child attributes