supplyCreateShipment
Creates a new supply shipment that tracks product movement from suppliers to your facilities.
Authentication
Requires authentication and the supply:create_shipment permission.
Behavior
- If
shipmentNumberis not provided, a unique number will be automatically generated based on your brand's configuration. - New shipments can be linked to an existing purchase order via
purchaseOrderId. - When
createFromPurchaseOrderis true and apurchaseOrderIdis provided, shipment details will be pre-filled from the associated purchase order. - The shipment type (
SHIPMENTorASN) determines which fields are relevant:- For
SHIPMENTtype: usedestinationNamefor intermediate destinations (e.g., port name). - For
ASNtype: usedestinationBuildingIdto specify the arrival facility.
- For
- Shipment creation is processed asynchronously and returns a process ID for tracking.
Validation Rules
brandIdmust be provided and the brand must exist.shipmentTypeis required and must be eitherSHIPMENTorASN.- If
purchaseOrderIdis provided, the purchase order must exist and belong to the specified brand. - For
ASNtype shipments,destinationBuildingIdmust be provided if the building destination is required by your configuration. - For
SHIPMENTtype shipments,destinationNamecan be used to specify intermediate destinations. - If
shipmentItemsare provided, they must reference valid products associated with the brand.
Possible Errors
Brand not found- The specified brand does not exist.Purchase order not found- The specified purchase order does not exist.Purchase order does not belong to this brand- The purchase order belongs to a different brand.Destination building not found- The specified building ID does not exist.Invalid shipment type- The shipment type is notSHIPMENTorASN.Destination building required for ASN shipments- AnASNtype shipment was created without specifyingdestinationBuildingId.
supplyCreateShipment(
input: CreateSupplyShipmentInput!
): AsynchronousActionResponse
Arguments
supplyCreateShipment.input ● CreateSupplyShipmentInput! non-null input
Parameters for CreateSupplyShipment
Type
AsynchronousActionResponse object
Asynchronous action response type