External Service Configuration
When the Customer Order service is configured to work in the proxy mode, it will proxy the requests to the external service. The external service must be able to handle the requests from the Customer Order service. The following sections describe the format that the external service must implement.
Endpoints
The external service must implement the following endpoints:
GET: /business-units/{businessUnitId}/customer-orders/{customerOrderId}
Sample response:
{
"customerOrder": {
"customerOrderId": "111", // required
"customerId": "customerId", // required
"status": "CREATED", // required
"minimumDownPaymentAmount": 100,
"isLocked": false,
"invoicePaymentInstructions": {
"customerAccountId": "111", // required
"invoicingAmount": 100, // required
"additionalInformation": [
{
"id": "requisition", // required
"value": "111", // required
"displayText": "Requisition number", // required
"receiptLabel": "Requisition number" // required
}
]
},
"items": [ // required
{
"itemId": "111", // required
"quantityOrdered": 100, // required
"unitPrice": 100 // required
}
]
}
}
POST: /business-units/{businessUnitId}/customer-orders:search
Sample search body:
{
"customerId": "111"
}
Sample response:
{
"customerOrders": [
{
"customerOrderId": "111", // required
"customerId": "111", // required
"status": "CREATED" // required
}
]
}
Authentication
The external service must be able to authenticate the requests from the Customer Order service. The tenant will set up the authentication in the Customer Order service based on what the External Service supports. The following authentication methods are supported:
- Basic Authentication
- OAuth2 (Bearer token)
Testing (Mock Service)
HiiRetail provides a mock service for testing purposes. This service is meant to emulate the behavior of the external service
with minimal setup. The mock service is available at https://cor-external-mock.retailsvc.com
, and you can examine
the OpenAPI documentation at https://cor-external-mock.retailsvc.com/schemas/v1/openapi.json
. This can be used as
a reference for the external service implementation or can be used as a testing service for test tenants.
For more details on the mock service, please refer to the Mock Service documentation.