Tags
Tags let you categorize and segment any entity (transactions, invoices, bills, customers, vendors, etc.) by custom dimensions like department, project, or location.
Concepts
- Tag Group — A category of tags (e.g., "Department", "Project", "Location")
- Tag — A specific value within a group (e.g., "Engineering", "Q1 Launch")
- Entity Tag — The link between a tag and a specific entity
Tag Groups
Create a Tag Group
bash
curl -X POST "https://api.ondayzero.com/api/v1/tag-groups" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{"name": "Department"}'List Tag Groups
bash
curl "https://api.ondayzero.com/api/v1/tag-groups" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Tags
Create a Tag
bash
curl -X POST "https://api.ondayzero.com/api/v1/tags" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "Engineering",
"tag_group_id": "TAG_GROUP_UUID"
}'List Tags
bash
curl "https://api.ondayzero.com/api/v1/tags?tag_group_id=TAG_GROUP_UUID" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Tagging Entities
Attach a Tag
bash
curl -X POST "https://api.ondayzero.com/api/v1/entity-tags" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"tag_id": "TAG_UUID",
"model_type": "transaction",
"model_id": "ENTITY_UUID"
}'Supported Entity Types
transaction, invoice, bill, journal_entry, customer, vendor, ledger, credit_memo, product
View Tags on an Entity
bash
curl "https://api.ondayzero.com/api/v1/entity-tags/transaction/{entity_id}" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Bulk Operations
Attach or detach tags from multiple entities at once:
bash
curl -X POST "https://api.ondayzero.com/api/v1/entity-tags/bulk-attach" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"tag_id": "TAG_UUID",
"entities": [
{"model_type": "transaction", "model_id": "UUID_1"},
{"model_type": "transaction", "model_id": "UUID_2"}
]
}'Find Entities by Tag
bash
curl "https://api.ondayzero.com/api/v1/tags/{tag_id}/entities/transaction" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Tag-Based Reports
Tags power the P&L by Department report. Create a "Department" tag group, tag your transactions, and generate segmented financial reports via the Reports API.