GetShipmentsByQuery
This function retrieves all shipments which fulfill certain search criteria. Shipments are a way of organizing outgoing and inbound deliveries.
Note: The word "shipment" here refers to Ongoing WMS' own concept of a shipment. It has no relation to the "shipments" which a carrier (such as DHL or UPS) deals with. The vast majority of warehouses do not use Ongoing WMS' own shipment functionality, and therefore most integrations will not need to use the GetShipmentsByQuery function.
Tags: GetShipmentsByQuery, query, SpecialFilters, ShipmentInfo, GoodsOwner, ShipmentHeader, ShipmentContainerInfo , PalletDimensions, PalletTypeInfo, ShipmentContainerItemInfo, Consignee, Consignor, Supplier, ShipmentPayment, ReturnTransporter, CustomsStatus, ShipmentCategoryInfo
Request XML
POST /xxx/service.asmx HTTP/1.1
Host: api.ongoingsystems.se
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ongoingsystems.se/WSI/GetShipmentsByQuery"
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetShipmentsByQuery xmlns="http://ongoingsystems.se/WSI">
<GoodsOwnerCode>string</GoodsOwnerCode>
<UserName>string</UserName>
<Password>string</Password>
<query>
<InDateFrom>dateTime</InDateFrom>
<InDateTo>dateTime</InDateTo>
<DeliveryDateFrom>dateTime</DeliveryDateFrom>
<DeliveryDateTo>dateTime</DeliveryDateTo>
<ShipmentStatusFrom>int</ShipmentStatusFrom>
<ShipmentStatusTo>int</ShipmentStatusTo>
<IsCollectType>boolean</IsCollectType>
<IsDeliveryType>boolean</IsDeliveryType>
<ShipmentOrderNumber>string</ShipmentOrderNumber>
<GetOrders>boolean</GetOrders>
<ShipmentIdsToGet>
<int>int</int>
<int>int</int>
</ShipmentIdsToGet>
<CustomsStatus>All or NoStatus or PendingForApproval or Approved</CustomsStatus>
<ShippedTimeFrom>dateTime</ShippedTimeFrom>
<SpecialFilters>
<OnlyIfTAPrinted>boolean</OnlyIfTAPrinted>
</SpecialFilters>
<MaxShipmentsToGet>int</MaxShipmentsToGet>
<ShipmentIdFrom>int</ShipmentIdFrom>
</query>
</GetShipmentsByQuery>
</soap:Body>
</soap:Envelope>
Request specification
GetShipmentsByQuery |
GoodsOwnerCode |
str(400) |
Req. |
The name/code of your client |
UserName |
str(50) |
Req. |
Your username |
Password |
str(50) |
Req. |
Your password |
query |
object |
Req. |
Specifies the query/search criteria |
query |
InDateFrom |
datetime |
|
Indate of shipment, from |
InDateTo |
datetime |
|
Indate of shipment, to |
DeliveryDateFrom |
datetime |
|
Delivery date of shipment, from |
DeliveryDateTo |
datetime |
|
Delivery date of shipment, to |
ShipmentStatusFrom |
int |
|
Shipment status, from |
ShipmentStatusTo |
int |
|
Shipment status, to |
IsCollectType |
bool |
|
If the shipment is a "collect" shipment |
IsDeliveryType |
bool |
|
If the shipment is a "delivery" shipment |
ShipmentOrderNumber |
str(50) |
|
The shipment order number of the shipment you want to retrieve |
GetOrders |
bool |
|
If true, then the response will also contain information about each order which the the shipment contains |
ShipmentIdsToGet |
object |
|
The shipment ids which you want to retrieve |
> int |
int[] |
|
Shipment ids to get |
CustomsStatus |
enum |
|
Determines what customs status the shipment must have:
- All
- NoStatus
- PendingForApproval
- Approved
|
ShippedTimeFrom |
datetime |
|
Shipped datetime from (shipment marked as shipped from warehouse) |
SpecialFilters |
obj |
|
An object of type SpecialFilters. |
MaxShipmentsToGet |
int |
|
Max number of shipments to return in response |
ShipmentIdFrom |
int |
|
If specified, the API will only respond with shipments whose system Ids are greater than or equal to (>=) the specified id. In conjunction with MaxShipmentsToGet this allows you to request shipments in batches of e.g. 100, rather than having to request all shipments at once. |
SpecialFilters |
OnlyIfTAPrinted |
bool |
|
Only show shipments where a transport label has been confirmed as printed |
Response XML
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetShipmentsByQueryResponse xmlns="http://ongoingsystems.se/WSI">
<GetShipmentsByQueryResult>
<Shipments>
<ShipmentInfo>
<GoodsOwner>
<GoodsOwnerIdentification>string</GoodsOwnerIdentification>
<GoodsOwnerCode>string</GoodsOwnerCode>
<GoodsOwnerId>int</GoodsOwnerId>
<FinancialCode>string</FinancialCode>
<GoodsLocationCode>string</GoodsLocationCode>
</GoodsOwner>
<ShipmentHeader>
<ShipmentId>int</ShipmentId>
<ExternalSystemId>int</ExternalSystemId>
<WayBill>string</WayBill>
<ConsignorReference>string</ConsignorReference>
<ConsigneeReference>string</ConsigneeReference>
<CustomerNumber>string</CustomerNumber>
<TransporterOrderNumber>string</TransporterOrderNumber>
<DeliveryInstruction>string</DeliveryInstruction>
<ContactPerson></ContactPerson>
<ShipmentOrderNumber>string</ShipmentOrderNumber>
<OtherCustomerNumber>string</OtherCustomerNumber>
<ShipmentComment>string</ShipmentComment>
<VesselName>string</VesselName>
<RegistrationNumber>string</RegistrationNumber>
<ShipmentStatusId>int</ShipmentStatusId>
<ShipmentStatusName>string</ShipmentStatusName>
<InDate>datetime</InDate>
<DeliveryDate>datetime</DeliveryDate>
<ShippedTime>datetime</ShippedTime>
<ArrivalTime>string</ArrivalTime>
<Route>string</Route>
<TripRouteCode>string</TripRouteCode>
<TripId>int</TripId>
<ArrivalTimeFromSeconds>int</ArrivalTimeFromSeconds>
<ArrivalTimeToSeconds>int</ArrivalTimeToSeconds>
<ArrivalDate>datetime</ArrivalDate>
<PickUpReference>string</PickUpReference>
<ExportReference>string</ExportReference>
<GoodsCategoryCode>string</GoodsCategoryCode>
<FreightPrice>decimal</FreightPrice>
<DomesticFreightPrice>decimal</DomesticFreightPrice>
<AdditionalPrice>decimal</AdditionalPrice>
<GateFromLocation>string</GateFromLocation>
<GateToLocation>string</GateToLocation>
<NumberOfFreightPalletPlaces>decimal</NumberOfFreightPalletPlaces>
<TripRegistrationNumber>string</TripRegistrationNumber>
<FreightPriceCurrencyCode>string</FreightPriceCurrencyCode>
<TermsOfDeliveryTypeCode>string</TermsOfDeliveryTypeCode>
<ShipmentPreparedTransportDocumentId>string</ShipmentPreparedTransportDocumentId>
<ReturnWaybill>string</ReturnWaybill>
<CustomsReferenceNumber>string</CustomsReferenceNumber>
</ShipmentHeader>
<ShipmentContainers>
<ShipmentContainerInfo>
<ContainerTypeCode>string</ContainerTypeCode>
<ContainerTypeName>string</ContainerTypeName>
<Weight>decimal</Weight>
<Volume>decimal</Volume>
<LoadMeters>decimal</LoadMeters>
<NumberOfPackages>int</NumberOfPackages>
<GoodsMark>string</GoodsMark>
<GoodsCategory>string</GoodsCategory>
<OrderId>int</OrderId>
<OrderNumber>string</OrderNumber>
<CustomerNumber>string</CustomerNumber>
<ContainerId>int</ContainerId>
<GoodsCategoryName>string</GoodsCategoryName>
<GoodsCategoryCode>string</GoodsCategoryCode>
<Length>decimal</Length>
<Width>decimal</Width>
<Height>decimal</Height>
<PalletType>
<Length>decimal</Length>
<Width>decimal</Width>
<Height>decimal</Height>
</PalletType>
<Dimensions>
<PalletTypeCode>string</PalletTypeCode>
<PalletTypeId>int</PalletTypeId>
<Length>decimal</Length>
<Width>decimal</Width>
<Height>decimal</Height>
</Dimensions>
</ShipmentContainerInfo>
<ShipmentContainerInfo>
<ContainerTypeCode>string</ContainerTypeCode>
<ContainerTypeName>string</ContainerTypeName>
<Weight>decimal</Weight>
<Volume>decimal</Volume>
<LoadMeters>decimal</LoadMeters>
<NumberOfPackages>int</NumberOfPackages>
<GoodsMark>string</GoodsMark>
<GoodsCategory>string</GoodsCategory>
<OrderId>int</OrderId>
<OrderNumber>string</OrderNumber>
<CustomerNumber>string</CustomerNumber>
<ContainerId>int</ContainerId>
<GoodsCategoryName>string</GoodsCategoryName>
<GoodsCategoryCode>string</GoodsCategoryCode>
<Length>decimal</Length>
<Width>decimal</Width>
<Height>decimal</Height>
<PalletType>
<Length>decimal</Length>
<Width>decimal</Width>
<Height>decimal</Height>
</PalletType>
<Dimensions>
<PalletTypeCode>string</PalletTypeCode>
<PalletTypeId>int</PalletTypeId>
<Length>decimal</Length>
<Width>decimal</Width>
<Height>decimal</Height>
</Dimensions>
</ShipmentContainerInfo>
</ShipmentContainers>
<ShipmentContainerItems>
<ShipmentContainerItemInfo>
<ContainerTypeCode>string</ContainerTypeCode>
<ContainerTypeName>string</ContainerTypeName>
<GoodsCategoryTypeId>int</GoodsCategoryTypeId>
<GoodsCategoryTypeName></GoodsCategoryTypeName>
<GoodsCategoryTypeCode>string</GoodsCategoryTypeCode>
<IsConsolidated>boolean</IsConsolidated>
<NumberOfItems>decimal</NumberOfItems>
<SecondNumberOfItems>decimal</SecondNumberOfItems>
<Weight>decimal</Weight>
<Volume>decimal</Volume>
<ShipmentId>int</ShipmentId>
<LabelId>string</LabelId>
<Comment>string</Comment>
<Serial>string</Serial>
<ShipmentPalletItemComment>string</ShipmentPalletItemComment>
<PalletOwnerCode>string</PalletOwnerCode>
<PalletOwnerName>string</PalletOwnerName>
<PalletOwnerComment>string</PalletOwnerComment>
<ShipmentContainerItems />
<PalletItemOwnerCode>string</PalletItemOwnerCode>
<PalletItemId>int</PalletItemId>
<LoadMeters>decimal</LoadMeters>
<ContainerTypeId>int</ContainerTypeId>
<IsTAPalletItem>int</IsTAPalletItem>
<IsReturnTAPalletItem>int</IsReturnTAPalletItem>
</ShipmentContainerItemInfo>
<ShipmentContainerItemInfo>
<ContainerTypeCode>string</ContainerTypeCode>
<ContainerTypeName>string</ContainerTypeName>
<GoodsCategoryTypeId>int</GoodsCategoryTypeId>
<GoodsCategoryTypeName></GoodsCategoryTypeName>
<GoodsCategoryTypeCode>string</GoodsCategoryTypeCode>
<IsConsolidated>boolean</IsConsolidated>
<NumberOfItems>decimal</NumberOfItems>
<SecondNumberOfItems>decimal</SecondNumberOfItems>
<Weight>decimal</Weight>
<Volume>decimal</Volume>
<ShipmentId>int</ShipmentId>
<LabelId>string</LabelId>
<Comment>string</Comment>
<Serial>string</Serial>
<ShipmentPalletItemComment>string</ShipmentPalletItemComment>
<PalletOwnerCode>string</PalletOwnerCode>
<PalletOwnerName>string</PalletOwnerName>
<PalletOwnerComment>string</PalletOwnerComment>
<ShipmentContainerItems />
<PalletItemOwnerCode>string</PalletItemOwnerCode>
<PalletItemId>int</PalletItemId>
<LoadMeters>decimal</LoadMeters>
<ContainerTypeId>int</ContainerTypeId>
<IsTAPalletItem>int</IsTAPalletItem>
<IsReturnTAPalletItem>int</IsReturnTAPalletItem>
</ShipmentContainerItemInfo>
</ShipmentContainerItems>
<Consignee>
<CustomerNumber>string</CustomerNumber>
<CustomerNumberPallets>string</CustomerNumberPallets>
<Id>int</Id>
<Name>string</Name>
<Address>string</Address>
<Address2>string</Address2>
<Address3>string</Address3>
<PostCode>string</PostCode>
<City>string</City>
<CountryCode>string</CountryCode>
<IsEuCountry>boolean</IsEuCountry>
<TelePhone>string</TelePhone>
<MobilePhone>string</MobilePhone>
<Email>string</Email>
<DeliveryInstruction>string</DeliveryInstruction>
<NotifyByEmail>boolean</NotifyByEmail>
<NotifyBySms>boolean</NotifyBySms>
<NotifyByTelephone>boolean</NotifyByTelephone>
<TransportZoneCode>string</TransportZoneCode>
<TransportZoneName>string</TransportZoneName>
<CustomerGroupName>string</CustomerGroupName>
<CustomerGroupCode>string</CustomerGroupCode>
<AddressId>int</AddressId>
</Consignee>
<Consignor>
<CustomerNumber>string</CustomerNumber>
<Id>int</Id>
<Name>string</Name>
<Address>string</Address>
<Address2>string</Address2>
<PostCode>string</PostCode>
<City>string</City>
<CountryCode>string</CountryCode>
<IsEuCountry>boolean</IsEuCountry>
<TelePhone>string</TelePhone>
<MobilePhone>string</MobilePhone>
<NotifyByEmail>boolean</NotifyByEmail>
<NotifyBySms>boolean</NotifyBySms>
<NotifyByTelephone>boolean</NotifyByTelephone>
</Consignor>
<Supplier>
<SupplierNumber>string</SupplierNumber>
<SupplierName>string</SupplierName>
<Address>string</Address>
<City>string</City>
<ZipCode>string</ZipCode>
<CountryCode>string</CountryCode>
</Supplier>
<ShipmentPayment>
<ShipmentPaymentType>enum</ShipmentPaymentType>
<TransporterCode>string</TransporterCode>
<TransporterServiceCode>string</TransporterServiceCode>
<GoodsOwnerEdiCode>string</GoodsOwnerEdiCode>
<TransporterEdiCode>string</TransporterEdiCode>
<CustomerNumber>string</CustomerNumber>
<TransporterContractArticleCode>string</TransporterContractArticleCode>
</ShipmentPayment>
<Orders />
<ReturnTransporter>
<TransporterContractId>int</TransporterContractId>
<TransporterCustomerNumber>string</TransporterCustomerNumber>
<TransporterName>string</TransporterName>
<ServiceName>string</ServiceName>
<ServiceCode>string</ServiceCode>
<ServiceId>int</ServiceId>
<TransporterContractEdiCode>string</TransporterContractEdiCode>
<WaybillTemplate>string</WaybillTemplate>
<TransporterCode>string</TransporterCode>
</ReturnTransporter>
<CustomsStatus>
<Id>int</Id>
<Code>string</Code>
</CustomsStatus>
<ShipmentCategory>
<Name>string</Name>
<Code>string</Code>
<Id>int</Id>
</ShipmentCategory>
</ShipmentInfo>
</Shipments>
</GetShipmentsByQueryResult>
</GetShipmentsByQueryResponse>
</soap:Body>
</soap:Envelope>
Response specification
ShipmentInfo |
GoodsOwner |
object |
Information about the goods owner |
ShipmentHeader |
object |
Information about the shipment |
ShipmentContainers |
object |
Information about the shipment containers |
ShipmentContainerItems |
object |
Information about the shipment container items |
Consignee |
object |
Information about the shipment's consignee |
Consignor |
object |
Information about the shipment's consignor |
Supplier |
object |
Information about the shipment's supplier |
ShipmentPayment |
object |
Information about the shipments transporter contract |
Orders |
object |
A list of all orders which are associated with the shipment. Please see the response specification of GetOrder for a more detailed specification of the fields available here |
ReturnTransporter |
object |
Information about the shipment's transporter contract for the return shipment. Note that this object is only used when the return transporter service differs from the transporter service used to send goods to the customer. Put another way, this object is only used when the warehouse sends goods to a customer using transporter X, and includes a return label from transporter Y. |
CustomsStatus |
object |
Information about the shipment's customs status. |
ShipmentCategory |
object |
An object of type ShipmentCategoryInfo. Contains information about the shipment's category. |
GoodsOwner |
GoodsOwnerIdentification | string | Deprecated, don't use |
GoodsOwnerCode | string | Name/code of the goods owner |
GoodsOwnerId | string | Ongoing WMS internal id of the goods owner |
FinancialCode | string | The financial code which has been entered for the goods owner |
GoodsLocationCode | string | The location code which has been entered for the goods owner |
ShipmentContainerInfo |
ContainerTypeCode | string | Type of row (code) |
ContainerTypeName | string | Type of row (name) |
Weight | decimal | Weight |
Volume | decimal | Volume |
LoadMeters | decimal | Number of load meters |
NumberOfPackages | int | Number of packages |
GoodsMark | string | Marking |
GoodsCategory | string | Category |
OrderId | int | Ongoing WMS internal order id |
OrderNumber | string | Order number |
CustomerNumber | string | Customer number |
ContainerId | int | Ongoing WMS internal id of the container |
GoodsCategoryName | string | Name of goods category type |
GoodsCategoryCode | string | Code of goods category type |
Length | decimal | Obsolete, do not use |
Width | decimal | Obsolete, do not use |
Height | decimal | Obsolete, do not use |
PalletType | object | Object of type PalletTypeInfo which contains information about the pallet type |
Dimensions | object | Object of type PalletDimensions which contains information about the dimensions of this particular pallet (if they are different from the dimensions of the pallet type) |
PalletDimensions |
Length | decimal | Length |
Width | decimal | Width |
Height | decimal | Height |
PalletTypeInfo |
PalletTypeCode | str | The pallet type code |
PalletTypeId | int | Ongoing WMS internal id for the pallet type |
Length | decimal | Length |
Width | decimal | Width |
Height | decimal | Height |
ShipmentContainerItemInfo |
ContainerTypeCode | string | Type of row (code) |
ContainerTypeName | string | Type of row (name) |
GoodsCategoryTypeId | int | Ongoing WMS internal id of the goods category |
GoodsCategoryTypeName | string | Goods category type name |
GoodsCategoryTypeCode | string | Goods category type code |
IsConsolidated | boolean | If the shipment is consolidated |
NumberOfItems | decimal | Number of items |
SecondNumberOfItems | decimal | Second number of items |
Weight | decimal | Weight |
Volume | decimal | Volume |
ShipmentId | int | Ongoing WMS internal id of the shipment |
LabelId | string | Label id |
Comment | string | Comment |
Serial | string | Serial number |
ShipmentPalletItemComment | string | Comment |
PalletOwnerCode | string | Code of the pallet owner |
PalletOwnerName | string | Name of the pallet owner |
PalletOwnerComment | string | Pallet owner comment |
ShipmentContainerItems | object | |
PalletItemOwnerCode | string | Code of the pallet item's owner |
PalletItemId | int | Ongoing WMS internal id of the container item (pallet item) |
LoadMeters | decimal | Number of load meters |
ContainerTypeId | decimal | Container type id |
IsTAPalletItem | decimal | Determines if the pallet it was created automatically by a Transport Administration system such as nShift Delivery |
IsReturnTAPalletItem | decimal | Determines if the pallet item was intended for returns to the warehouse |
Consignee |
CustomerNumber |
str |
Customer number |
CustomerNumberPallets |
str |
Customer's pallet registration number at the transporter |
Id |
int |
System id of the customer |
Name |
str(200) |
Name |
Address |
str(200) |
Address line 1 |
Address2 |
str(200) |
Address line 2 |
Address3 |
str(200) |
Address line 3 |
PostCode |
str(50) |
Post code/zip |
City |
str(200) |
City |
CountryCode |
str(2) |
The two-letter ISO 3166-1 alpha-2 code of the country. |
IsEuCountry |
bool |
True if country is within EU |
TelePhone |
str(50) |
Telephone number (non cellular) |
MobilePhone |
str(50) |
Mobile phone number (cellular) |
Email |
str(300) |
Email address |
DeliveryInstruction |
str(300) |
Delivery instruction |
NotifyByEmail |
bool |
True if the customer should be notified by the transporter through email |
NotifyBySms |
bool |
True if the customer should be notified by the transporter through SMS |
NotifyByTelephone |
bool |
True if the customer should be notified by the transporter through phone call |
TransportZoneCode |
string |
The code of the transport zone which the consignee's address is in |
TransportZoneName |
string |
The name of the transport zone which the consignee's address is in |
CustomerGroupName |
string |
Name of the customer group which the customer belongs to |
CustomerGroupCode |
string |
Code of the customer group which the customer belongs to |
AddressId |
int |
System id of the delivery address |
Consignor |
CustomerNumber | string | Customer number |
Id | int | Ongoing WMS internal id for the consignor |
Name | string | Name |
Address | string | Address |
Address2 | string | Address line 2 |
PostCode | string | Post code / zip code |
City | string | City |
CountryCode | string | The two-letter ISO 3166-1 alpha-2 code of the country |
IsEuCountry | boolean | True if the consignor country is in the EU, false otherwise |
TelePhone | string | Telephone number |
MobilePhone | string | Mobile phone number |
NotifyByEmail | boolean | True if the consignor wishes to be notified by email, false otherwise |
NotifyBySms | boolean | True if the consignor wishes to be notified by SMS, false otherwise |
NotifyByTelephone | boolean | True if the consignor wishes to be notified by telephone, false otherwise |
Supplier |
SupplierNumber |
string |
Supplier number |
SupplierName |
string |
Name |
Address |
string |
Address |
City |
string |
City |
ZipCode |
string |
Zip code / post number |
CountryCode |
string |
The two-letter ISO 3166-1 alpha-2 code of the country |
ShipmentPayment |
ShipmentPaymentType |
enum |
Defines who is paying for the transport
- Collect
- Prepaid
- ThirdParty
- UnKnown
|
TransporterCode |
string |
The code of the transporter |
TransporterServiceCode |
string |
The code the specific transporter service from the transporter |
GoodsOwnerEdiCode |
string |
The code for the transporter in the warehouse's transport system |
TransporterEdiCode |
string |
Transporter EDI code |
CustomerNumber |
string |
The carrier's customer number of the transport payer |
TransporterContractArticleCode |
string |
Transporter article code |
ReturnTransporter |
TransporterContractId |
int |
Ongoing WMS internal id for the transporter contract |
TransporterCustomerNumber |
str |
Carrier's customer number |
TransporterName |
str |
Name of the transporter |
ServiceName |
str |
Name of the transporter service |
ServiceCode |
str |
Code of the transporter service |
ServiceId |
int |
Ongoing WMS internal id of the transporter service |
TransporterContractEdiCode |
str |
Contract's EDI code |
WaybillTemplate |
str |
Waybill template |
TransporterCode |
str |
Code of the transporter |
CustomsStatus |
id |
int |
Ongoing WMS internal id for the customs status |
Code |
str |
The code of the customs status |
ShipmentCategoryInfo |
Code |
str(100) |
Category code |
Name |
str(100) |
Category name |
Id |
int |
Ongoing WMS internal id for the category |