Skip to main content

Get POS Order Notifications

Endpoint Overview​

This API endpoint retrieves the external RSD notifications/sync status recorded for a specific POS order, within the RSD module of the Juleb ERP.

This endpoint proxies the external RSD system

This endpoint forwards the request to an external RSD service and returns its response as-is — an empty array [] if there are no notifications yet for that order, otherwise one or more result groups (see Response Body below).

Endpoint Details​

  • Method: GET
  • URL: /api/v1/rsd/notifications/pos-order/{orderId}

Parameters​

  • Path Parameters:
    • orderId (string, required): The ID of the POS order (see POS Order) to check.
  • Query Parameters: None

Response​

  • 200 OK: Successfully retrieved the notifications (or an empty array if none exist yet).
  • 401 Unauthorized: Unauthorized.

Response Body​

An array of result groups returned as-is by the external RSD system. A single order's lines are often split into several groups (one per resultCode), so you may see multiple entries sharing the same notificationId.

[
{
"notificationId": string,
"gln": string | null,
"resultCode": string,
"successCount": integer,
"failedCount": integer,
"warningCount": integer,
"batches": [
{
"batch": string,
"gtin": string,
"quantity": integer,
"expiry": string
}
],
"englishResult": string,
"arabicResult": string
}
]
resultCode: "00000" means success

A resultCode of "00000" means that group of batches was processed successfully by RSD. Any other code (e.g. "10201", "11043") indicates an error or warning for that group — see englishResult/arabicResult for the reason, and the related batches may need to be corrected and resubmitted.

Field Reference​

FieldTypeDescription
notificationIdstringThe RSD notification/submission ID this result group belongs to.
glnstring | nullGlobal Location Number of the facility, if applicable.
resultCodestringRSD result code for this group. "00000" = success; any other value is an error/warning.
successCountintegerNumber of batch entries that succeeded for this result code.
failedCountintegerNumber of batch entries that failed for this result code.
warningCountintegerNumber of batch entries that completed with warnings for this result code.
batchesarrayThe batch/lot entries this result applies to.
batches[].batchstringBatch/lot number.
batches[].gtinstringGS1 GTIN of the product.
batches[].quantityintegerQuantity submitted for this batch.
batches[].expirystringExpiry date (YYYY-MM-DD).
englishResultstringHuman-readable result/error message in English.
arabicResultstringHuman-readable result/error message in Arabic.

Example​

Request​

const axios = require('axios');
const accountName = process.env.ACCOUNT_NAME;
const apiKey = process.env.API_KEY;

axios.get(`https://${accountName}.juleb.com/api/v1/rsd/notifications/pos-order/7155`, {
headers: {
'accept': '*/*',
'Authorization': `TOKEN`
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

If there are no notifications yet for this order, RSD returns an empty array:

[]

Once the order has been processed by RSD, you'll get one or more result groups (see the Field Reference above):

[
{
"notificationId": string,
"gln": string | null,
"resultCode": "00000",
"successCount": integer,
"failedCount": 0,
"warningCount": integer,
"batches": [
{
"batch": string,
"gtin": string,
"quantity": integer,
"expiry": string
}
],
"englishResult": "The operation performed on the product is successful.",
"arabicResult": ".العملية التي تم تنفيذها على المنتج ناجحة"
}
]