Ongoing Warehouse logo

Ongoing Warehouse Developer

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's 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's own shipment functionality, and therefore most integrations will not need to use the GetShipmentsByQuery function.

Tags: GetShipmentsByQuery, query, ShipmentInfo, GoodsOwner, ShipmentHeader, ShipmentContainerInfo , ShipmentContainerItemInfo, Consignee, Consignor, Supplier, ShipmentPayment

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>
      </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

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>
            </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>
              </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>
              </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>
                <PalletIndex>int</PalletIndex>
                <Comment>string</Comment>
                <Serial>string</Serial>
                <ShipmentPalletItemComment>string</ShipmentPalletItemComment>
                <PalletOwnerCode>string</PalletOwnerCode>
                <PalletOwnerName>string</PalletOwnerName>
                <PalletOwnerComment>string</PalletOwnerComment>
                <ShipmentContainerItems />
                <InboundShipmentOrderNumber>string</InboundShipmentOrderNumber>
                <InboundShipmentCustomerNumber>string</InboundShipmentCustomerNumber>
                <InboundShipmentId>int</InboundShipmentId>
                <PalletItemOwnerCode>string</PalletItemOwnerCode>
                <PalletItemId>int</PalletItemId>
                <LoadMeters>decimal</LoadMeters>
              </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>
                <PalletIndex>int</PalletIndex>
                <Comment>string</Comment>
                <Serial>string</Serial>
                <ShipmentPalletItemComment>string</ShipmentPalletItemComment>
                <PalletOwnerCode>string</PalletOwnerCode>
                <PalletOwnerName>string</PalletOwnerName>
                <PalletOwnerComment>string</PalletOwnerComment>
                <ShipmentContainerItems />
                <InboundShipmentOrderNumber>string</InboundShipmentOrderNumber>
                <InboundShipmentCustomerNumber>string</InboundShipmentCustomerNumber>
                <InboundShipmentId>int</InboundShipmentId>
                <PalletItemOwnerCode>string</PalletItemOwnerCode>
                <PalletItemId>int</PalletItemId>
                <LoadMeters>decimal</LoadMeters>
              </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 />
          </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
GoodsOwner
GoodsOwnerIdentification string Deprecated, don't use
GoodsOwnerCode string Name/code of the goods owner
GoodsOwnerId string Ongoing's 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
ShipmentHeader
ShipmentId int Ongoing's internal id of the shipment
ExternalSystemId int Deprecated, do not use
WayBill string Waybill number for the shipment
ConsignorReference string Consignor's reference
ConsigneeReference string Consignee's reference
CustomerNumber string Customer number of the consignee
TransporterOrderNumber string Transporter's order number of the shipment
DeliveryInstruction string Delivery instruction, intended for transporter
ContactPerson string Contact person for questions about the shipment
ShipmentOrderNumber string Order number for the shipment
OtherCustomerNumber string Additional customer number
ShipmentComment string Free text comment about the shipment
VesselName string The name of the vessel (e.g. a ship) which is supposed to transport the shipment
RegistrationNumber string The registration number of the truck which is supposed to transport the shipment
ShipmentStatusId int Current status number of the shipment
ShipmentStatusName string Name of the current shipment status
InDate datetime Planned date when the shipment is due at the warehouse
DeliveryDate datetime Planned date when the shipment is due to leave the warehouse
ShippedTime datetime Actual date when the shipment left the warehouse
ArrivalTime string Intended date when the shipment is supposed to arrive at its destination
Route string Name of the route
TripRouteCode string Trip route code
TripId int Ongoing internal id of the trip which the shipment belongs to
ArrivalTimeFromSeconds int Estimated lower bound on the number of seconds it will take to unload the shipment
ArrivalTimeToSeconds int Estimated upper bound on the number of seconds it will take to unload the shipment
ArrivalDate datetime Actual date when the shipment arrived at its destination
PickUpReference string Pickup reference
ExportReference string Export reference
GoodsCategoryCode string Goods category code
FreightPrice decimal Freight price
DomesticFreightPrice decimal Domestic freight price
AdditionalPrice decimal Additional price
GateFromLocation string Name of the gate where the shipment departs from
GateToLocation string Name of the gate where the shipment is supposed to be delivered to
NumberOfFreightPalletPlaces decimal Number of pallet places required for the shipment
TripRegistrationNumber string Registration number of the trip
FreightPriceCurrencyCode string Current code of the freight price
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 internal order id
OrderNumber string Order number
CustomerNumber string Customer number
ContainerId int Ongoing internal id of the container
GoodsCategoryName string Name of goods category type
GoodsCategoryCode string Code of goods category 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 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 internal id of the shipment
LabelId string Label id
PalletIndex int Pallet index
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
InboundShipmentOrderNumber string Inbound shipment order number
InboundShipmentCustomerNumber string Inbound shipment customer number
InboundShipmentId int Ongoing internal id of the inbound shipment
PalletItemOwnerCode string Code of the pallet item's owner
PalletItemId int Ongoing internal id of the container item (pallet item)
LoadMeters decimal Number of load meters
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 SMS
NotifyBySms bool True if the customer should be notified by the transporter through e-mail
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's 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