> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fynapse.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fynapse.app/_mcp/server.

# List Posting Components

GET https://api.fynapse.com/api/v1/configuration/posting-components

This endpoint retrieves a page of Posting Components, each with its Posting Patterns, referenced by their `code`.
Supply `X-Change-Set` to list the Posting Components of that change set instead of the current approved configuration.

Reference: https://docs.fynapse.app/api-reference/api-reference/accounting-rules/posting-components/list-posting-components

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Request

### Query parameters

- `page` (integer, optional, default: 0) — The page to fetch. Pages are numbered from 0.
- `size` (integer, optional, default: 1000) — The maximum number of items to include in the page.

### Headers

- `X-Change-Set` (string, optional) — The `changeSetId` of an open change set. When supplied, this request reads or writes against that change set's working copy instead of the current approved accounting rules configuration - see the Change Sets operations.

## Response

### 200

OK

- `data` (list of schema.PostingComponent, required) — The Posting Components on this page.
- `page` (integer, required) — Number of the page that was returned. Pages are numbered from 0.
- `size` (integer, required) — Maximum number of Posting Components the page was allowed to hold.
- `totalPages` (integer, required) — Total number of pages available.
- `totalSize` (long, required) — Total number of Posting Components available.

## Errors

### 401 Unauthorized Error

Authentication Error

- `args` (map from string to string, required)
- `detail` (string, required)
- `errors` (list of schema.ErrorItem, required)
- `instance` (string, required)
- `path` (string, required)
- `reference` (string, required)
- `status` (integer, required)
- `timestamp` (string, required)
- `title` (string, required)
- `type` (string, required)

### 429 Too Many Requests Error

Too many requests. Rate limit exceeded.

- `args` (map from string to string, required)
- `detail` (string, required)
- `errors` (list of schema.ErrorItem, required)
- `instance` (string, required)
- `path` (string, required)
- `reference` (string, required)
- `status` (integer, required)
- `timestamp` (string, required)
- `title` (string, required)
- `type` (string, required)

### 500 Server Error

Internal Server Error

- `args` (map from string to string, required)
- `detail` (string, required)
- `errors` (list of schema.ErrorItem, required)
- `instance` (string, required)
- `path` (string, required)
- `reference` (string, required)
- `status` (integer, required)
- `timestamp` (string, required)
- `title` (string, required)
- `type` (string, required)

## Types

### schema.PostingComponent

A Posting Component and its posting patterns, referenced by its natural business key, `code`. `code` is echoed in responses and ignored in requests, where the value in the path is authoritative. `postingPatterns` is replaced wholesale on write.

- `code` (string, optional) — Posting component code - the business key. Echoed in responses and ignored in requests, where the value in the path is authoritative.
- `journalType` (string, optional) — Code of the Journal type this component posts to.
- `description` (string, optional) — Free-text description of the Posting Component.
- `accountingConfig` (string, optional) — Name of the accounting configuration this component belongs to.
- `postingPatterns` (list of schema.PostingPattern, optional) — The posting patterns of this component. Replaced wholesale on write; the component must end up with more than one pattern, including at least one debit and at least one credit.

### schema.ErrorItem

- `title` (string, required)
- `detail` (string, required)
- `type` (string, required)
- `path` (string, required)
- `args` (map from string to string, required)

### schema.PostingPattern

One leg of a Posting Component - the account it posts to, by way of an account lookup, and where the amount, currency and date come from.

- `postingCode` (string, optional) — Posting code of the account lookup this leg resolves through. Repeats across the debit and credit legs of one component.
- `amountField` (string, optional) — Business event attribute carrying the amount for this leg.
- `currencyField` (string, optional) — Business event attribute carrying the currency for this leg.
- `postingDateField` (string, optional) — Business event attribute carrying the posting date for this leg.
- `amountSignage` (enum, optional) — Whether the amount for this leg is posted as given or with its sign reversed.
  - Allowed values: `POS`, `NEG`
- `debitCredit` (enum, optional) — Whether this leg debits or credits the account.
  - Allowed values: `DR`, `CR`
- `functionalAmountField` (string, optional) — Business event attribute carrying the functional-currency amount for this leg.
- `reportingAmountFields` (map from string to string, optional) — For each reporting currency, the Business Event attribute carrying this leg's amount in that currency.

## Examples

**Response**

```json
{
  "data": [
    {
      "code": "PC_PERM",
      "journalType": "Permanent",
      "description": "Revenue recognition",
      "accountingConfig": "Default",
      "postingPatterns": [
        {
          "postingCode": "PREPAID Deferred Revenue",
          "amountField": "amount_field",
          "currencyField": "currency_field",
          "postingDateField": "date_field",
          "amountSignage": "POS",
          "debitCredit": "DR",
          "functionalAmountField": "amount_fx_field",
          "reportingAmountFields": {
            "EUR": "amount_fx_field"
          }
        }
      ]
    }
  ],
  "page": 1,
  "size": 1,
  "totalPages": 1,
  "totalSize": 1
}
```

**SDK Code**

```python
import requests

url = "https://api.fynapse.com/api/v1/configuration/posting-components"

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.fynapse.com/api/v1/configuration/posting-components';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fynapse.com/api/v1/configuration/posting-components"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.fynapse.com/api/v1/configuration/posting-components")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fynapse.com/api/v1/configuration/posting-components")
  .header("Authorization", "<token>.")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fynapse.com/api/v1/configuration/posting-components', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.fynapse.com/api/v1/configuration/posting-components");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fynapse.com/api/v1/configuration/posting-components")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```