This document describes the format of the body returned by Logic4 API endpoints. The response format has changed with the move to version 3 endpoints.
From V3.0 onwards, the response body of endpoints contains unformatted JSON with the following attributes:
Note that some endpoints return no body on success.
This compact JSON reduces overhead, resulting in faster response times and decreased network usage.
Endpoints from V3.0 onwards use RFC 9457 for unsuccessful repsonses. This standard describes various fields and values, the Logic4 API uses the following:
type - identifies the problem typetitle - human-readable summary of the problem typestatus - equals the status code of the HTTP responsedetail - human-readable explanation specific to this occurrence of the problemoperationId - custom field to identify the occurrenceExample response:
{
"type": "tag:api.logic4.nl,2025-08-16:InvalidRequest",
"title": "The request has invalid parameters",
"status": 400,
"detail": "Geen orderregels gevonden om uit te leveren voor OrderId 300234",
"operationId": "5e151dcea819025c0a829b0cd98f220a",
}
The type field identifies the problem type. It is intended to be parsed by a computer to identify a specific error.
The Logic4 API uses a non-dereferenceable tag URI as specified by RFC 4151. The structure is: tag:authorityName,date:specific.
The type URI is fixed for any given error and will not change within the same version of a specific endpoint. However, under some circumstances the specific error returned might change without notice according to the following policy:
tag:api.logic4.nl:2025-08-16:InvalidRequest is a generic HTTP 400 response. It may at any time be changed into a different error type with a 4XX status code.
tag:api.logic4.nl:2025-08-16:InvalidRequest.The title field is a human-readable summary of the problem type, in English. Examples:
The status field is always equal to the status code of the HTTP response.
The detail field is a human-readable explanation specific to this occurrence of the problem, in Dutch. It may help to correct the problem, for instance specifying the Id or name of a product, order customer etc. Examples:
The custom field operationId can be used by Logic4 to find the request in our logging system.
Endpoints before V3.0 differ in the following ways:
Logic4Response or Logic4ResponseList wrappers.
Value or Records fields depending on the wrapper used.ValidationMessages field is usually left empty but may contain warnings.Logic4Response or Logic4ResponseList wrappers are used, error details are provided in the ValidationMessages field and the Value or Records fields are left empty.Logic4Repsonse:
{
"Value": 1,
"ValidationMessages": []
}
Logic4ResponseList:
{
"Records": [
{
"OrderId": 3
}
],
"RecordsCounter": 1,
"ValidationMessages": []
}
Legacy endpoints optionally support formatted JSON output containing:
To request the formatted JSON output, specify X-LOGIC4-FormattedJson in the request header (without a value). Note that this is not supported in V3.0+ endpoints.
We recommend against using this option because the output is larger, resulting in longer response times and increased network usage.