RightChain APIs

Animated publication

RightChain™ APIs

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

Contents

1 Authentication ...................................................................................................................................... 3 2 List of Endpoints.................................................................................................................................... 3 3 directory Endpoint ................................................................................................................................ 4 3.1 Record Object ............................................................................................................................... 4 3.2 GET Method .................................................................................................................................. 5 3.3 POST Method ................................................................................................................................ 6 3.4 PUT Method .................................................................................................................................. 7 3.5 DELETE Method............................................................................................................................. 7 4 Optimization Endpoints ........................................................................................................................ 8 4.1 inventory/fill_rate ......................................................................................................................... 8 4.2 inventory/lot_size ......................................................................................................................... 9 4.3 warehouse/eaches/integrated .................................................................................................... 10 4.4 warehouse/eaches/slotting ........................................................................................................ 11 4.5 warehouse/eaches/storage_mode ............................................................................................. 12 4.6 warehouse/cases/picking ........................................................................................................... 13 4.7 warehouse/pallets/picking ......................................................................................................... 14

2

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

1 Authentication RightChain.ai uses Auth0 as an authentication service to manage keys, credentials, and authentication tokens. Using your client id and secret, you can create a short-lived JWT Token through their interface for calling the RightChain APIs. Details on requesting and using the client token can be found within Auth0’s official documentation linked here (Requesting and Using Client Token). Listed below are the necessary parameters for working with RightChain.ai. Parameter Value url https://rightchainai.auth0.com/oauth/token header ‘content-type: application/x-www-form-urlencoded’

Body/data grant_type client_id client_secret

client_credentials YOUR_CLIENT_ID

YOUR_CLIENT_SECRET https://api.rightchainai

audience

2 List of Endpoints The production server is located at:

https://rightchain.ai/api/

and the test server is located at:

https://rightchain.ai/test/api/

Endpoint directory

Description

Manage directories and files within file structure Computes optimal fill rate, lot size, and turns by SKU

inventory/fill_rate inventory/lot_size

Computes optimal lot size by SKU

warehouse/eaches/integrated

Optimizes inventory storage mode for eaches, slot location, and lane allocation

warehouse/eaches/slotting Optimizes slot location for eaches storage warehouse/eaches/storage_mode Optimizes warehouse storage mode for eaches warehouse/cases/picking

Optimizes warehouse storage mode and vehicle for cases Optimizes warehouse storage mode and vehicle for pallets

warehouse/pallets/picking

3

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

3 directory Endpoint This endpoint provides methods for creating (POST), retrieving (GET), updating (PUT), and deleting (DELETE) directories and files within the RightChain.ai infrastructure. Most of the functionality of the API is also provided within the GUI; however, the API calls act with admin rights by default. 3.1 Record Object Each record returned by the calls to the API has the following parameters: Name Description record_id ID string of the record. record_name User defined name of the record. record_path The path string of the record. record_type The type of the record: “directory” or “file”. record_desc If “record_type” is “directory”: Specifies who created the record: “API”, “RightChain” or a user email. last_modified_by Only applies when “record_type” is “file”. Specifies who last modified the file. modified_time Only applies when “record_type” is “file”. Timestamp of when the file was last modified. read_only Only applies when “record_type” is “file”. If TRUE, only the “last_modified_by” user, an admin, or the API can overwrite or delete the file. If FALSE, any user with access can overwrite or delete the file. users Only applies when “record_type” is “directory”. A vector of users with access to the directory within the GUI. modify_access Only applies when “record_type” is “directory”. A vector of users with permission to modify access to the directory. • “individual”: Only the user associated with the directory has access. • “shared”: Users listed within “users” have access to this directory. If “record_type” is “file”: • A descriptor of the file type or RightChain application. parent_id created_by The “record_id” of the parent directory. There are three ways to identify a record within a call to an endpoint, and all calls must contain one of the following parameters as named values within the body of the request: 1) “record_id”, 2)”record_path”, or 3)”record_name” and “parent_id”. Parent directories can be identified by either their “record_id” (“parent_id”) or “record_path” (“parent_path”) within most calls. An error will be thrown if a record cannot be identified by the given parameters.

