/credit-record-invoicesCreates a credit record on a total balance (shared wallet) and, in the same operation, creates a linked customer invoice in the finance layer. The balance’s billing type decides whether you get a prepaid top-up or a postpaid part payment credit row, and how the invoice is submitted (including optional payment data).
Privileges (one of the following based on the deployment type):
- bulk-billing-cust-topup.manage
- bulk-billing-supplier-topup.manage
- bulk-billing-cust-mnp-topup.manage
- bulk-billing-supplier-mnp-topup.manage
Audit event:
- credit.record.invoice.add
Errors:
- 30 - Total Balance with given id not found
- JSON_DECODING_ERROR - Unable to decode request body
- NOT_AUTHENTICATED - Not authenticated
- NOT_AUTHORIZED - Not authorized
- INT_APP_ERROR - Unexpected internal error
- NOT_PLATFORM_OWNER - Not authorized - not platform owner
- INVALID-DATA - Input data validation failed
Error items:
- invalid value - Total Balance with given id not found
- invalid total balance - Cannot add credit to total balance with 'draft', 'inactive' or 'deleted' status
- invalid value - Float value greater than 0 is expected
- invalid value - Comment cannot be longer than 200 characters
- invalid value - Payment type can not be 0
- invalid value - Payment type must be in (1,2,3,4)
- invalid value - Bank account with given id not found
- invalid value - Bank account currency and total balance currency do not match
- BILLING_INV_UID_TOO_LONG - invUid cannot be longer than 40 characters
- BILLING_INV_UID_INVALID - invUid must be a valid UUID
- BILLING_INV_UID_ALREADY_EXISTS - Invoice with given invUid already exists
Request
Body required
Monetary amount; must be strictly greater than zero.
Total balance (wallet) id that will receive the credit row and own the invoice link.
Optional comment stored on the credit record (max 200 Unicode characters).
Optional invoice UID. When omitted or empty, sit-api generates a UUID automatically.
When provided, must be a valid UUID (max 40 characters) and must not already exist in finance invoices.
Validation error codes: BILLING_INV_UID_TOO_LONG, BILLING_INV_UID_INVALID, BILLING_INV_UID_ALREADY_EXISTS.
40Optional payment hints sent with POST /credit-record-invoices. When fullyPaid is true, paymentType is validated and bankAccountId may be resolved against platform-owner bank accounts for the balance owner and currency.
Show child attributes
Platform-owner bank account id for bank transfer (paymentType 1). 0 means “unspecified”; for fullyPaid true and type 1, the server may fill the default account for the balance currency when one exists.
When true, paymentType must be 1–4 (not 0). Drives whether a full payment is posted (postpaid) or how finance receives payment data (prepaid).
Payment instrument code used by the finance layer:
- 1 — bank transfer
- 2 — credit card
- 3 — PayPal
- 4 — cash
Request example
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <access_token>");
var content = new StringContent("{\"amount\":100.5,\"balanceId\":11,\"comment\":\"Wire transfer received\"}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer <access_token>");
var body = "{\"amount\":100.5,\"balanceId\":11,\"comment\":\"Wire transfer received\"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);curl -L -X POST "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <access_token>" \
--data-raw '{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}'var headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
};
var data = json.encode({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
});
var dio = Dio();
var response = await dio.request(
'https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices',
options: Options(
method: 'POST',
headers: headers,
),
data: data,
);
if (response.statusCode == 200) {
print(json.encode(response.data));
}
else {
print(response.statusMessage);
}var headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
};
var request = http.Request('POST', Uri.parse('https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices'));
request.body = json.encode({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices"
method := "POST"
payload := strings.NewReader(`{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <access_token>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}POST /bulk/billing/v2/credit-record-invoices HTTP/1.1
Host: api-cpaas.sms.es
Content-Type: application/json
Accept: application/json
Authorization: Bearer <access_token>
Content-Length: 66
{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"amount\":100.5,\"balanceId\":11,\"comment\":\"Wire transfer received\"}");
Request request = new Request.Builder()
.url("https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer <access_token>")
.build();
Response response = client.newCall(request).execute();Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("Authorization", "Bearer <access_token>")
.body("{\"amount\":100.5,\"balanceId\":11,\"comment\":\"Wire transfer received\"}")
.asString();const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer <access_token>");
const raw = JSON.stringify({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));var settings = {
"url": "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
},
"data": JSON.stringify({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
})
};
$.ajax(settings).done(function (response) {
console.log(response);
});var data = JSON.stringify({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer <access_token>");
xhr.send(data);val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = """
{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}
""".trimIndent().toRequestBody(mediaType)
val request = Request.Builder()
.url("https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer <access_token>")
.build()
val response = client.newCall(request).execute()#include <stdio.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
headers = curl_slist_append(headers, "Accept: application/json");
headers = curl_slist_append(headers, "Authorization: Bearer <access_token>");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
const char *data = "{\"amount\":100.5,\"balanceId\":11,\"comment\":\"Wire transfer received\"}";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
CURLcode res = curl_easy_perform(curl);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}const axios = require('axios');
let data = JSON.stringify({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});const https = require('follow-redirects').https;
const fs = require('fs');
let options = {
'method': 'POST',
'hostname': 'api-cpaas.sms.es',
'path': '/bulk/billing/v2/credit-record-invoices',
'headers': {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
},
'maxRedirects': 20
};
const req = https.request(options, function (res) {
let chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
let body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
let postData = JSON.stringify({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
});
req.write(postData);
req.end();#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"Content-Type": @"application/json",
@"Accept": @"application/json",
@"Authorization": @"Bearer <access_token>"
};
[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\"amount\":100.5,\"balanceId\":11,\"comment\":\"Wire transfer received\"}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);open Lwt
open Cohttp
open Cohttp_lwt_unix
let postData = ref {|{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}|};;
let reqBody =
let uri = Uri.of_string "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices" in
let headers = Header.init ()
|> fun h -> Header.add h "Content-Type" "application/json"
|> fun h -> Header.add h "Accept" "application/json"
|> fun h -> Header.add h "Authorization" "Bearer <access_token>"
in
let body = Cohttp_lwt.Body.of_string !postData in
Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body
let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer <access_token>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
<?php
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer <access_token>'
];
$body = '{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}';
$request = new Request('POST', 'https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("Accept", "application/json")
$headers.Add("Authorization", "Bearer <access_token>")
$body = @"
{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}
"@
$response = Invoke-RestMethod "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices" -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Jsonimport requests
import json
url = "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices"
payload = json.dumps({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
})
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)import http.client
import json
conn = http.client.HTTPSConnection("api-cpaas.sms.es")
payload = json.dumps({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
})
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
}
conn.request("POST", "/bulk/billing/v2/credit-record-invoices", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))library(httr)
headers = c(
'Content-Type' = 'application/json',
'Accept' = 'application/json',
'Authorization' = 'Bearer <access_token>'
)
body = '{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}';
res <- VERB("POST", url = "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices", body = body, add_headers(headers))
cat(content(res, 'text'))require "uri"
require "json"
require "net/http"
url = URI("https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Bearer <access_token>"
request.body = JSON.dump({
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
})
response = https.request(request)
puts response.read_body
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::builder()
.build()?;
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("Content-Type", "application/json".parse()?);
headers.insert("Accept", "application/json".parse()?);
headers.insert("Authorization", "Bearer <access_token>".parse()?);
let data = r#"{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}"#;
let json: serde_json::Value = serde_json::from_str(&data)?;
let request = client.request(reqwest::Method::from_bytes(b"POST")?, "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices")
.headers(headers)
.json(&json);
let response = request.send().await?;
let body = response.text().await?;
println!("{}", body);
Ok(())
}printf '{"amount":100.5,"balanceId":11,"comment":"Wire transfer received"}' | http --follow --timeout 3600 POST "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices" \
'Content-Type':'application/json' \
'Accept':'application/json' \
'Authorization':'Bearer <access_token>'wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <access_token>' \
--body-data '{"amount":100.5,"balanceId":11,"comment":"Wire transfer received"}' \
'https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices'let parameters = """
{
"amount": 100.5,
"balanceId": 11,
"comment": "Wire transfer received"
}
"""
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api-cpaas.sms.es/bulk/billing/v2/credit-record-invoices")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("application/json", forHTTPHeaderField: "Accept")
request.addValue("Bearer <access_token>", forHTTPHeaderField: "Authorization")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()Responses
- 201
- 400
- 401
- 404
- 500
Created — one object that contains credit record fields and nested invoice object when the finance service returns invoice data.
The nested invoice includes invUid (from the request when provided, otherwise auto-generated by sit-api).
Business date of the credit record.
Aggregate range start date when this row represents an aggregate record.
Total amount of the credit record.
Total balance / wallet id this credit record belongs to.
Human-readable total-balance name.
Linked billing-record id when one exists.
Billing type resolved from the credit record type metadata.
Business partner id resolved for this credit record.
Optional free-text comment stored on the credit record.
Conditional amount tracked on the credit record.
Whether the linked credit-record type is configured to create invoices.
yes, noDate derived from the stored credit-record history timestamp.
Portion still allowed as usable credit according to the credit workflow.
Stable public identifier of the credit record.
Numeric currency id.
Linked invoice id when one is set.
Aggregate-record flag as stored by billing.
Ordering workflow status stored on the credit record.
off, available, in-use, usedWhen the current ordering status was stored.
Amount already paid against this credit record.
Price list id stored on the credit record when selection logic applies.
Workflow status of the credit record. Rows in deleted status are not returned by the list endpoint.
Stable code name of the credit record type.
Credit record type id.
Human-readable credit record type name.
Remaining unpaid amount.
Nested invoice object returned after a successful credit-record-with-invoice create. It combines invoice header fields from the finance (SIT) customer invoice API with an items array of line items when the service returns them.
Many additional header fields (customer address, VAT, owner display names, delivery status, and so on) exist in real responses; they are allowed as extra properties so this schema stays open without listing every finance field.
Show child attributes
Finance invoice id (matches invoiceId on the credit record when linked).
Invoice UID. Equals the optional request invUid when the client provided one; otherwise the UUID generated by sit-api on create.
40Invoice line items (items in JSON).
{
"activationDate": "2026-04-01",
"aggregateFromDate": "0001-01-01",
"amount": 100.5,
"balanceId": 11,
"balanceName": "Main wallet",
"billingRecordId": 0,
"billingType": 1,
"bizPartnerId": 5001,
"bizPartnerName": "Customer A",
"bizPartnerShortName": "CustA",
"comment": "Wire transfer received",
"conditionalAmount": 0,
"createInvoice": "yes",
"creationDate": "2026-04-01",
"creditAmount": 0,
"creditUid": "f06a4e6f-4b0a-4f97-9c9c-6b2ce4a5bb73",
"currency": 978,
"currencyCode": "EUR",
"currencyName": "Euro",
"id": 1205,
"invoice": {
"classCodeName": "CUSTOMER_INVOICE",
"currency": 978,
"currencyCode": "EUR",
"domainCodeName": "BULK",
"id": 91001,
"invDate": "2026-04-01",
"invDueDate": "2026-04-01",
"invNumber": null,
"invUid": "f06a4e6f-4b0a-4f97-9c9c-6b2ce4a5bb73",
"items": [
{
"id": 1,
"invoiceId": 91001,
"name": "Top-up credit",
"ordNum": 1,
"price": 100.5,
"quantity": 1,
"totalNoVat": 100.5,
"totalVat": 0
}
],
"paymentStatus": "unpaid",
"status": "approved",
"total": 100.5,
"totalPaid": 0,
"totalUnpaid": 100.5
},
"invoiceId": 91001,
"isAggregateRecord": "no",
"orderingStatus": "off",
"orderingStatusDt": "2026-04-01T12:00:00Z",
"ownerBpBriefName": "Owner",
"ownerBpName": "Owner Ltd",
"ownerId": 7001,
"paidAmount": 0,
"selectedPriceListId": 0,
"status": "active",
"type": "topup",
"typeId": 1,
"typeName": "Top-up",
"unpaidAmount": 0
}Invalid JSON or failed validation
Show child attributes
Stable code for branching in the UI (e.g. INVALID-DATA, NOT_AUTHORIZED).
Present for INVALID-DATA (request validation) — list of per-field problems (ErrorItem).
Show child attributes
Full sentence for users or test assertions.
Short type such as invalid value, not allowed, or change conflict.
Request field that failed (e.g. totalBalanceId) — match to your form/input.
Optional nested context
Short summary — show in toasts or logs.
{
"error": {
"code": "JSON_DECODING_ERROR",
"message": "Unable to decode request body"
}
}Not authenticated, not platform owner, or not authorized
Show child attributes
Stable code for branching in the UI (e.g. INVALID-DATA, NOT_AUTHORIZED).
Present for INVALID-DATA (request validation) — list of per-field problems (ErrorItem).
Show child attributes
Full sentence for users or test assertions.
Short type such as invalid value, not allowed, or change conflict.
Request field that failed (e.g. totalBalanceId) — match to your form/input.
Optional nested context
Short summary — show in toasts or logs.
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}Total balance not found
Show child attributes
Stable code for branching in the UI (e.g. INVALID-DATA, NOT_AUTHORIZED).
Present for INVALID-DATA (request validation) — list of per-field problems (ErrorItem).
Show child attributes
Full sentence for users or test assertions.
Short type such as invalid value, not allowed, or change conflict.
Request field that failed (e.g. totalBalanceId) — match to your form/input.
Optional nested context
Short summary — show in toasts or logs.
{
"error": {
"code": "30",
"message": "Total Balance with given id not found"
}
}Unexpected internal error
Show child attributes
Stable code for branching in the UI (e.g. INVALID-DATA, NOT_AUTHORIZED).
Present for INVALID-DATA (request validation) — list of per-field problems (ErrorItem).
Show child attributes
Full sentence for users or test assertions.
Short type such as invalid value, not allowed, or change conflict.
Request field that failed (e.g. totalBalanceId) — match to your form/input.
Optional nested context
Short summary — show in toasts or logs.
{
"error": {
"code": "INT_APP_ERROR",
"message": "Unexpected internal error"
}
}