> ## 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 compactions filtered and paged > Get a paged list of existing compactions, optionally filtered to the given parameters. ## OpenAPI ````json POST /api/v1/finance/compactions/filter { "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/filter": { "post": { "tags": [ "Compactions" ], "summary": "Get compactions filtered and paged", "description": "Get a paged list of existing compactions, optionally filtered to the given parameters.", "operationId": "GetCompactionsFilteredPaged", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompactionSearchRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompactionSearchResult" } } } } }, "x-d360-narrative-url": "

Get Compactions Filtered and Paged (POST)

Retrieves a paged, optionally filtered list of existing compactions.

A developer calls this endpoint to search for compactions matching one or more criteria (for example by code or name), or to retrieve the full set of compactions in manageable pages when no filter is needed, such as building the full reporting hierarchy that ledger accounts are grouped into.


Request Fields

Field

Type

Required

Description

paging.pageSize

integer, 1 to 1000, nullable

Optional

The maximum number of results to return per page. Defaults to 100 when not given.

paging.pageNumber

integer, 1 to 9999, nullable

Optional

The page number to retrieve.

sorting.columnName

string, nullable

Optional

The data field to sort results by.

sorting.order

integer (enum), nullable

Optional

The sort direction applied to columnName. Allowed values: 0 = Ascending, 1 = Descending.

filter.code

string, nullable

Optional

Filters on the compaction's internal identifier (code).

filter.name

string, nullable

Optional

Filters on the compaction's name.

filter.lastModified.from

string (date-time), nullable

Optional

Inclusive lower bound for filtering on when the compaction was last modified, formatted as ISO 8601. If omitted, there is no lower bound.

filter.lastModified.to

string (date-time), nullable

Optional

Inclusive upper bound for filtering on when the compaction was last modified, formatted as ISO 8601. If omitted, there is no upper bound.


Response Fields

Field

Type

Required

Description

paging.pageSize

integer, 1 to 1000, nullable

Optional

The page size used to produce this result set.

paging.pageNumber

integer, 1 to 9999, nullable

Optional

The page number returned in this result set.

sorting.columnName

string, nullable

Optional

The field the results are sorted by.

sorting.order

integer (enum), nullable

Optional

The sort direction applied. Allowed values: 0 = Ascending, 1 = Descending.

compactions

array of objects, nullable

Optional

The list of compactions matching the filter for this page. See sub-fields below.

compactions.code

string, nullable

Optional

The internal identifier (code) of the compaction.

compactions.name

string, nullable

Optional

The name of the compaction.

compactions.lastModified

string (date-time)

Optional

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

" } } }, "components": { "schemas": { "CompactionSearchRequest": { "type": "object", "properties": { "paging": { "$ref": "#/components/schemas/PagingInfo" }, "sorting": { "$ref": "#/components/schemas/SortingInfo" }, "filter": { "$ref": "#/components/schemas/CompactionSearchRequestFilter" } }, "additionalProperties": false }, "CompactionSearchResult": { "type": "object", "properties": { "paging": { "$ref": "#/components/schemas/PagingInfo" }, "sorting": { "$ref": "#/components/schemas/SortingInfo" }, "compactions": { "type": "array", "items": { "$ref": "#/components/schemas/CompactionSearchResultFilter" }, "nullable": true } }, "additionalProperties": false }, "PagingInfo": { "type": "object", "properties": { "pageSize": { "maximum": 1000, "minimum": 1, "type": "integer", "format": "int32", "nullable": true }, "pageNumber": { "maximum": 9999, "minimum": 1, "type": "integer", "format": "int32", "nullable": true } }, "additionalProperties": false }, "SortingInfo": { "type": "object", "properties": { "columnName": { "type": "string", "nullable": true }, "order": { "type": "integer", "description": "Ascending = 0\nDescending = 1", "format": "int32", "x-enumNames": [ "Ascending", "Descending" ] } }, "additionalProperties": false }, "CompactionSearchRequestFilter": { "type": "object", "properties": { "code": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "lastModified": { "$ref": "#/components/schemas/CompareFilterModelDateTime" } }, "additionalProperties": false }, "CompactionSearchResultFilter": { "type": "object", "properties": { "code": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "lastModified": { "type": "string", "format": "date-time" } }, "additionalProperties": false }, "CompareFilterModelDateTime": { "type": "object", "properties": { "from": { "type": "string", "format": "date-time", "nullable": true }, "to": { "type": "string", "format": "date-time", "nullable": true } }, "additionalProperties": false } } } } ````