4

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

3.2 GET Method This endpoint method can retrieve a record, list the contents of a directory, or return a signed URL for downloading a file from the system. The record is identified using one of the previously listed methods. 3.2.1 Query Parameters Name Description contents (optional) If TRUE, returns the records contained within an identified directory. Returns an error if the identified object is of type “file”. If FALSE (default), returns only the record of the identified object.

recursive (optional)

Only applies when “contents” is TRUE. If TRUE, returns all records within the identified directory and all its children, computed recursively. If FALSE (default), returns only records within the identified directory. Ignored when “contents” is TRUE. If TRUE, returns a signed URL (10 minute expiration) for downloading an identified “file” from the storage system. Returns an error for an identified “directory”. If FALSE (default), returns only the record of the identified object. When included, narrows results to only objects with “record_type” of “file” or “directory”. Ignored otherwise.

download (optional)

record_type (optional)

3.2.2

Body Parameters

Name

Description

record_id

ID string of the record.

record_name record_path

User defined name of the record. The path string of the record. The “record_id” of the parent directory.

parent_id

5

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

3.3 POST Method This endpoint method creates a new record. Either the “parent_id” or the “parent_path” are required to identify the parent directory. This method returns the created record object. For a file, the method also returns a signed URL for uploading the data directly if tabular data was not uploaded in the data object of the body. The default application for files loaded with this method is “Uploaded Data”.

3.3.1

Query Parameters

Name

Description

overwrite (optional)

If TRUE, overwrites any existing records with the same name in the parent directory without warning. If FALSE (default), throws an error if a record with the same name already exists in the parent directory.

3.3.2

Body Parameters

Name

Description

new_name record_type parent_id parent_path

User defined name for the record.

The type of the record: “directory” or “file”. The “record_id” of the parent directory. The “record_path” of the parent directory.

users (optional)

Only applies when “record_type” is “directory”. A vector of users with access to this directory. If omitted, it will inherit the value from the parent directory. Only applies when “record_type” is “directory”. A vector of users with permission to modify user access. If omitted, it will inherit the value from the parent directory. Only applies when “record_type” is “file”. If TRUE, users will not be able to overwrite or delete this file. If FALSE (default), users will be able to overwrite or delete this file. Only applies when “record_type” is “file”. Data in a tabular format to be written into a data file and uploaded to the cloud. When omitted, the API call will return a signed URL (10 minute expiration) for uploading a file to the cloud.

modify_access (optional)

read_only (optional)

data (optional)

6

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

3.4 PUT Method This endpoint method can rename records, move records, or change controlling parameters such as “users”, “modify_access”, or “read_only”. The record is identified using one of the previously listed methods. Optional arguments are ignored when omitted. Methods for updating data within a file are currently under development and not available to users. RightChain recommends overwriting or creating a new file if data must be replaced.

3.4.1

Body Parameters

Name

Description

record_id

ID string of the record.

record_name record_path parent_id new_name (optional)

User defined name of the record. The path string of the record. The “record_id” of the parent directory.

A new name for the record.

new_parent_id (optional) new_parent_path (optional)

The “record_id” of a new parent directory for this file.

The “record_path” of a new parent directory for this file.

read_only (optional) new_users (optional)

The “read_only” status of the file.

A new vector of user emails to replace the existing “users” value.

new_modify_access (optional)

A new vector of user emails to replace the existing “modify_access” value.

3.5 DELETE Method This endpoint method deletes the specified record. The record is identified using one of the previously listed methods. 3.5.1 Query Parameters Name Description delete_contents (optional) If TRUE, deletes the identified record and any children without warning. If FALSE (default), throws an error if the identified record has any children.

3.5.2

Body Parameters

Name

