This GET API retrieves a complete order document from the LEO Order Aggregator service using the specified documentId. The endpoint returns the order header along with its associated line items and related details as a single aggregated response object.
URL Format
https://<Instance>/leo-order-aggregator-api/api/v1/OrderAggregation/v1?documentId=<documentId>
GET https://api-leoeu.gep.com/leo-order-aggregator-api/api/v1/OrderAggregation/v1?documentId=<documentId>
This endpoint uses the GET method and does not require a request body. The documentId value must be provided as a query parameter in the request URL.
{
"exception": null,
"data": {
"...": "aggregated order document (header fields merged with the line items array)"
},
"hasData": true,
"hasException": false
}
Notes and Behavior
documentIdis a required query parameter.subtypeAppIdis a required request header with the value1e6cc0ad-5273-4e97-af3c-81f1eed2d112.If the order exists, the API returns:
{ "exception": null, "data": "<aggregated order document>", "hasData": true, "hasException": false }- If no matching order is found,
dataisnullandhasDataisfalse. - If an internal error occurs, the API returns an HTTP
500response with theexceptionobject populated, including the error message and stack trace, andhasExceptionset totrue.
Success Scenario - Request
curl --location 'https://api-leoeu.gep.com/leo-order-aggregator-api/api/v1/OrderAggregation/v1?documentId=eebfa84a-9841-4c25-897c-aceee8f24fb0' \
--header 'accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'subtypeAppId: 1e6cc0ad-5273-4e97-af3c-81f1eed2d112'
Success Scenario - Response
{
"exception": null,
"data": {
"...": "aggregated order document (header fields merged with the line items array)"
},
"hasData": true,
"hasException": false
}
Failure Scenario - Response
{
"exception": {
"message": "Object reference not set to an instance of an object.",
"stackTrace": " at Leo.order.aggregator.Service.Services.DomainModel.OrderAggregationService..."
},
"data": null,
"hasData": false,
"hasException": true
}
Request Headers |
|
|
|
|
|---|---|---|---|---|
Property | Required? | Data type | Description | Validations / Exceptions |
accept | No | String | Response media type. Use application/json. |
|
Authorization | Yes | String | Bearer token used for authentication. |
|
subtypeAppId | Yes | GUID (String) | Sub-type application identifier of the Order Aggregator module. Value: 1e6cc0ad-5273-4e97-af3c-81f1eed2d112. | Must be a valid GUID |
Query String Parameters |
|
|
|
|
|---|---|---|---|---|
Property | Required? | Data type | Description | Validations / Exceptions |
documentId | Yes | String (GUID) | Document id of the order to retrieve. | Must be a valid existing order documentId |
GetOrderByDocumentId Response | ||||
|---|---|---|---|---|
Property | Required? | Data type | Description | Validations / Exceptions |
exception |
| Object | Null on success. It contains the message and the stack trace when the call fails. |
|
data |
| Object | The aggregated order document (header fields merged with the line items). Null when no data is found. |
|
hasData |
| Boolean | True when data is present in the response. |
|
hasException |
| Boolean | True when an exception occurred during processing. |
|