Inventory API icon

Inventory API

(0 reviews)

home

Inventory API

The Inventory API manages inventory for the consumer system where they can receive, create and update the inventory the ICS account.

Introduction

Inventory API is secured by OAuth token validation, allowing customer to access inventory depending on the API use case:

  1. Receive transfer (Create inventory)
  2. Fetch Inventory details with specific query parameters.
  3. Create Inventory record.
  4. Update Inventory record.
Overview

The inventory has below endpoints.

/ping: This endpoint returns API health.

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

/inventory:

This endpoint consists of GET, PUT methods, these are used to fetch, create and update the Inventory.

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

  1. sourceSystem: It is mandatory parameter used for querying the inventory details.

  2. sourceSystemPackageId: This is an external (source) package Id used for querying the inventory details.

  3. icsPackageId: This is the ICS package ID generated by the ICS system. This is an optional field.

  4. pageNumber: It is an optional field used for querying the inventory details with specific page number.

  5. fromDate: The date from which inventory to be extracted.

  6. toDate: The date till which inventory to be extracted.

PUT: This method receive(creates)/updates inventory details in ICS system.

Key features and benefits

The following are features and benefits of the Inventory API:

  1. Provides access to account details including token validation
  2. Puts your customers in control of their data sharing permissions and grants through our Security.
How it works

The following diagram illustrates how the Inventory API works.

resources/Screenshot%202024-05-31%20180245-e4c6bdbf-4d88-41c5-a7d8-a06126dfcaf7.png

  1. The customer sends client ID and Secret requesting authorization token to mule oauth provider API.
  2. Mule API sends the secure token.
  3. The customer enters their secure token and with valid Json calls inventory API.
  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. Based on the request, Mule inventory API perform the operations on given records.
  7. Response received from ICS is returned to the customer in Json format.
  8. If there is any error in the flow or validation error, Mule API handles and returns the specific error with standard error codes.

Validations

The following is the validations for Inventory API

  1. To fetch packages - sourceSystem is the mandatory queryParam
  2. To create a new package record in ICS – “sourceSystem and sourceSystemPackageId” need to be sent for the request.
  3. To update the package record - "Provide either sourceSystemPackageId or icsPakcageId value"
  4. To split the package record - "Parent package quantity must not be less than or equal to zero"
Use cases.

The Inventory API supports data access for the following use cases.

resources/Screenshot%202024-05-02%20130207-6f888e19-b61c-49c6-b776-9a44f8032c60.png


Reviews