Description

record_id

ID string of the record.

record_name record_path

User defined name of the record. The path string of the record. The “record_id” of the parent directory.

parent_id

7

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

4. Optimization Endpoints The following endpoints are all for different optimization algorithms. The API call needs to have specific permissions for each of these calls. Contact RightChain if encountering an unexpected “Unauthorized” 403 error. These endpoints expect a POST Method call.

4.6 inventory/fill_rate This endpoint computes the optimal fill rate, turnover, and lot size for a given SKU. 4.6.1 Body Parameters JSON encoded variables. When omitted, the argument will take the default value.

Argument

Default “GMROI”

metric

String representing the optimization performance metric: 1. “IPC” - Inventory Policy Cost 2. “IVA” - Inventory Value Added 3. “GMROI” - Gross Margin Return on Inventory Numeric value representing the inventory carrying rate.

icr

0.3

setup_cost

Numeric value representing the setup or changeover cost per line. This argument must be a scalar. If the column “Setup Cost” is included in the skus data, then this argument is ignored. Numeric value representing a % change in setup cost (i.e. 50% increase= 0.5). Numeric value representing a % discount in selling price (i.e. 25% discount = 0.25).

250.0

setup_change

0.0

discount

0.0

min_lot_size Integer value representing the minimum lot size for production. If the column “Minimum Lot Size” is included in the skus data, then this argument is ignored. 1 use_min_lot_size If TRUE, the optimization will apply the minimum when computing optimal lot sizes. If FALSE, the optimization will ignore any minimum lot size data. FALSE round_to_min If TRUE, the optimization will round the computed optimal lot size to the nearest multiple of the minimum. If FALSE, the optimization does not round the optimal lot size. FALSE skus (required) Tabular data representing the SKUs as defined in the data template.

8

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

4.7 inventory/lot_size This endpoint computes only the optimal lot size for a given SKU.

4.7.1 Body Parameters JSON encoded variables. When omitted, the argument will take the default value.

Argument

Description

Default “GMROI”

metric

String representing the optimization performance metric: 1. “IPC” - Inventory Policy Cost 2. “IVA” - Inventory Value Added 3. “GMROI” - Gross Margin Return on Inventory Numeric value representing the inventory carrying rate.

icr

0.3

setup_cost

Numeric value representing the setup or changeover cost per line. This argument must be a scalar. If the column “Setup Cost” is included in the skus data, then this argument is ignored. Numeric value representing a % change in setup cost (i.e. 50% increase= 0.5). Numeric value representing a % discount in selling price (i.e. 25% discount = 0.25).

250.0

setup_change

0.0

discount

0.0

min_lot_size Integer value representing the minimum lot size for production. If the column “Minimum Lot Size” is included in the skus data, then this argument is ignored. 1 use_min_lot_size If TRUE, the optimization will apply the minimum when computing optimal lot sizes. If FALSE, the optimization will ignore any minimum lot size data. FALSE round_to_min If TRUE, the optimization will round the computed optimal lot size to the nearest multiple of the minimum. If FALSE, the optimization does not round the optimal lot size. FALSE skus (required) Tabular data representing the SKUs as defined in the data template.

9

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

4.8 warehouse/eaches/integrated This endpoint optimizes the storage mode by SKU, computes the optimal lane allocation, and assigns SKUs to slots for SKUs picked and stored by eaches. The SKU data is required for this to work properly. If the Storage Mode data is omitted, then the storage mode optimization is not performed. If the slot data is left empty, the slotting will return a ranking of the SKUs. 4.8.1 Query Parameters When omitted, the argument will take the default value. Argument Description Default clean_output If TRUE, returns the line number associated with the SKU (RightChainID) and computed values. If FALSE, returns all inputs and computed fields. TRUE

4.8.2 Body Parameters JSON encoded variables. When omitted, the argument will take the default value. Argument Description

Default

skus (required)

