OmnichannelInventoryService Class
Route orders to inventory locations in Order Management.
These methods are for OmnichannelInventoryService. All methods are static.
-
createReservation(createReservationInputRepresentation)
Create an inventory reservation in Omnichannel Inventory.
-
fulfillReservation(fulfillReservationInputRepresentation)
Fulfill one or more inventory reservations.
-
getInventoryAvailability(inventoryAvailabilityInputRepresentation)
Retrieve inventory availability data for one or more products at one or more inventory locations or location groups.
-
getInventoryAvailabilityUploadStatus(uploadId)
Retrieve the status of an inventory availability upload job.
-
getPublishLocationStructureStatus(uploadId)
Retrieve the status of a publish location structure job.
-
Asynchronously publish information about your inventory locations and location groups to Omnichannel Inventory. The publish includes records whose IsEnabled and ShouldSyncWithOci fields are both
true. This method returns an ID that you can use to retrieve the status of the publish job. -
releaseReservation(releaseReservationInputRepresentation)
Release one or more existing inventory reservations to free up that inventory.
-
submitInventoryAvailabilityUpload(fileUpload)
Upload an inventory availability data file to Omnichannel Inventory.
-
transferReservation(transferReservationInputRepresentation)
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but reduces the reserved quantity at the source and increases it at the destination.
-
updateReservation(updateReservationInputRepresentation)
Updates an existing reservation in Omnichannel Inventory. Add, remove, and update quantities for existing SKUs in the reservation.
Create an inventory reservation in Omnichannel Inventory.
51.0
No
public static ConnectApi.OCICreateReservationOutputRepresentation createReservation(ConnectApi.OCICreateReservationInputRepresentation createReservationInputRepresentation)
- createReservationInputRepresentation
Type:
ConnectApi.OCICreateReservationInputRepresentationData to reserve inventory at one or more Omnichannel Inventory locations or location groups.
Type: ConnectApi.OCICreateReservationOutputRepresentation
Fulfill one or more inventory reservations.
51.0
No
public static ConnectApi.OCIFulfillReservationOutputRepresentation fulfillReservation(ConnectApi.OCIFulfillReservationInputRepresentation fulfillReservationInputRepresentation)
- fulfillReservationInputRepresentation
Type:
ConnectApi.OCIFulfillReservationInputRepresentationWraps a list of inventory reservations to fulfill.
Type: ConnectApi.OCIFulfillReservationOutputRepresentation
Retrieve inventory availability data for one or more products at one or more inventory locations or location groups.
51.0
No
public static ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation getInventoryAvailability(ConnectApi.OCIGetInventoryAvailabilityInputRepresentation inventoryAvailabilityInputRepresentation)
- inventoryAvailabilityInputRepresentation
Type:
ConnectApi.OCIGetInventoryAvailabilityInputRepresentationDetails of a request to retrieve inventory availability.
Type: ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
Retrieve the status of an inventory availability upload job.
51.0
No
public static ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation getInventoryAvailabilityUploadStatus(String uploadId)
- uploadId
Type: String
The upload ID of the upload job.
Type: ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
Retrieve the status of a publish location structure job.
51.0
No
public static ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation getPublishLocationStructureStatus(String uploadId)
- uploadId
Type: String
The upload ID of the publish job.
Type: ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
Asynchronously publish information about your inventory locations and location groups to Omnichannel Inventory. The publish includes records whose IsEnabled and ShouldSyncWithOci fields are both true. This method returns an ID that you can use to retrieve the status of the publish job.
51.0
No
public static ConnectApi.OCIPublishLocationStructureOutputRepresentation publishLocationStructure()
Type: ConnectApi.OCIPublishLocationStructureOutputRepresentation
Release one or more existing inventory reservations to free up that inventory.
51.0
No
public static ConnectApi.OCIReleaseReservationOutputRepresentation releaseReservation(ConnectApi.OCIReleaseReservationInputRepresentation releaseReservationInputRepresentation)
- releaseReservationInputRepresentation
Type:
ConnectApi.OCIReleaseReservationInputRepresentationDetails of one or more inventory reservations to release.
Type: ConnectApi.OCIReleaseReservationOutputRepresentation
Upload an inventory availability data file to Omnichannel Inventory.
51.0 (NDJSON), 63.0 (CSV)
No
public static ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation submitInventoryAvailabilityUpload(ConnectApi.BinaryInput fileUpload)
- fileUpload
Type:
ConnectApi.BinaryInputNDJSON or CSV file containing inventory availability data.
Type: ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
To create an inventory data file, format the data as a series of NDJSON or CSV entries that represent locations and individual inventory records.
Inventory Import Data Considerations:
- Separate the top-level entries with line feeds, not commas. Each entry must be on a single line.
- When the system reads a location entry, it assigns the subsequent inventory entries to that location until it reads another location entry.
- Legacy NDJSON requires that you specify a header record for each location entry (
{"location":"wickenburg","mode":"UPDATE"}). The header isn’t required for a high-performance NDJSON layout or CSV file. - Each inventory record entry requires a unique recordId. Best practice is to use a UUID. The recordId protects against importing duplicate data. The recordId is provided in NDJSON and automatically generated for CSV.
- Each inventory record entry requires an effectiveDate.
- If provided, each futures entry requires a nonzero quantity and a future expectedDate.
The file must be in NDJSON or CSV format. For larger collections, use the Commerce API or split the data into multiple files. The Commerce API accepts GZIP, NDJSON, or CSV files up to 100 MB.
This example illustrates the data format:
For readability, this example shows the first few entries on multiple lines. In the import file, each location and inventory record entry must be on a single line.
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but reduces the reserved quantity at the source and increases it at the destination.
51.0
No
public static ConnectApi.OCITransferReservationOutputRepresentation transferReservation(ConnectApi.OCITransferReservationInputRepresentation transferReservationInputRepresentation)
- transferReservationInputRepresentation
Type:
ConnectApi.OCITransferReservationInputRepresentationWraps a list of inventory reservation transfers and specifies whether a single failure cancels the entire list.
Type: ConnectApi.OCITransferReservationOutputRepresentation
Updates an existing reservation in Omnichannel Inventory. Add, remove, and update quantities for existing SKUs in the reservation.
61.0
No
public static ConnectApi.OCIUpdateReservationOutputRepresentation updateReservation(ConnectApi.OCIUpdateReservationInputRepresentation updateReservationInputRepresentation)
- updateReservationInputRepresentation
Type: ConnectApi.OCIUpdateReservationInputRepresentation
Data to update one or more Omnichannel Inventory item reservations.