FISCALISTO / API
Tags
Group issued and received invoices with your own words (a job site, an event, a customer) and filter by them.
A tag is the issuer's own word to group what goes together: a job site, an event, a customer, «Urgente». An invoice carries up to 10, and they're the same list as Etiquetas in the app, which purchase orders use too: «Obra Norte» is the same everywhere. They're Fiscalisto's own: they don't change the CFDI, its taxes, the books or what SAT sees. To split income and expenses in Reportes, an invoice goes in a single cost center; tags are several and are for finding and grouping.
Create a tag
curl https://api.fiscalisto.com/v1/tags \
-H "Authorization: Bearer $FISCALISTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Obra Norte", "color": "info" }'It answers the tag (tag_…) with purchase_orders and invoices, how many purchase orders and invoices carry it. The name doesn't repeat, regardless of case or accents: another one like it answers tag_exists and the message has its id. color is info (blue), positive (green), warning (amber), critical (red) or muted (gray); without it, it takes the next one in the list. Up to 200 per empresa.
You don't need to create them first: a new name on an invoice creates it.
Tag an invoice
Send tags to an invoice that came from SAT, issued or received. It keeps exactly the ones you send, by id (tag_…) or by name:
curl https://api.fiscalisto.com/v1/sat_invoices/sat_OufpKqnrvx9p1F \
-H "Authorization: Bearer $FISCALISTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "tags": ["Obra Norte", "Urgente"] }'It answers the invoice with its tags, each with its id, name, color and automatic. [] takes them all off. More than 10 answers parameter_invalid.
Some go on by themselves, and come with automatic: true:
- An invoice linked to a purchase order takes the order's tags, whether it arrives before or after the link.
- A rule can put them when an invoice arrives or is issued.
If you take one of those off (you leave it out of tags), it doesn't go back on by itself. If you send it again, it stays.
See the invoices with a tag
curl -G https://api.fiscalisto.com/v1/sat_invoices \
-H "Authorization: Bearer $FISCALISTO_API_KEY" \
-d tag=tag_OufpKqnrvx9p1 \
-d direction=receivedtag combines with the list's other filters (direction, date_gte, cost_center…).
Change or delete a tag
POST /v1/tags/{id} changes its name or color, and it shows that way on all its invoices and orders:
curl https://api.fiscalisto.com/v1/tags/tag_OufpKqnrvx9p1 \
-H "Authorization: Bearer $FISCALISTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "color": "positive" }'GET /v1/tags lists them, newest first. DELETE /v1/tags/{id} deletes it: it comes off its invoices and orders, which don't change in anything else, and its automatic tags are deleted. It can't be undone.
Errors
| Code | When |
|---|---|
tag_exists | There's already a tag with that name; the message has its id. |
tag_limit | The empresa has reached 200 tags. |
parameter_invalid | More than 10 on an invoice, or a tag_… that isn't the issuer's. |
resource_missing | The tag or the invoice doesn't exist, or belongs to another account. |
Was this page helpful?
Cost centers
Split an issuer's income and expenses by job site, project, branch or department: put each invoice in a cost center and filter by it.
Rules
Set cost centers, tags, stages and notices on their own: when an invoice arrives or is issued, or when a purchase order changes, if its conditions hold.