OSID Logo
OSID Specifications
inventory shipment batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.inventory.shipment.batch.ShipmentBatchAdminSession
Implementsosid.inventory.shipment.ShipmentAdminSession
Description

This session creates, updates, and deletes Shipments in bulk. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a Shipment, a ShipmentForm is requested using getShipmentFormsForCreate() specifying the desired record Types or none if no record Types are needed. Each of the returned ShipmentForms will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once a ShipmentForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ShipmentForm corresponds to an attempted transaction.

The ShipmentForms returned from getShipmentFormsForCreate() may be linked to the originating request through the peer Ids of the ShipmentForm. In the case where there may be duplicates, any ShipmentForm of the same peer Ids may be used for a create operation.

Once a batch of ShipmentForms are submitted for create, a CreateResponse is returned for each ShipmentForm, although the ordering is not defined. Only errors that pertain to the entire create operation are returned from createShipments(), errors specific to an individual ShipmentForm are indicated in the corresponding CreateResponse. CreateResponses may be linked to the originating ShipmentForm through the ShipmentForm Id .

For updates, ShipmentForms are requested to the Shipment Id that is to be updated using getShipmentFormsForUpdate() where the reference Id in the ShipmentForm may be used to link the request. Similarly, the ShipmentForm has metadata about the data that can be updated and it can perform validation before submitting the update. The ShipmentForm can only be used once for a successful update and cannot be reused.

Once a batch of ShipmentForms are submitted for update, an UpdateResponse is returned for each ShipmentForm, although the ordering is not defined. Only errors that pertain to the entire update operation are returned from updateShipments(), errors specific to an individual ShipmentForm are indicated in the corresponding UpdateResponse. UpdateResponses may be linked to the originating ShipmentForm through the ShipmentForm Id.

The delete operations delete Shipments in bulk. To unmap a Shipment from the current Warehouse, the ShipmentWarehouseAssignmentSession should be used. These delete operations attempt to remove the Shipment itself thus removing it from all known Warehouse catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetShipmentFormsForCreate
Description

Gets the shipment forms for creating a bunch of new shipments.

Parameterscardinalnumberthe number of forms to retrieve
osid.type.Type[]shipmentRecordTypesarray of shipment record types to be included in each create operation or an empty list if none
Returnosid.inventory.shipment.batch.ShipmentBatchFormListthe shipment forms
ErrorsNULL_ARGUMENT shipmentRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateShipments
Description

Creates a new set of Shipments. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse .

Parametersosid.inventory.shipment.batch.ShipmentBatchFormListshipmentFormsthe shipment forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT shipmentForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetShipmentFormsForUpdate
Description

Gets the shipment forms for updating an existing set of shipments. A new shipment form should be requested for each update transaction.

Parametersosid.id.IdListshipmentIdsthe Ids of the Shipment
Returnosid.inventory.shipment.batch.ShipmentBatchFormListthe shipment form
ErrorsNOT_FOUNDa shipmentId is not found
NULL_ARGUMENT shipmentIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateShipments
Description

Updates existing shipments. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse .

Parametersosid.inventory.shipment.batch.ShipmentBatchFormListshipmentFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT shipmentForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllShipments
Description

Deletes all Shipments in this Warehouse .

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteShipments
Description

Deletes shipments for the given Ids.

Parametersosid.id.IdListshipmentIdsthe Ids of the shipments to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT shipmentIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasShipments
Description

Adds an Id to a Shipment for the purpose of creating compatibility. The primary Id of the Shipment is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another shipment, it is reassigned to the given shipment Id.

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetEntryFormsForCreate
Description

Gets the entry forms for creating a bunch of new entries. A form is returned for each supplied shipment.

Parametersosid.id.IdListshipmentIdsa list of shipment Ids
osid.type.Type[]shipmentRecordTypesarray of shipment record types to be included in each create operation or an empty list if none
Returnosid.inventory.shipment.batch.EntryBatchFormListthe entry forms
ErrorsNOT_FOUNDa shipmentId is not found
NULL_ARGUMENT shipmentIds or shipmentRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateEntries
Description

Creates a new set of Entries. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse .

Parametersosid.inventory.shipment.batch.EntryBatchFormListentryFormsthe entry forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT entryForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetEntryFormsForUpdate
Description

Gets the entry forms for updating an existing set of entries. A new entry form should be requested for each update transaction.

Parametersosid.id.IdListentryIdsthe Ids of the Entry
Returnosid.inventory.shipment.batch.EntryBatchFormListthe entry form
ErrorsNOT_FOUNDan entryId is not found
NULL_ARGUMENT entryIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateEntries
Description

Updates existing entries. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse .

Parametersosid.inventory.shipment.batch.EntryBatchFormListentryFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT entryForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllEntries
Description

Deletes all Entries in this Warehouse .

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteEntries
Description

Deletes entries for the given Ids.

Parametersosid.id.IdListentryIdsthe Ids of the entries to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT entryIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteEntriesForShipment
Description

Deletes entries for the given shipment.

Parametersosid.id.IdshipmentIdthe Ids of the shipment
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT shipmentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasEntries
Description

Adds an Id to an Entry for the purpose of creating compatibility. The primary Id of the Entry is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another entry, it is reassigned to the given entry Id.

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.