Skip to main content

Customer Order External Mock Service

Introduction​

The service will act as an external mock server for customer orders and handle customer order data The following scenarios will be supported:

APIs​

The Customer Order External Mock API is to be used by the services for managing customer orders.

  • Create/update Customer Order
    • An API for creating customer order for one or more items, for specified business unit(s).
    • URL: POST https://cor-external-mock.retailsvc.com/api/v1/business-units/{businessUnitId}/customer-orders
    • Required header attribute: Tenant-Id
    • Authoraization: Basic
    • Request body:
      {
      "customerId": "111",
      "customerOrderId": "demo-adj-1",
      "status": "CREATED",
      "minimumDownPaymentAmount": 50,
      "isLocked": false,
      "invoicePaymentInstructions": {
      "customerAccountId": "111",
      "invoicingAmount": 100,
      "additionalInformation": [
      {
      "id": "requisition",
      "value": "111",
      "displayText": "Requisition number",
      "receiptLabel": "Requisition number"
      }
      ]
      },
      "items": [
      {
      "itemId": "111",
      "quantityOrdered": 5,
      "unitPrice": 5,
      "contributedAmount": 123,
      "discounts": [
      {
      "discountAmount": 100,
      "discountId": "discountId",
      "discountText": "discountText",
      "rewardType": "GLOBAL_ABSOLUTE"
      }
      ]
      }
      ]
      }
  • Search Customer Orders
    • An API for fetching customer orders for one or more items, for specified business unit(s).
    • URL: POST https://cor-external-mock.retailsvc.com/api/v1/business-units/{businessUnitId}/customer-orders:search
    • Required header attribute: Tenant-Id
    • Authoraization: Basic
    • Example request body:
      {
      "customerId": "111"
      }
    • Sample Response:
      {
      "customerOrders": [
      {
      "customerOrderId": "111",
      "customerId": "111",
      "status": "CREATED"
      }
      ]
      }

  • Get Customer Order Detail
    • An API for Fetching customer order detail by customer order id.
    • URL: GET https://cor-external-mock.retailsvc.com/api/v1/business-units/{businessUnitId}/customer-orders/{customerId}
    • Required header attribute: Tenant-Id
    • Authoraization: Basic
    • Sample Response:
      {
      "customerOrder": {
      "customerId": "111",
      "customerOrderId": "demo-adj-1",
      "status": "CREATED",
      "minimumDownPaymentAmount": 50,
      "isLocked": false,
      "invoicePaymentInstructions": {
      "customerAccountId": "111",
      "invoicingAmount": 100,
      "additionalInformation": [
      {
      "id": "requisition",
      "value": "111",
      "displayText": "Requisition number",
      "receiptLabel": "Requisition number"
      }
      ]
      },
      "items": [
      {
      "itemId": "111",
      "quantityOrdered": 5,
      "unitPrice": 5,
      "contributedAmount": 123,
      "discounts": [
      {
      "discountAmount": 100,
      "discountId": "discountId",
      "discountText": "discountText",
      "rewardType": "GLOBAL_ABSOLUTE"
      }
      ]
      }
      ]
      }
      }