Inventory API icon

Inventory API

(0 reviews)

home

Inventory API

The API provides information about the inventory/package details from the ICS account.

Introduction

The Inventory API allows to fetch/initiate details from ICS account. Inventory Api is secured by OAuth token validation, allowing customer to access any or all of the following depending on the API use case:
1. Fetch all Inventory details.
2. Fetch Inventory details with specific query parameters.
3. Create Inventory record.
4. Update Inventory record.


Overview

The Inventory API is a REST-based solution that deals secure and convenient customer and business access to Inventory data.
The Inventory Api is secured by Mule OAuth
The Inventory API provides information about the Inventory details from the ICS. It 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 returns Inventory details from the ICS.
This endpoint consists of GET, PUT methods, these are used to fetch, create and update the Inventory.
1. When package request are passed from the request it retrieves/initiate Inventory details
2. When specific queryParams are passed to fetch particular package details user can pass on search criteria.

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) transfer Ids used for querying the inventory details.
3.icsPackageId: This is the ICS transfer ID generated by the ICS system. This is an optional field.
4.pageNumber: It is an optional field used for querying the transfer details with specific page number.

PUT: This method creates/updates inventory details in ICS system. While creating package records below are the validation performed.
1.The sourceSystem,sourceSystemPackageId,icsPackageId and required parameters need to be passed.
2.The required fields to be passed for respective inventory. for instance: icsPackageId need to be passed while creating/updating a inventory record.
3.The details of specific record can also be modified/updated by using same method, user need to pass sourceSystemPackageId of particular record.


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-e2a1e7ec-b83a-4edf-a86c-3e00b3f5fc2c.png
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 specific Inventory type.
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 there is 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 is the validations for Inventory API
1. To fetch packages - sourceSystem is the mandatory queryParam to be passed, sourceSystem along with sourceSystemPackageId can also be passed to get specific record details.
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 sourceSystem and sourceSystemPackageId or icsPakcageId value"
4. To update 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-4565d34d-817d-43f1-87b8-c1261a7a3e4c.png


Reviews