Tabular data representing the SKUs as defined in the data template. Tabular data representing the potential Storage Modes as defined in the data template. Tabular data representing the Locations as defined in the data template. Numeric value representing the wage rate per hour of one worker. Numeric value representing the annual cost per square feet of the space utilized. Numeric value representing the cost associated with errors in picking or stocking a SKU. 2. Uses the “Current Inventory Level” from the SKU data 3. All SKUs are assumed to have at least one package Integer value representing the total number of lanes to allocate between the SKUs. Integer representing the algorithm to use: 1. Single SKU per Slot 2. Multiple SKUs per Slot 3. Multiple SKUs per Slot maximizing the cube utilization String vector representing which headers in “skus” and “slots” designate SKU groupings, i.e. Section, Warehouse, Storage Mode, etc. Ignored when omitted.

modes

Empty Table Empty Table

slots

wage_rate_per_hour

36.0

space_cost_per_sqft

4.23

error_cost_per_line

1.0

planning_horizon_years Numeric value representing the length of the payback period for any investment considered. 3.0 soh_method Integer value representing how to compute “Stock on Hand” 1. All SKUs are assumed to have at least one unit 1

total_lanes

10000

alg

1

dims

10

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

4.9 warehouse/eaches/slotting This endpoint assigns SKUs to Slots using one of the RightChain algorithms. Both the SKU and Slot data are required for this optimization to work properly. If the slot data is left empty, the slotting will return a ranking of the SKUs. 4.9.1 Query Parameters When omitted, the argument will take the default value. Argument Description Default order If TRUE, returns the SKU data ordered by the Assigned Slot. If FALSE, returns the SKU data in no particular order. FALSE clean_output If TRUE, returns the line number associated with the SKU (RightChainID), the SKU ID (SKU), and the Assigned Slot. If FALSE, returns all inputs and computed fields. TRUE

4.9.2 Body Parameters JSON encoded variables. When omitted, the argument will take the default value. Argument Description

Default

skus (required)

Tabular data representing the SKUs as defined in the data template. Tabular data representing the Locations as defined in the data template. Integer representing the algorithm to use: 1. Single SKU per Slot 2. Multiple SKUs per Slot 3. Multiple SKUs per Slot maximizing the cube utilization String vector representing which headers in “skus” and “slots” designate SKU groupings, i.e. Section, Warehouse, Storage Mode, etc. Ignored when omitted.

slots

Empty Table

alg

1

dims

Empty Vector

11

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

4.10 warehouse/eaches/storage_mode This endpoint computes the optimal storage mode by SKU. The SKU data and Storage Mode data are required for this optimization to work properly. 4.10.1 Query Parameters When omitted, the argument will take the default value. Argument Description Default clean_output If TRUE, returns only the line number associated with the SKU (RightChainID) and the computed values. If FALSE, returns all inputs and computed values. TRUE

4.10.2 Body Parameters JSON encoded variables. When omitted, the argument will take the default value. Argument Description

Default

skus (required)

Tabular data representing the SKUs as defined in the data template. Tabular data representing the potential Storage Modes as defined in the data template. Numeric value representing the wage rate per hour of one worker. Numeric value representing the annual cost per square feet of the space utilized. Numeric value representing the cost associated with errors in picking or stocking a SKU.

modes (required)

wage_rate_per_hour

36.0

space_cost_per_sqft

4.23

error_cost_per_line

1.0

planning_horizon_years Numeric value representing the length of the payback period for any investment considered. 3.0 soh_method Integer value representing how to compute “Stock on Hand” 1. All SKUs are assumed to have at least one unit 1

2. Uses the “Current Inventory Level” from the SKU data 3. All SKUs are assumed to have at least one package

12

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

4.11 warehouse/cases/picking This endpoint computes the optimal storage mode and vehicle for a SKU that is stored or picked by case. It considers both Case Picking (CP) and Layer Picking (LP) as well as Restocking costs. 4.11.1 Query Parameters When omitted, the argument will take the default value. Argument Description Default clean_output If TRUE, returns only the line number (RightChainID) and the SKU name with the computed fields. If FALSE, returns all inputs and computed fields. TRUE

