POST
/
invoices
/
{id}
/
tags
Tag an invoice
curl --request POST \
  --url https://api.syntage.com/invoices/{id}/tags \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "tags": [
    "/tags/91106968-1abd-4d64-85c1-4e73d96fb997"
  ]
}'
{
  "@context": "/contexts/Invoice",
  "@id": "/invoices/91106968-1abd-4d64-85c1-4e73d96fb997",
  "@type": "Invoice",
  "id": "91106968-1abd-4d64-85c1-4e73d96fb997",
  "uuid": "def404af-5eef-4112-aa99-d1ec8493b89a",
  "version": 3.3,
  "reference": "Branch-A",
  "internalIdentifier": "00001",
  "type": "I",
  "usage": "G03",
  "paymentType": "PUE",
  "paymentMethod": "04",
  "paymentTerms": "immediate_payment",
  "placeOfIssue": "01210",
  "issuer": {
    "rfc": "AOM920820BEA",
    "name": "APPLE OPERATIONS MEXICO S.A. DE C.V.",
    "taxRegime": 601,
    "blacklistStatus": null
  },
  "isIssuer": true,
  "receiver": {
    "rfc": "PEIC211118IS0",
    "name": "Pedro Infante Cruz",
    "blacklistStatus": "presumed"
  },
  "isReceiver": false,
  "currency": "MXN",
  "discount": 3324,
  "tax": 5224,
  "subtotal": 51349.8,
  "creditedAmount": 31.32,
  "subtotalCreditedAmount": 27,
  "total": 53249.8,
  "exchangeRate": 19.8,
  "paidAmount": 53249.8,
  "dueAmount": 0,
  "lastPaymentDate": "2023-11-07T05:31:56Z",
  "fullyPaidAt": "2023-11-07T05:31:56Z",
  "paymentTermsRaw": "Tarjeta de crédito",
  "status": "VIGENTE",
  "pac": "SAT970701NN3",
  "issuedAt": "2019-01-03T21:10:40.000Z",
  "certifiedAt": "2019-01-03T21:10:41.000Z",
  "cancellationStatus": "Cancelable con aceptación",
  "cancellationProcessStatus": "En proceso",
  "canceledAt": "2023-11-07T05:31:56Z",
  "relations": [
    {
      "@id": "/invoices/relations/93a197e7-6baa-5dc5-bf8d-fb1645a770c1",
      "@type": "InvoiceRelation",
      "id": "91106968-1abd-4d64-85c1-4e73d96fb997",
      "type": 7,
      "invoice": "/invoices/92106967-2abd-5d64-95c2-4e73d96fb998",
      "relatedInvoice": "/invoices/92106967-2abd-5d64-95c2-4e73d96fb998",
      "relatedInvoiceUuid": "def404af-5eef-4112-aa99-d1ec8493b89a",
      "createdAt": "2020-01-01T12:15:00.000Z",
      "updatedAt": "2020-01-01T12:15:00.000Z"
    }
  ],
  "xml": true,
  "pdf": true,
  "createdAt": "2020-01-01T12:15:00.000Z",
  "updatedAt": "2020-01-01T12:15:00.000Z",
  "tags": [
    {
      "@id": "/tags/91106968-1abd-4d64-85c1-4e73d96fb997",
      "@type": "Tag",
      "id": "e0a24894-7fbf-48ae-bfb0-efaae30a6319",
      "name": "To be reviewed",
      "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.

Path Parameters

id
string<uuid>
required

Body

application/json
tags
string

The tags to be associated with the invoice. This is a replacement of the existing collection of tags.

Example:
[
"/tags/91106968-1abd-4d64-85c1-4e73d96fb997"
]

Response

Invoice resource response

@context
string
default:/contexts/Invoice
tags
object[]
@id
string<iri-reference>

Invoice IRI reference

Example:

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

@type
string
default:Invoice
id
string<uuid>

Invoice ID

Example:

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

uuid
string<uuid>

Invoice UUID (Folio fiscal)

Example:

"def404af-5eef-4112-aa99-d1ec8493b89a"

version
number | null

CFDI version

Example:

3.3

reference
string | null

It is an open field for internal identification. Communly it is used to identify a branch

Maximum length: 25
Example:

"Branch-A"

internalIdentifier
string | null

It is an open field for internal identification. Communly it is used to identify an invoice

Maximum length: 40
Example:

"00001"

type
enum<string>

Invoice type code from c_TipoDeComprobante catalog

Available options:
I,
E,
P,
N,
T
usage
string | null

Invoice usage code from c_UsoCFDI catalog

Example:

"G03"

paymentType
enum<string> | null

Payment type code from c_MetodoPago catalog

Available options:
PUE,
PPD
Example:

"PUE"

paymentMethod
string | null

Payment method code from c_FormaPago catalog

Example:

"04"

paymentTerms
enum<string> | null

Payment terms

Available options:
immediate_payment,
net_0,
net_15,
net_30,
net_45,
net_90,
net_120
Example:

"immediate_payment"

placeOfIssue
string

Postal code of the place of issue

Example:

"01210"

issuer
object
Example:
{
"rfc": "AOM920820BEA",
"name": "APPLE OPERATIONS MEXICO S.A. DE C.V.",
"taxRegime": 601,
"blacklistStatus": null
}
isIssuer
boolean

true if the invoice issuer is the taxpayer from the entity

Example:

true

receiver
object
isReceiver
boolean

true if the invoice receiver is the taxpayer from the entity

Example:

false

currency
string | null

ISO 4217 alphabetic currency code

Required string length: 3
Example:

"MXN"

discount
number

Discount amount

Example:

3324

tax
number

Tax amount

Example:

5224

subtotal
number

Subtotal amount

Example:

51349.8

creditedAmount
number | null

Credited amount

Example:

31.32

subtotalCreditedAmount
number | null

Subtotal credited amount

Example:

27

total
number

Invoice total amount

Example:

53249.8

exchangeRate
number | null

Set when currency is different than MXN (Mexican Peso).

Example:

19.8

paidAmount
number

For a deferred invoice this field state the paid amount. (Applies only for "PPD" invoices).

Example:

53249.8

dueAmount
number

For a deferred invoice this field state the due amount. (Applies only for "PPD" invoices).

Example:

0

lastPaymentDate
string<date-time> | null

This field is populated with the last related payment date (Applies only for "PPD" invoices).

fullyPaidAt
string<date-time> | null

This field is populated when the total debt is paid. (Applies only for "PPD" invoices).

paymentTermsRaw
string | null

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"

status
enum<string>

Whether the invoice is active or canceled

Available options:
VIGENTE,
CANCELADO
Example:

"VIGENTE"

pac
string

Certification provider tax ID (Proveedor Autorizado de Certificación)

Required string length: 12
Example:

"SAT970701NN3"

issuedAt
string<date-time>

Invoice issue date

Example:

"2019-01-03T21:10:40.000Z"

certifiedAt
string<date-time>

Invoice certification date

Example:

"2019-01-03T21:10:41.000Z"

cancellationStatus
enum<string>

Whether or not the invoice can be canceled

Available options:
Cancelable sin aceptación,
Cancelable con aceptación,
No cancelable
Example:

"Cancelable con aceptación"

cancellationProcessStatus
enum<string> | null

Set when the cancellation process starts

Available options:
En proceso,
Solicitud rechazada,
Cancelado sin aceptación,
Cancelado con aceptación,
Plazo vencido
Example:

"En proceso"

canceledAt
string<date-time> | null

Set when status is CANCELADO

relations
object[]
xml
boolean

true when the CFDI is available in the XML format. The file can be downloaded through the retrieve an invoice CFDI operation

pdf
boolean

true when the CFDI is available in the PDF format. The file can be downloaded through the retrieve an invoice CFDI operation

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"