> ## Documentation Index > Fetch the complete documentation index at: https://www.bloxs.io/llms.txt > Use this file to discover all available pages before exploring further. # Get a compaction > Get an existing compaction. ## OpenAPI ````json GET /api/v1/finance/compactions { "openapi": "3.0.4", "info": { "title": "Invoices V1", "description": "Welcome to BETA version of the new Invoices API - intended for client public testing before the launch of the final version. During this BETA phase, we'll be improving the API based on specific client's feedbacks.", "version": "v1" }, "security": [ {} ], "tags": [ { "name": "Budgets" }, { "name": "Compactions" }, { "name": "ConceptPurchaseInvoices" }, { "name": "JournalPosts" }, { "name": "Journals" }, { "name": "LedgerAccounts" }, { "name": "Metadata" }, { "name": "PaymentReminders" }, { "name": "PurchaseInvoices" }, { "name": "PurchaseOrders" }, { "name": "SalesInvoices" }, { "name": "SalesInvoiceServices" } ], "paths": { "/api/v1/finance/compactions": { "get": { "tags": [ "Compactions" ], "summary": "Get a compaction", "description": "Get an existing compaction.", "operationId": "GetCompaction", "parameters": [ { "name": "code", "in": "query", "description": "The internal identifier of the model (i.e. Reference, Code, Name, depends on model).", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompactionDetail" } } } }, "404": { "description": "The requested compaction was not found." } }, "x-d360-narrative-url": "

Get a Compaction

Retrieves the full record of a single existing compaction.

A compaction is master data configured in the financial administration, identified by a code, used to group ledger accounts into a reporting hierarchy (referenced as compactionCode on Get a Ledger Account). Compactions can be nested, since each compaction can itself have a parent compaction, forming a multi-level structure.

A developer calls this endpoint to look up a compaction's details, typically to resolve a compactionCode to its name and position in that hierarchy.


Request Fields

Field

Type

Required

Description

code

string

Required

The internal identifier (code) of the compaction.


Response Fields

Field

Type

Required

Description

code

string, max 12, nullable

Optional

The internal identifier (code) of the compaction, used as compactionCode on Get a Ledger Account.

name

string, max 256, nullable

Optional

The name of the compaction.

parentCode

string, max 12, nullable

Optional

The internal identifier (code) of the parent compaction this compaction is grouped under, if any. Null if this compaction is at the top level of the hierarchy.

lastModified

string (date-time)

Optional

The date and time this compaction was last modified, formatted as ISO 8601.

" } } }, "components": { "schemas": { "CompactionDetail": { "type": "object", "properties": { "code": { "maxLength": 12, "minLength": 0, "type": "string", "nullable": true }, "name": { "maxLength": 256, "minLength": 0, "type": "string", "nullable": true }, "parentCode": { "maxLength": 12, "minLength": 0, "type": "string", "nullable": true }, "lastModified": { "type": "string", "format": "date-time" } }, "additionalProperties": false } } } } ````