4.11.2 Body Parameters JSON encoded variables. When omitted, the argument will take the default value. Argument Description

Default

skus (required)

Tabular data representing the SKUs as defined in the data template. Tabular data representing the potential Storage Modes as defined in the data template. Tabular data representing the Vehicles as defined in the data template. Integer value representing the format of the Case Pick (CP) and Layer Pick (LP) numbers: 0. Total cases is sum of CP and LP 1. Total cases is either CP or LP and consider both methods 2. Total cases is either CP or LP and consider only CP 3. Total cases is either CP or LP and consider only LP Integer value representing how to compute space per SKU: 1. Space Utilization by lot size 2. Max Days on Hand 3. Current Pallets on Hand 1 String vector of Vehicle IDs for consideration for Case Picking. String vector of Vehicle IDs for consideration for Layer Picking. String vector of Vehicle IDs for consideration for Restocking. Numeric value representing working days per year. Numeric value representing working hours per day. Numeric value representing length of payback period for any considered investments. 3.0 Numeric value representing the wage rate per hour of one worker. Overridden by “Wage Rate” in skus. 0 16

modes (required)

vehicles (required)

data_format

space_method

cp_veh

Ignored

lp_veh

Ignored

rs_veh

Ignored

working_days_per_year working_hours_per_day planning_horizon_years

250

wage_rate_per_hour

16.08

occupancy_rate_per_sq_ft Numeric value representing the annual cost per square feet of the space utilized. Overridden by “Occupancy Rate” in skus.

14.95

13

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

clearance_height_ft

Numeric value representing the clearance height of the DC. Overridden by “Clearance Height (ft)” in skus . Ignored when value is zero. Numeric value representing the ratio of the peak demand to the average demand for a SKU. Numeric value representing the cost associated with an error while case picking.

0.0

peak_to_avg_ratio

1.2

error_cost_per_case_pick

0.63

error_cost_per_layer_pick Numeric value representing the cost associated with an error while layer picking.

50.00

4.12 warehouse/pallets/picking This endpoint computes the optimal storage mode and vehicle for a SKU that is stored or picked by pallet. It considers the cost of Picking and Restocking. 4.12.1 Query Parameters When omitted, the argument will take the default value. Argument Description Default clean_output If TRUE, returns only the line number (RightChainID) and the SKU name with the computed fields. If FALSE, returns all inputs and computed fields. TRUE

4.12.2 Body Parameters JSON encoded variables. When omitted, the argument will take the default value. Argument Description

Default

skus (required)

Tabular data representing the SKUs as defined in the data template. Tabular data representing the potential Storage Modes as defined in the data template. Tabular data representing the Vehicles as defined in the data template. Integer value representing how to compute space per SKU: 1. Space Utilization by lot size 2. Max Days on Hand 3. Current Pallets on Hand 1 Numeric value representing working days per year. Numeric value representing working hours per day. Numeric value representing length of payback period for any considered investments. 3.0 Numeric value representing the wage rate per hour of one worker. Overridden by “Wage Rate” in skus. 8.0

modes (required)

vehicles (required)

space_method

working_days_per_year working_hours_per_day planning_horizon_years

250.0

wage_rate_per_hour

30.0

14

RightChain™ APIs | Copyright: RightChain Incorporated | All Rights Reserved

occupancy_rate_per_sf

Numeric value representing the annual cost per square feet of the space utilized. Overridden by “Occupancy Rate” in skus. Numeric value representing the clearance height of the DC. Overridden by “Clearance Height (ft)” in skus . Ignored when value is zero. Numeric value representing the ratio of the peak demand to the average demand for a SKU.

15.0

clearance_height_ft

0.0

peak_to_avg_ratio

1.5

15

Made with FlippingBook - Online catalogs