curl --request POST \
--url https://api.syntage.com/exports \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"format": "xlsx",
"fileTypes": [
"invoice.cfdi.xml"
],
"uri": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997/invoices?usage=I01&type=I&issuedAt[after]=2020-01-01"
}
'{
"@context": "/contexts/Export",
"@id": "/exports/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "Export",
"id": "91106968-1abd-4d64-85c1-4e73d96fb997",
"file": {
"type": "Export",
"resource": "/exports/91106968-1abd-4d64-85c1-4e73d96fb997",
"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"extension": "xlsx",
"filename": "9137b53f-1abd-4d64-85c1-4e73d96fb997.xlsx"
},
"format": "xlsx",
"fileTypes": [
"invoice.cfdi.xml"
],
"status": "pending",
"uri": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997/invoices?usage=I01&type=I&issuedAt[after]=2020-01-01",
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}{
"@context": "/contexts/ConstraintViolation",
"@type": "ConstraintViolation",
"hydra:title": "An error occurred",
"hydra:description": "exampleField: This value should not be blank.",
"violations": [
{
"propertyPath": "exampleField",
"message": "This value should not be blank.",
"code": "rfc_valid_no_name_on_file"
}
]
}{
"message": "<string>"
}Export data
Create an export from a supported collection URI. The export runs asynchronously and returns an Export resource that can be polled until the generated file is ready.
curl --request POST \
--url https://api.syntage.com/exports \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"format": "xlsx",
"fileTypes": [
"invoice.cfdi.xml"
],
"uri": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997/invoices?usage=I01&type=I&issuedAt[after]=2020-01-01"
}
'{
"@context": "/contexts/Export",
"@id": "/exports/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "Export",
"id": "91106968-1abd-4d64-85c1-4e73d96fb997",
"file": {
"type": "Export",
"resource": "/exports/91106968-1abd-4d64-85c1-4e73d96fb997",
"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"extension": "xlsx",
"filename": "9137b53f-1abd-4d64-85c1-4e73d96fb997.xlsx"
},
"format": "xlsx",
"fileTypes": [
"invoice.cfdi.xml"
],
"status": "pending",
"uri": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997/invoices?usage=I01&type=I&issuedAt[after]=2020-01-01",
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}{
"@context": "/contexts/ConstraintViolation",
"@type": "ConstraintViolation",
"hydra:title": "An error occurred",
"hydra:description": "exampleField: This value should not be blank.",
"violations": [
{
"propertyPath": "exampleField",
"message": "This value should not be blank.",
"code": "rfc_valid_no_name_on_file"
}
]
}{
"message": "<string>"
}Authorizations
Your API key is available in the Production and Sandbox dashboards.
Body
Format for your resource.
Use csv, xlsx, or json for collection URIs. Use pdf only for report URIs.
csv, xlsx, json, pdf Collection URI used as the export source. Use the collection's query parameters to filter the exported data.
Example of supported URI values
- /entities
- /entities/{entityId}/tax-returns
- /entities/{entityId}/invoices
- /entities/{entityId}/reports/{reportId}?exporting=true
Report PDF exports
To download a report as a PDF document, set format to pdf and uri to /entities/{entityId}/reports/{reportId}?exporting=true. The exporting=true query parameter is required; other query parameters are not supported on report URIs. The generated PDF renders the report the same way the dashboard shows it to the requesting user, in the user's locale and over the report's default period, and is attached to the export as a report.insights.pdf file.
"/entities/91106968-1abd-4d64-85c1-4e73d96fb997/invoices?issuedAt[after]=2026-01-01"
Optional file types to include in the generated export; when specified, the export file includes the matching content files
1invoice.cfdi.xml, invoice.cfdi.pdf, tax_return.transcript, tax_return.ack_receipt, tax_return.payment_receipt ["invoice.cfdi.xml"]
Response
Export resource response
Export IRI reference
"/exports/91106968-1abd-4d64-85c1-4e73d96fb997"
JSON-LD resource type
Unique export ID
"91106968-1abd-4d64-85c1-4e73d96fb997"
Generated file once the export is finished
Show child attributes
Show child attributes
{
"type": "Export",
"resource": "/exports/91106968-1abd-4d64-85c1-4e73d96fb997",
"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"extension": "xlsx",
"filename": "9137b53f-1abd-4d64-85c1-4e73d96fb997.xlsx"
}
Output format for the generated export file
"xlsx"
File types to include in the export
1invoice.cfdi.xml, invoice.cfdi.pdf, tax_return.transcript, tax_return.ack_receipt, tax_return.payment_receipt ["invoice.cfdi.xml"]
Current export processing status
pending, running, finished, failed, stopping, stopped "pending"
API collection URI used as the export source
"/entities/91106968-1abd-4d64-85c1-4e73d96fb997/invoices?usage=I01&type=I&issuedAt[after]=2020-01-01"
Date and time the resource was created
"2020-01-01T12:15:00.000Z"
Date and time the resource was last updated
"2020-01-01T12:15:00.000Z"
Was this page helpful?