Notification samples
Sample methods
A few methods exist in the API just to be used as examples. Anyone trying to build urls in order to subscribe to Retail ops notifications may take these samples as models.
No validation is made by the methods below. The returned results are just hardcoded structures.
"contact.details" sample
Response to be implemented when subscribing the "contact.details" notification (aka "Customer detail").
Method
| POST | /api/externals/v1/notification/test/sync/contact/onDetail |
|---|
Arguments
- notification (json):
"contact.details"notification JSON structure
Example
{
"eventType": "contact.details",
"entityTypeID": 1,
"entityID": 12345,
"data": {
"id": 12345,
"internalCode": "ABCD",
"mainAddress": null,
"billingAddress": null,
"deliveryAddresses": []
}
}
The full possible structure of the data tag is the same as a single Contact item returned by a call to the Contact Search API method.
Body
(none)
Response
The service returns a sample matching the required JSON format:
{
"success": true,
"errorCode": "",
"errorLevel": 0,
"message": "",
"data": {} // Same Contact structure as received, with a new internalCode ("<entityID>_<internalCode>")
}
"contact.search" sample
Response to be implemented when subscribing the "contact.search" notification (aka "Customer list").
Method
| POST | /api/externals/v1/notification/test/sync/contact/onSearch |
|---|
Arguments
- notification (json):
"contact.search"notification JSON structure
Example
{
"eventType": "contact.search",
"entityTypeID": 1,
"data": {
"searchString": "ABCD" // Search string
}
}
Body
(none)
Response
The service returns a sample result simply confirming the received searchString:
{
"success": true,
"errorCode": "",
"errorLevel": 0,
"message": "search: " // + <searchString> value
}
"contact.validation" sample
Response to be implemented when subscribing the "contact.validation" notification (aka "Customer creation/update").
Method
| POST | /api/externals/v1/notification/test/sync/contact/onValidated |
|---|
Arguments
- notification (json):
"contact.validation"notification JSON structure
Example
{
"eventType": "contact.validation",
"entityTypeID": 1,
"entityID": 12345,
"data": {
"id": 12345,
"internalCode": "ABCD",
"mainAddress": null,
"billingAddress": null,
"deliveryAddresses": []
}
}
The full possible structure of the data tag is the same as a single Contact item returned by a call to the Contact Search API method.
Body
(none)
Response
The service returns a sample matching the required JSON format:
{
"success": true,
"errorCode": "",
"errorLevel": 0,
"message": "",
"data": {} // Same Contact structure as received, with a new internalCode ("<entityID>_<internalCode>")
}
"document.validation" sample
Response to be implemented when subscribing the "document.validation" notification (aka "Document validation").
Method
| POST | /api/externals/v1/notification/test/sync/document/onValidated |
|---|
Arguments
- notification (json):
"document.validation"notification JSON structure
Example
{
"eventType": "document.validation",
"entityTypeID": 10,
"entityID": 12345,
"data": {
"id": 12345,
"internalCode": "ABCD",
"documentType": null,
"contact": null,
"mainAddress": null,
"billingAddress": null,
"deliveryAddress": null,
"documentLines": [],
"styles": []
}
}
The full possible structure of the data tag is the same as a single Document item returned by a call to the Document Search API method.
Body
(none)
Response
The service returns a sample matching the required JSON format:
{
"success": true,
"errorCode": "",
"errorLevel": 0,
"message": "",
"data": {
"internalCode": string // "<entityID>_<internalCode>" ("12345_ABCD" with our example input)
}
}
"document.pricing" sample
Response to be implemented when subscribing the "document.pricing" notification (aka "Document pricing").
Method
| POST | /api/externals/v1/notification/test/sync/document/onPricing |
|---|
Arguments
- notification (json):
"document.pricing"notification JSON structure
Example
{
"eventType": "document.pricing",
"entityTypeID": 10,
"entityID": 12345,
"data": {
"storeCode": 123,
"currencyCode": "EUR",
"items": [
{
"catalogInternalCode": "CAT01",
"eanCode": "123456789",
"tax2Rate": 20.0,
"quantity": 1
}
]
}
}
Body
(none)
Response
The service returns a sample matching the required JSON format:
{
"success": true,
"errorCode": "",
"errorLevel": 0,
"message": "",
"data": {
"storeCode": 123,
"currencyCode": "EUR",
"validityDate": "2025-06-17T11:50:27.000", // Actual date + 30 days
"items": [
{
"catalogInternalCode": "CAT01",
"eanCode": "123456789",
"unitCostPrice": 123.35, // Random value between 0 and 1000
"unitSalesPrice": 197.36 // Unit cost price value * 1.6
}
]
}
}
The answer will contain the same list of items as provided in entry by the calling system, with random values for the returned unit cost prices and unit sales prices.
Please notice that if one or more items provided in entry by the calling system have an empty eanCode value, the testing answer will return a success = false value and the following hard-coded message : "Certain items could not be priced because they have no eanCode".
The other eventual items provided in entry will be priced as normally.
"payment.validation" sample
Response to be implemented when subscribing the "payment.validation" notification (aka "Payment validation").
Method
| POST | /api/externals/v1/notification/test/sync/payment/onValidated |
|---|
Arguments
- notification (json):
"payment.validation"notification JSON structure
Example
{
"eventType": "payment.validation",
"entityTypeID": 10,
"entityID": 12345,
"data": {
"documentTypeID": 10,
"documentID": 12345,
"storeID": 123,
"currencyCode": "EUR",
"amount": 654.32,
"paymentMethod": {
"id": 1,
"description": "Deposit",
"isADeposit": true
},
"paymentType": {
"id": 9,
"description": "Bank transfer"
}
}
}
Body
(none)
Response
The service returns a sample matching the required JSON format:
{
"success": true,
"errorCode": "",
"errorLevel": 0,
"message": "",
"data": {
"status": string, // "W" = Pending, "P" = Paid, "R" = Rejected
"internalCode": string // amount in cents ("65432" with our example input)
}
}