Invoices
Issue the invoice of a delivered order and record payments against it.
On this page
List invoices
GET /erp/v1/invoices
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
status | query | string | Nooptional | Only invoices in this status. One of issued, partly_paid, paid |
salesOrderId | query | string (uuid) | Nooptional | Only the invoices of this sales order. |
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 invoices. | InvoicePage |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | 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
curl "$RDC_BASE_URL/erp/v1/invoices?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/erp/v1/invoices?limit=20`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/erp/v1/invoices?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/erp/v1/invoices?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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/erp/v1/invoices?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
{
"items": [
{
"id": "bdcb9002-9dfc-468d-bad1-06fa8e9bd48b",
"number": "FCT-2026-00418",
"salesOrderId": "5ebf4062-8294-45ba-b582-ae4b932bb9de",
"salesOrderNumber": "CV-1042",
"customerId": "88e177c6-55ac-4cd5-90af-70c333498d2b",
"issueDate": "2026-11-19",
"dueDate": "2026-12-19",
"net": "2818.41",
"vat": "350.01",
"total": "3168.42",
"vatBreakdown": [
{
"rate": "11",
"base": "2418.60",
"vat": "266.05"
},
{
"rate": "21",
"base": "399.81",
"vat": "83.96"
}
],
"paid": "0.00",
"balance": "3168.42",
"currency": "RON",
"status": "issued",
"payments": [],
"revision": 1
},
{
"id": "becb9195-9eff-4222-b0d4-251493af0888",
"number": "FCT-2026-00417",
"salesOrderId": "5dbf3ecf-8391-4d4f-ad7f-73939b1236a6",
"salesOrderNumber": "CV-1041",
"customerId": "fb5a17a6-4534-43fd-aa84-0db4e3035003",
"issueDate": "2026-11-13",
"dueDate": "2026-12-13",
"net": "300.35",
"vat": "63.07",
"total": "363.42",
"vatBreakdown": [
{
"rate": "21",
"base": "300.35",
"vat": "63.07"
}
],
"paid": "363.42",
"balance": "0.00",
"currency": "RON",
"status": "paid",
"payments": [
{
"paidOn": "2026-11-20",
"amount": "363.42"
}
],
"revision": 2
}
],
"nextCursor": null
} Create an invoice
POST /erp/v1/invoices
Issues the invoice of a delivered order, with the order’s lines, VAT by rate and total. The invoice takes the next invoice number and the due date follows the payment terms of the customer.
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
salesOrderId | string (uuid) | Yesrequired | The delivered order to invoice. |
expectedRevision | integer | Yesrequired | The revision of the order you read. |
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 |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The sales order does not exist. | Error |
409 | operation_reused: The operationId was used before with a different request. revision_conflict: The record has changed since the revision you sent as expectedRevision. wrong_status: The record is not in a status that allows this change. | 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
curl -X POST "$RDC_BASE_URL/erp/v1/invoices" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "9c3d84db-dea0-40c0-aa8c-1c01f68536c9",
"salesOrderId": "74bf6304-7842-41e8-9928-f4420004d89c",
"expectedRevision": 4
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/erp/v1/invoices`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "9c3d84db-dea0-40c0-aa8c-1c01f68536c9",
"salesOrderId": "74bf6304-7842-41e8-9928-f4420004d89c",
"expectedRevision": 4
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/erp/v1/invoices',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '9c3d84db-dea0-40c0-aa8c-1c01f68536c9',
'salesOrderId': '74bf6304-7842-41e8-9928-f4420004d89c',
'expectedRevision': 4,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "9c3d84db-dea0-40c0-aa8c-1c01f68536c9",
"salesOrderId": "74bf6304-7842-41e8-9928-f4420004d89c",
"expectedRevision": 4
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/erp/v1/invoices');
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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/erp/v1/invoices");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "9c3d84db-dea0-40c0-aa8c-1c01f68536c9",
"salesOrderId": "74bf6304-7842-41e8-9928-f4420004d89c",
"expectedRevision": 4
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "9c3d84db-dea0-40c0-aa8c-1c01f68536c9",
"status": "accepted",
"aggregateId": "b0cb7b8b-9dec-448d-8cd1-23989708e6ec",
"aggregateRevision": 1
} Get an invoice
GET /erp/v1/invoices/{invoiceId}
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
invoiceId | path | string (uuid) | Yesrequired | The invoice. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | The invoice with its payments and balance. | Invoice |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The invoice does not exist. | 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
curl "$RDC_BASE_URL/erp/v1/invoices/bdcb9002-9dfc-468d-bad1-06fa8e9bd48b" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/erp/v1/invoices/bdcb9002-9dfc-468d-bad1-06fa8e9bd48b`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/erp/v1/invoices/bdcb9002-9dfc-468d-bad1-06fa8e9bd48b',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/erp/v1/invoices/bdcb9002-9dfc-468d-bad1-06fa8e9bd48b');
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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/erp/v1/invoices/bdcb9002-9dfc-468d-bad1-06fa8e9bd48b");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"id": "bdcb9002-9dfc-468d-bad1-06fa8e9bd48b",
"number": "FCT-2026-00418",
"salesOrderId": "5ebf4062-8294-45ba-b582-ae4b932bb9de",
"salesOrderNumber": "CV-1042",
"customerId": "88e177c6-55ac-4cd5-90af-70c333498d2b",
"issueDate": "2026-11-19",
"dueDate": "2026-12-19",
"net": "2818.41",
"vat": "350.01",
"total": "3168.42",
"vatBreakdown": [
{
"rate": "11",
"base": "2418.60",
"vat": "266.05"
},
{
"rate": "21",
"base": "399.81",
"vat": "83.96"
}
],
"paid": "0.00",
"balance": "3168.42",
"currency": "RON",
"status": "issued",
"payments": [],
"revision": 1
} Record a payment on an invoice
POST /erp/v1/invoices/{invoiceId}/payments
Records an amount received. A part leaves the invoice partly_paid with a smaller balance; the amount that brings the balance to zero makes it paid and the order paid.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
invoiceId | path | string (uuid) | Yesrequired | The invoice. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the invoice you read. |
amount | string | Yesrequired | The amount received, above zero and at most the balance. |
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 |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The invoice does not exist. | Error |
409 | operation_reused: The operationId was used before with a different request. revision_conflict: The record has changed since the revision you sent as expectedRevision. wrong_status: The record is not in a status that allows this change. amount_exceeds_balance: The payment is more than the balance of the invoice. | Error |
422 | The amount is not a positive amount. | 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
curl -X POST "$RDC_BASE_URL/erp/v1/invoices/b0cb7b8b-9dec-448d-8cd1-23989708e6ec/payments" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "d5b89ed8-042f-4ede-aa49-be4df91b3308",
"expectedRevision": 1,
"amount": "100.00"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/erp/v1/invoices/b0cb7b8b-9dec-448d-8cd1-23989708e6ec/payments`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "d5b89ed8-042f-4ede-aa49-be4df91b3308",
"expectedRevision": 1,
"amount": "100.00"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/erp/v1/invoices/b0cb7b8b-9dec-448d-8cd1-23989708e6ec/payments',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'd5b89ed8-042f-4ede-aa49-be4df91b3308',
'expectedRevision': 1,
'amount': '100.00',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "d5b89ed8-042f-4ede-aa49-be4df91b3308",
"expectedRevision": 1,
"amount": "100.00"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/erp/v1/invoices/b0cb7b8b-9dec-448d-8cd1-23989708e6ec/payments');
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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/erp/v1/invoices/b0cb7b8b-9dec-448d-8cd1-23989708e6ec/payments");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "d5b89ed8-042f-4ede-aa49-be4df91b3308",
"expectedRevision": 1,
"amount": "100.00"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "d5b89ed8-042f-4ede-aa49-be4df91b3308",
"status": "accepted",
"aggregateId": "b0cb7b8b-9dec-448d-8cd1-23989708e6ec",
"aggregateRevision": 2
}