Sales Order API icon

Sales Order API

(0 reviews)

home

Sales Order API

This Api is used in Ordering packages from producer to Partner.

Introduction

The Sales Order API allows to create/update/get details from ICS account. API is secured by OAuth authentication, allowing customer to access any or all records for specific facility depending on the API use case:

  1. Fetch all Sales Order details.
  2. Fetch Sales Order details with specific query parameters.
  3. Create Sales Order.
  4. Update Sales Order.
Overview

The Sales Order API is a REST-based solution that deals with secure and convenient customer and business access to orders data. It has below endpoints,

/ping: This endpoint returns API health.

This endpoint consists of GET method, which gives the health status of the API.

/SalesOrder: This endpoint returns transfer details from the ICS.

This endpoint consists of GET, PUT methods, these are used to fetch, create/update the Sales Orders in ICS.

  1. When the Sales order details are passed from the request it create or update the Sales Orders.
  2. Sales order information can be extracted using queryparms.

GET: This method returns SalesOrder details by using below query parameters.

  • sourceSystem: It is mandatory parameter used for querying the SalesOrder details.
  • sourceSystemSalesOrderId: This is an external (source) salesOrder Ids used for querying the SalesOrder details.
  • icsSalesOrderId: This is the ICS transfer ID generated by the ICS system. This is an optional field.
  • pageNumber: It is an optional field used for querying the SalesOrder details with specific page number.
  • toDate & fromDate: These are optional parameters to extract sales order based on specific creattion date range in ICS system.

PUT: This method creates/updates SalesOrder details in ICS system. While creating SalesOrder records below are the validation performed.

  • The sourceSystem, partnerFacility and orderItems are the required parameters/segments in the API.
  • The details of specific record can also be modified/updated by using same method, user need to pass sourceSystemSalesOrderId of particular record.
Key features and benefits

The following are features and benefits of the Sales Order API:

  1. Provides access to account details including token validation and initiates/retrieves for a Sales Order.
  2. Puts your customers in control of their data sharing permissions and grants through API Security.
How it works

resources/Screenshot%202024-05-31%20172511-47aeb368-2469-4fa9-ad62-92d1a7cb7844.png

The following diagram illustrates how the Sales Order API works.

  1. The customer sends client ID and Secret requesting authorization token to access Mule APi.
  2. Mule API sends the secure token.
  3. The customer enters their secure token and valid Json request for Sales Order.
  4. Mule OAuth provider processes the customer credentials and token to determine the authorization.
  5. If the access is successful, the request is passed from Mule Api to ICS.
  6. Response received from ICS is captured.
  7. Mule API sends the response back the customer in Json format.
  8. If any error in the flow or validation error, Mule API handles and reverts the specific error with the customer along with standard error codes.

Validations

The following are the validations for data transformation in Sales Orders API.

  1. Order Item Cannot be Null or Empty in the request.
  2. icsPackageId or itemProduct must be passed from orderItems.
  3. validation is performed on the packages passed in orderItems from the request to ICS.
  4. The order item quantity should be less than or equal to package quantity. For transfer of sales order, quantity should match at order item level with package.
Use cases

The Sales Order API supports data access for the following use cases.

resources/Screenshot%202024-04-23%20185451-c46bdffc-542f-4d87-9a29-ce1c752e4ea4.png


Reviews