Skip to content

Line Item Tags — Proposed Guide

Planned API — Reference Only

Line Item Tags: Line-level tags would support allocation of a multi-item expense across projects or cost centers. A record-level tag cannot always explain…

Overview

Line-level tags would support allocation of a multi-item expense across projects or cost centers. A record-level tag cannot always explain each individual allocation.

Key concepts

Associate tags with line ids and validate that allocated amounts sum to the documented expense amount.

Implementation considerations

Preserve currency precision and rounding adjustments explicitly. Avoid assigning the full expense amount to every tagged line.

Illustrative data model

This local fixture shows a possible representation for the concepts above. It is not an endpoint response, production configuration or a claim that the described capability is implemented.

JSON fixture
Fictional concept fixture
{
  "reference_only": true,
  "topic": "Line Item Tags",
  "line_item_id": "line_item_example_123",
  "expense_id": "exp_example_123",
  "tag_ids": [
    "tag_example_123"
  ],
  "amount_minor": 12550
}

Design review checklist

  • Document which organization owns the line item tags representation and which actor may view or change it.
  • Test the boundaries of line item id, expense id, tag ids, amount minor using synthetic values, including missing or inconsistent references.
  • Before future implementation, obtain an approved contract and review failure behavior. This documentation does not authorize production activation.

Proposed data types

Illustrative field dictionary
NameTypeDescription
line_item_idstringStable fictional line item reference; not a secret and not evidence that a resource exists.
expense_idstringStable fictional expense reference; not a secret and not evidence that a resource exists.
tag_idsarray<string>Fictional tag references; validate ownership and avoid duplicate membership.
amount_minorintegerMonetary amount in the documented currency minor unit; 12550 represents USD 125.50, not USD 12,550.