Saltar al contenido

List posting line rows

Módulo Finance

GET/posting-linespostingLines.list

A Universal Posting Line (Bible tab 36): the one export shape, projected to every accounting platform. Returns a cursor page of posting line rows the caller may see. Coded list: the default order is numeric code order by `account_code`, then `urid`. Supports sparse fieldsets and the filter grammar.

  • Requiere la capacidad finance.journal.read.
  • Alcances de OAuth: finance.
  • Paginación por cursor: se aplican limit, cursor, fields, sort y filter.
  • Estados de error: 400, 401, 429. Los errores son detalles de problema RFC 9457.

Parámetros de ruta y de consulta

postingLines.list: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
limitLimitNoPage size. Default 50, maximum 200.Restricciones: range 1 to 200
cursorCursorNoOpaque cursor from `next_cursor` of the previous page.Restricciones: length 1 to any
fieldsFieldsNoSparse fieldset: a comma-separated list of top-level fields to return. `id` is always returned.Restricciones: pattern ^[a-z_][a-z0-9_]*(,[a-z_][a-z0-9_]*)*$
sortSortNoSort keys, comma-separated; a leading `-` sorts descending. Without `sort`, the documented default order applies (coded lists sort in numeric code order).Restricciones: pattern ^-?[a-z_][a-z0-9_]*(,-?[a-z_][a-z0-9_]*)*$
filterFilterNoFilter grammar `filter[field][op]=value`. Operators: eq, ne, lt, lte, gt, gte, in (comma-separated values), is_null (true or false) and contains. Conditions combine with AND.

Respuesta 200: una página de PostingLine

postingLines.list: PostingLine
CampoTipoObligatorioDescripción
org_idstring (uuid)SíIdentifier of the owning organization, derived from the parent row and never accepted from the caller.
datestring (date)SíDate the cost or revenue is recognized.
account_codeGlAccountCodeSíGL account code from the fixed chart in `xpms.dim_gl_account` (Section 3.11).Restricciones: pattern ^[0-9]{4}$
cost_center_idCostCenterCode | nullSí
uridUridAtAnyGrain | nullSí
vendor_idstring (uuid) | nullSíIdentifier of the vendor organization; null for revenue.
item_idItemIdSíCatalog item identifier `{URID}-{ORG}-{SEQ}` (Section 3.6).Restricciones: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}-[A-Z0-9]+-[0-9]+$
descriptionstringSíSentence-case line description.Restricciones: length 1 to 300
quantitynumber | nullSíQuantity.
unit_basisUnitCodeSíUnit basis from the controlled unit list in `xpms.dim_unit_alias`.Restricciones: pattern ^[a-z][a-z0-9_-]*$
amount_minorinteger (int64) | nullSíSigned amount; negative for credits. Integer minor units of the resource currency; null means unpriced, never zero.
tax_typeTaxTypeSíTax type from the Universal Posting Line specification (Bible tab 36).Restricciones: pattern ^[A-Z0-9][A-Za-z0-9&'/.()-]*( [A-Za-z0-9&'/.()-]+)*$
currencystringSíISO 4217 currency code of every money field.Restricciones: pattern ^[A-Z]{3}$
external_refstring | nullSíInvoice, card transaction or record identifier.Restricciones: length 1 to 300
line_stateSharedStateSíA value from the shared finance and commercial state vocabulary (Bible tab 37): the five core states plus declared domain extensions.Restricciones: pattern ^[A-Z0-9][A-Za-z0-9&'/.()-]*( [A-Za-z0-9&'/.()-]+)*$
posting_line_idstring (uuid)SíIdentifier of the posting line.
project_idstring (uuid) | nullSíIdentifier of the project.
{
  "data": [
    {
      "org_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "date": "2026-10-08",
      "account_code": "5000",
      "cost_center_id": "CC-VENUE",
      "urid": "0000.01",
      "vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "item_id": "4000.01.01-XPMS-001",
      "description": "Stage deck rental for opening weekend.",
      "quantity": 24,
      "unit_basis": "each",
      "amount_minor": 108000,
      "tax_type": "Tax on Purchases",
      "currency": "USD",
      "external_ref": "INV-2026-0042",
      "line_state": "Committed",
      "posting_line_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
    },
    {
      "org_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "date": "2026-10-08",
      "account_code": "5400",
      "cost_center_id": "CC-VENUE",
      "urid": "4000.01",
      "vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "item_id": "4000.01.01-XPMS-001",
      "description": "Stage deck rental for opening weekend.",
      "quantity": 24,
      "unit_basis": "each",
      "amount_minor": 108000,
      "tax_type": "Tax on Purchases",
      "currency": "USD",
      "external_ref": "INV-2026-0042",
      "line_state": "Committed",
      "posting_line_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
    }
  ],
  "next_cursor": null
}

Ejemplos de código

curl -X GET "$XOS_BASE_URL/posting-lines" \
  -H "Authorization: Bearer $XOS_API_KEY"
for await (const row of xos.postingLines.listAll()) {
  console.log(row);
}
for row in xos.posting_lines.list_all():
    print(row)
xos posting-lines list --all