POST
/
exports
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": "/taxpayers/PEIC211118IS0/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": "/taxpayers/PEIC211118IS0/invoices?usage=I01&type=I&issuedAt[after]=2020-01-01",
  "createdAt": "2020-01-01T12:15:00.000Z",
  "updatedAt": "2020-01-01T12:15:00.000Z"
}

Authorizations

X-API-Key
string
header
required

Your API key is available in the Production and Sandbox dashboards.

Body

application/json
format
enum<string>
required

Format for your resource

Available options:
csv,
xlsx,
json
uri
string
required

Use any supported content type's collection endpoints and use its query parameters to filter

Example of supported URI values

  • /entities
  • /taxpayers/{id}/tax-returns
  • /taxpayers/{id}/invoices
fileTypes
enum<string>[]

If a this field is specified it will return a ZIP file with the content files (Available just for Invoices) Use the prefixed values corresponding to the data that you want

Minimum length: 1

Response

Export resource response

@context
string
default:/contexts/Export
@id
string<iri-reference>

Export IRI reference

Example:

"/exports/91106968-1abd-4d64-85c1-4e73d96fb997"

@type
string
default:Export
id
string<uuid>
Example:

"91106968-1abd-4d64-85c1-4e73d96fb997"

file
object
Example:
{
"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
string
Example:

"xlsx"

fileTypes
enum<string>[]
Minimum length: 1
status
enum<string>
Available options:
pending,
running,
finished,
failed
Example:

"pending"

uri
string
Example:

"/taxpayers/PEIC211118IS0/invoices?usage=I01&type=I&issuedAt[after]=2020-01-01"

createdAt
string

Date and time the resource was created

Example:

"2020-01-01T12:15:00.000Z"

updatedAt
string

Date and time the resource was last updated

Example:

"2020-01-01T12:15:00.000Z"