Packaging API
Packaging API
This API is used for managing packaging operations like start packaging and complete packaging
Introduction
The Packaging API is secured by OAuth token validation, allowing customer to access any or all the following depending on the API use case:
Overview
The Packaging API is a REST-based solution that deals in a secure and convenient way to perform packaging operations.
Packaging API is secured by Mule OAuth
The Packaging API provides ability to manage packaging in ICS system. It has below endpoints:
/ping: This endpoint returns API health.
This endpoint consists of GET method, which gives the health status of the API.
/startPackaging:
PATCH :-
- This method is used to update specific fields on existing (Parent) package to mark start of the packaging process.
- Cancel start packaging by passing status as Cancelled in startPackaging request.
/completePackaging:
POST :-
- This method is used to create child (smaller) packages out of parent package based on packaging sizes
- Based on packageSizes, new batches will be created.
- Child packages created based on packageSizes will be attached respective new batches.
/packageSizes:
GET :- This method is used to get list of all available packaging sizes for a particular facility which will be helpful for users while doing packaging
Key features and benefits
The following are features and benefits of the Packaging API:
- Provides access to account details including token validation
- Puts your customers in control of their data sharing permissions and grants through API security.
How it works
The following diagram illustrates how the Packaging API works:

- The customer sends client ID and Secret requesting authorization token to access the API.
- Mule token API sends the access token.
- The customer enters their secure token and valid query parameter/body request to the API.
- Mule OAuth provider processes the customer credentials and token to determine the authorization.
- If the access is successful, the request is processed through the API to ICS system.
- Mule API returns the response to the customer in JSON format.
- If there is any error in the flow or validation error, Mule API handles and reverts the specific error to the customer along with standard error codes.
Validations Used:
Start Packaging:
- Package remaining quantity should be greater than zero.
- Batch should not be on hold.
- Package record type should not be waste.
- Is_PackageUsed\_c flag should be false.
- Package Size field should be null.
Complete Packaging:
- Package remaining quantity should be greater than zero.
- If test result is available on parent package, test result will be inherited.
- Package record type should not be waste.
- Is_PackageUsed\_c should be true.