---
title: "Posting requests | Docs | Accounting by R&D Copilot"
description: "Submit the facts of a source document once, and follow the request until its entry exists."
canonical: "https://accounting.rdcopilot.com/docs/api-reference/posting-requests/"
language: en
updated: 2026-11-22
---

# Posting requests

Submit the facts of a source document once, and follow the request until its entry exists.

## List posting requests

GET `/accounting/v1/posting-requests`

Returns the posting requests of your company in pages, newest first. Filter by `status` to find the requests that wait or were rejected.

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `status` | query | `string` | Nooptional | Only requests in this status. One of `accepted`, `posted`, `rejected` |
| `limit` | query | `integer` | Nooptional | Records per page, from 1 to 500. Default `100` Range `1` – `500` |
| `cursor` | query | `string` | Nooptional | The `nextCursor` of the previous page. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | A page of posting requests. | `PostingRequestPage` |
| `401` | The token is missing, has expired or is not ours. | `Error` |
| `403` | The token does not give access to this account or company, or `customerOrgId` or `legalCompanyId` in the body is not the one of the token. | `Error` |
| `429` | There were too many requests. Nothing was processed. The header `Retry-After` gives the seconds to wait. | `Error` |
| `503` | The service cannot answer now. | `Error` |

### Request

curl

```bash
curl "$RDC_BASE_URL/accounting/v1/posting-requests?limit=20" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/accounting/v1/posting-requests?limit=20`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/accounting/v1/posting-requests?limit=20',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/accounting/v1/posting-requests?limit=20');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/accounting/v1/posting-requests?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `200`

JSON

```json
{
  "items": [
    {
      "postingRequestId": "52330eaa-1840-49f8-895a-81219a047cf3",
      "status": "accepted",
      "sourceDocumentId": "ba5fba82-7611-4773-b950-793839664863",
      "sourceDocumentType": "supplier_invoice",
      "sourceRevision": 2,
      "effectiveDate": "2026-10-22",
      "mappingPolicyVersion": "ro-2026.1",
      "journalEntryId": null,
      "rejection": null,
      "aggregateRevision": 1
    },
    {
      "postingRequestId": "b7007a22-a9ea-4fcb-b535-e0570cdd1f2e",
      "status": "posted",
      "sourceDocumentId": "58572830-d5ca-43ff-bd1d-d7ca383d5c65",
      "sourceDocumentType": "supplier_invoice",
      "sourceRevision": 2,
      "effectiveDate": "2026-10-21",
      "mappingPolicyVersion": "ro-2026.1",
      "journalEntryId": "d75fc649-ee06-4dfb-ab83-94b5f1209aa8",
      "rejection": null,
      "aggregateRevision": 2
    },
    {
      "postingRequestId": "eefbc55a-4da9-42d9-8c56-9764421e1fff",
      "status": "rejected",
      "sourceDocumentId": "3795da47-15fc-4086-a5f5-f33e0bcd2efe",
      "sourceDocumentType": "supplier_invoice",
      "sourceRevision": 2,
      "effectiveDate": "2026-10-29",
      "mappingPolicyVersion": "ro-2026.1",
      "journalEntryId": null,
      "rejection": {
        "code": "unbalanced",
        "message": "Debit and credit of the facts differ by 0.01. Nothing was posted."
      },
      "aggregateRevision": 2
    }
  ],
  "nextCursor": null
}
```

## Submit a posting request

POST `/accounting/v1/posting-requests`

Submits the facts of a source document. The request is accepted once: the same `postingRequestId` with the same content answers the same, with different content it is a conflict. Accounting maps the facts into an entry under the `mappingPolicyVersion`; the entry waits for an approver when the company rule asks for one. A request into a locked period or under an unknown policy is refused with a 409.

### Request body

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
| `postingRequestId` | `string (uuid)` | Yesrequired | A UUID you choose for the request. The request is accepted once under this id. |
| `customerOrgId` | `string (uuid)` | Yesrequired | Your account. It must be the one of the token. |
| `legalCompanyId` | `string (uuid)` | Yesrequired | The company of your account the document belongs to. It must be the one of the token. |
| `sourceDocumentId` | `string (uuid)` | Yesrequired | The document in the product that owns it. |
| `sourceDocumentType` | `string` | Yesrequired | The kind of the source document. One of `supplier_invoice`, `customer_invoice`, `sales_day`, `bank_line`, `depreciation` |
| `sourceRevision` | `integer` | Yesrequired | The revision of the source document the facts come from. |
| `eventId` | `string (uuid)` | Yesrequired | The event of the source product that produced the document. |
| `effectiveDate` | `string (date)` | Yesrequired | The date of the entry. Its month decides the period. |
| `currency` | `string` | Yesrequired | The currency of the amounts, three capital letters. |
| `mappingPolicyVersion` | `string` | Yesrequired | The version of the mapping policy that turns the facts into an entry. |
| `correlationId` | `string (uuid)` | Yesrequired | Ties together everything that came from one request or one flow. |
| `facts` | `object[]` | Nooptional | The facts of the document: its number and date, its partner, the base and VAT of each rate, the total, and for a day of sales the payments. Amounts are decimal strings. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `202` | The change was accepted. The body is the operation result: `aggregateId` is the record that was created or changed. | `OperationResult` |
| `400` | The request cannot be read or breaks the contract: the JSON is malformed, a field is missing or unknown, a type is wrong, or a reason is empty. `fields` names each one. | `Error` |
| `401` | The token is missing, has expired or is not ours. | `Error` |
| `403` | The token does not give access to this account or company, or `customerOrgId` or `legalCompanyId` in the body is not the one of the token. | `Error` |
| `409` | `operation_reused`: This `operationId` was already used for a different request. `payload_conflict`: A posting request with this `postingRequestId` was already accepted with different content. `period_closed`: The period of the date is locked, or there is no period for it. Nothing is posted into it. `policy_conflict`: The `mappingPolicyVersion` of the request is not a policy of your company. `stale_source`: The document has a newer revision than `sourceRevision`. | `Error` |
| `429` | There were too many requests. Nothing was processed. The header `Retry-After` gives the seconds to wait. | `Error` |
| `503` | The service cannot answer now. | `Error` |

### Request

curl

```bash
curl -X POST "$RDC_BASE_URL/accounting/v1/posting-requests" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "32a34b30-2203-436d-897c-707b3c3770bd",
  "postingRequestId": "b7007a22-a9ea-4fcb-b535-e0570cdd1f2e",
  "customerOrgId": "bdbc5b26-3f8a-4c1a-8c21-6c396293da32",
  "legalCompanyId": "8373a2b0-3239-4aee-b6c8-56d7829a746d",
  "sourceDocumentId": "58572830-d5ca-43ff-bd1d-d7ca383d5c65",
  "sourceDocumentType": "supplier_invoice",
  "sourceRevision": 2,
  "eventId": "39d59497-f6f8-4a3f-bdaa-df9d722ff44f",
  "effectiveDate": "2026-10-21",
  "currency": "RON",
  "mappingPolicyVersion": "ro-2026.1",
  "correlationId": "716186ba-fb20-458d-a36a-a97717c751c7",
  "facts": [
    {
      "type": "document",
      "number": "AC-0094412",
      "date": "2026-10-21"
    },
    {
      "type": "partner",
      "name": "Ambalaje Carpatin SRL",
      "vatId": "RO51603619"
    },
    {
      "type": "amount",
      "rate": "21",
      "base": "4128.70",
      "vat": "867.03"
    },
    {
      "type": "total",
      "gross": "4995.73"
    }
  ]
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/accounting/v1/posting-requests`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "32a34b30-2203-436d-897c-707b3c3770bd",
    "postingRequestId": "b7007a22-a9ea-4fcb-b535-e0570cdd1f2e",
    "customerOrgId": "bdbc5b26-3f8a-4c1a-8c21-6c396293da32",
    "legalCompanyId": "8373a2b0-3239-4aee-b6c8-56d7829a746d",
    "sourceDocumentId": "58572830-d5ca-43ff-bd1d-d7ca383d5c65",
    "sourceDocumentType": "supplier_invoice",
    "sourceRevision": 2,
    "eventId": "39d59497-f6f8-4a3f-bdaa-df9d722ff44f",
    "effectiveDate": "2026-10-21",
    "currency": "RON",
    "mappingPolicyVersion": "ro-2026.1",
    "correlationId": "716186ba-fb20-458d-a36a-a97717c751c7",
    "facts": [
      {
        "type": "document",
        "number": "AC-0094412",
        "date": "2026-10-21"
      },
      {
        "type": "partner",
        "name": "Ambalaje Carpatin SRL",
        "vatId": "RO51603619"
      },
      {
        "type": "amount",
        "rate": "21",
        "base": "4128.70",
        "vat": "867.03"
      },
      {
        "type": "total",
        "gross": "4995.73"
      }
    ]
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/accounting/v1/posting-requests',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '32a34b30-2203-436d-897c-707b3c3770bd',
        'postingRequestId': 'b7007a22-a9ea-4fcb-b535-e0570cdd1f2e',
        'customerOrgId': 'bdbc5b26-3f8a-4c1a-8c21-6c396293da32',
        'legalCompanyId': '8373a2b0-3239-4aee-b6c8-56d7829a746d',
        'sourceDocumentId': '58572830-d5ca-43ff-bd1d-d7ca383d5c65',
        'sourceDocumentType': 'supplier_invoice',
        'sourceRevision': 2,
        'eventId': '39d59497-f6f8-4a3f-bdaa-df9d722ff44f',
        'effectiveDate': '2026-10-21',
        'currency': 'RON',
        'mappingPolicyVersion': 'ro-2026.1',
        'correlationId': '716186ba-fb20-458d-a36a-a97717c751c7',
        'facts': [
            {
                'type': 'document',
                'number': 'AC-0094412',
                'date': '2026-10-21',
            },
            {
                'type': 'partner',
                'name': 'Ambalaje Carpatin SRL',
                'vatId': 'RO51603619',
            },
            {
                'type': 'amount',
                'rate': '21',
                'base': '4128.70',
                'vat': '867.03',
            },
            {
                'type': 'total',
                'gross': '4995.73',
            },
        ],
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "32a34b30-2203-436d-897c-707b3c3770bd",
  "postingRequestId": "b7007a22-a9ea-4fcb-b535-e0570cdd1f2e",
  "customerOrgId": "bdbc5b26-3f8a-4c1a-8c21-6c396293da32",
  "legalCompanyId": "8373a2b0-3239-4aee-b6c8-56d7829a746d",
  "sourceDocumentId": "58572830-d5ca-43ff-bd1d-d7ca383d5c65",
  "sourceDocumentType": "supplier_invoice",
  "sourceRevision": 2,
  "eventId": "39d59497-f6f8-4a3f-bdaa-df9d722ff44f",
  "effectiveDate": "2026-10-21",
  "currency": "RON",
  "mappingPolicyVersion": "ro-2026.1",
  "correlationId": "716186ba-fb20-458d-a36a-a97717c751c7",
  "facts": [
    {
      "type": "document",
      "number": "AC-0094412",
      "date": "2026-10-21"
    },
    {
      "type": "partner",
      "name": "Ambalaje Carpatin SRL",
      "vatId": "RO51603619"
    },
    {
      "type": "amount",
      "rate": "21",
      "base": "4128.70",
      "vat": "867.03"
    },
    {
      "type": "total",
      "gross": "4995.73"
    }
  ]
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/accounting/v1/posting-requests');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/accounting/v1/posting-requests");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "32a34b30-2203-436d-897c-707b3c3770bd",
  "postingRequestId": "b7007a22-a9ea-4fcb-b535-e0570cdd1f2e",
  "customerOrgId": "bdbc5b26-3f8a-4c1a-8c21-6c396293da32",
  "legalCompanyId": "8373a2b0-3239-4aee-b6c8-56d7829a746d",
  "sourceDocumentId": "58572830-d5ca-43ff-bd1d-d7ca383d5c65",
  "sourceDocumentType": "supplier_invoice",
  "sourceRevision": 2,
  "eventId": "39d59497-f6f8-4a3f-bdaa-df9d722ff44f",
  "effectiveDate": "2026-10-21",
  "currency": "RON",
  "mappingPolicyVersion": "ro-2026.1",
  "correlationId": "716186ba-fb20-458d-a36a-a97717c751c7",
  "facts": [
    {
      "type": "document",
      "number": "AC-0094412",
      "date": "2026-10-21"
    },
    {
      "type": "partner",
      "name": "Ambalaje Carpatin SRL",
      "vatId": "RO51603619"
    },
    {
      "type": "amount",
      "rate": "21",
      "base": "4128.70",
      "vat": "867.03"
    },
    {
      "type": "total",
      "gross": "4995.73"
    }
  ]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "32a34b30-2203-436d-897c-707b3c3770bd",
  "status": "accepted",
  "aggregateId": "b7007a22-a9ea-4fcb-b535-e0570cdd1f2e",
  "aggregateRevision": 1
}
```

## Get a posting request

GET `/accounting/v1/posting-requests/{postingRequestId}`

Returns the state of a posting request and, once it is posted, the id of the linked entry. `accepted` means the request is in the books and waits to be posted, `rejected` means nothing was posted and `rejection` says why.

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `postingRequestId` | path | `string (uuid)` | Yesrequired | The `postingRequestId` you sent. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | The posting request at its current revision. | `PostingRequestState` |
| `401` | The token is missing, has expired or is not ours. | `Error` |
| `403` | The token does not give access to this account or company, or `customerOrgId` or `legalCompanyId` in the body is not the one of the token. | `Error` |
| `404` | No posting request with this id exists for your company. | `Error` |
| `429` | There were too many requests. Nothing was processed. The header `Retry-After` gives the seconds to wait. | `Error` |
| `503` | The service cannot answer now. | `Error` |

### Request

curl

```bash
curl "$RDC_BASE_URL/accounting/v1/posting-requests/b7007a22-a9ea-4fcb-b535-e0570cdd1f2e" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/accounting/v1/posting-requests/b7007a22-a9ea-4fcb-b535-e0570cdd1f2e`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/accounting/v1/posting-requests/b7007a22-a9ea-4fcb-b535-e0570cdd1f2e',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/accounting/v1/posting-requests/b7007a22-a9ea-4fcb-b535-e0570cdd1f2e');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/accounting/v1/posting-requests/b7007a22-a9ea-4fcb-b535-e0570cdd1f2e");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `200`

JSON

```json
{
  "postingRequestId": "b7007a22-a9ea-4fcb-b535-e0570cdd1f2e",
  "status": "posted",
  "sourceDocumentId": "58572830-d5ca-43ff-bd1d-d7ca383d5c65",
  "sourceDocumentType": "supplier_invoice",
  "sourceRevision": 2,
  "effectiveDate": "2026-10-21",
  "mappingPolicyVersion": "ro-2026.1",
  "journalEntryId": "d75fc649-ee06-4dfb-ab83-94b5f1209aa8",
  "rejection": null,
  "aggregateRevision": 2
}
```
