GetInvoices

Note: this call is deprecated. Our automation API has a call named GetInvoicesByQuery, please use that instead.

Ongoing WMS has an invoicing module which the warehouse can use to create invoices for its customers. This function can be used to retrieve those invoices. The intended use-case is for an accounting package to be able to integrate with Ongoing WMS, so that the invoices can be easily transferred automatically from Ongoing WMS to the accounting package.

An invoice consists of several invoice rows. In turn, each invoice row was created either manually by a user, or it was computed automatically using statistics. You can tell the difference using the IStatistics (sic) field.

As an example, consider a warehouse that wants to bill its 3PL customer in two ways:

  1. They want to charge $5 for every order that they picked.
  2. When picking very bulky orders, they need to get a special forklift out, and they want to bill the customer an additional $50 extra for this every time.
The first charge is a typical example of something that would be set up as a statistics charge in Ongoing WMS. The second one is a typical example of a manual charge.

Tags: GetInvoices , query, GetInvoicesResult, Invoice, GoodsOwner, InvoiceRow, InvoiceArticle

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

<?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>
    <GetInvoices xmlns="http://ongoingsystems.se/WSI">
      <UserName>string</UserName>
      <Password>string</Password>
      <query>
        <GetInvoiceRows>boolean</GetInvoiceRows>
        <InvoiceDateFrom>dateTime</InvoiceDateFrom>
        <InvoiceDateTo>dateTime</InvoiceDateTo>
        <GetInvoiceId>
          <int>int</int>
          <int>int</int>
        </GetInvoiceId>
        <IsExported>boolean</IsExported>
        <InvoiceExportedDateFrom>dateTime</InvoiceExportedDateFrom>
        <InvoiceExportedDateTo>dateTime</InvoiceExportedDateTo>
      </query>
    </GetInvoices>
  </soap:Body>
</soap:Envelope>

Request specification

GetInvoices
UserName str(50) Req. Your username
Password str(50) Req. Your password
query object Req. An element of type query.
query
GetInvoiceRows bool True if you want the function to return information about the invoice rows as well.
InvoiceDateFrom datetime Filter for the lower bound of the invoice creation date.
InvoiceDateTo datetime Filter for the upper bound of the invoice creation date.
GetInvoiceId int[] Only return information about these invoice ids.
IsExported bool True if you want to filter for invoices which have been marked as exported, or false if you only want invoices which haven't been marked as exported.
InvoiceExportedDateFrom datetime Filter for the invoice export date (from).
InvoiceExportedDateTo datetime Filter for the invoice export date (to).

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: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>
    <GetInvoicesResponse xmlns="http://ongoingsystems.se/WSI">
      <GetInvoicesResult>
        <Invoices>
          <Invoice>
            <GoodsOwner>
              <GoodsOwnerIdentification>string</GoodsOwnerIdentification>
              <GoodsOwnerCode>string</GoodsOwnerCode>
              <GoodsOwnerId>int</GoodsOwnerId>
              <FinancialCode>string<FinancialCode>
              <GoodsLocationCode>string</GoodsLocationCode>
              <GoodsOwnerReference>string</GoodsOwnerReference>
              <GoodsOwnerInvoiceCurrencyCode>string</GoodsOwnerInvoiceCurrencyCode>
            </GoodsOwner>
            <InvoiceRows>
              <InvoiceRow>
                <InvoiceRowId>int</InvoiceRowId>
                <Price>decimal</Price>
                <UnitPrice>decimal</UnitPrice>
                <Currency>string</Currency>
                <IsTentative>boolean</IsTentative>
                <IStatistics>boolean</IStatistics>
                <IsFormula>boolean</IsFormula>
                <NumberOfItems>decimal</NumberOfItems>
                <ContainerBatch>string</ContainerBatch>
                <ActionDate>datetime</ActionDate>
                <RowReference>string</RowReference>
                <RowComment>string</RowComment>
                <ProiftCenterTitle>string</ProiftCenterTitle>
                <ProiftCenterCode>string</ProiftCenterCode>
                <OrderNumber>string</OrderNumber>
                <OrderConsigneeName>string</OrderConsigneeName>
                <OrderId>int</OrderId>
                <OrderConsigneeId>int</OrderConsigneeId>
                <OrderDeliveryDate>datetime</OrderDeliveryDate>
                <OrderReferenceNumber>string</OrderReferenceNumber>
                <OrderConsigneeCountryName>string</OrderConsigneeCountryName>
                <OrderConsigneeCountryCode>string</OrderConsigneeCountryCode>
                <TotalOrderCharges>decimal</TotalOrderCharges>
                <OrderConsigneePostCode>string</OrderConsigneePostCode>
                <OrderRemark>string</OrderRemark>
                <OrderWaybill>string</OrderWaybill>
                <OrderTransporterName>string</OrderTransporterName>
                <ExternalInvoiceRowId>string</ExternalInvoiceRowId>
                <InvoiceArticle>
                  <Code>string</Code>
                  <Title>string</Title>
                  <Account>string</Account>
                </InvoiceArticle>
                <IsCalculatedIncome>boolean</IsCalculatedIncome>
                <InOrderId>int</InOrderId>
                <ProductionOrderId>int</ProductionOrderId>
              </InvoiceRow>
              <InvoiceRow>
                <InvoiceRowId>int</InvoiceRowId>
                <Price>decimal</Price>
                <UnitPrice>decimal</UnitPrice>
                <Currency>string</Currency>
                <IsTentative>boolean</IsTentative>
                <IStatistics>boolean</IStatistics>
                <IsFormula>boolean</IsFormula>
                <NumberOfItems>decimal</NumberOfItems>
                <ContainerBatch>string</ContainerBatch>
                <ActionDate>datetime</ActionDate>
                <RowReference>string</RowReference>
                <RowComment>string</RowComment>
                <ProiftCenterTitle>string</ProiftCenterTitle>
                <ProiftCenterCode>string</ProiftCenterCode>
                <OrderNumber>string</OrderNumber>
                <OrderConsigneeName>string</OrderConsigneeName>
                <OrderId>int</OrderId>
                <OrderConsigneeId>int</OrderConsigneeId>
                <OrderDeliveryDate>datetime</OrderDeliveryDate>
                <OrderReferenceNumber>string</OrderReferenceNumber>
                <OrderConsigneeCountryName>string</OrderConsigneeCountryName>
                <OrderConsigneeCountryCode>string</OrderConsigneeCountryCode>
                <TotalOrderCharges>decimal</TotalOrderCharges>
                <OrderConsigneePostCode>string</OrderConsigneePostCode>
                <OrderRemark>string</OrderRemark>
                <OrderWaybill>string</OrderWaybill>
                <OrderTransporterName>string</OrderTransporterName>
                <ExternalInvoiceRowId>string</ExternalInvoiceRowId>
                <InvoiceArticle>
                  <Code>string</Code>
                  <Title>string</Title>
                  <Account>string</Account>
                </InvoiceArticle>
                <IsCalculatedIncome>boolean</IsCalculatedIncome>
                <InOrderId>int</InOrderId>
                <ProductionOrderId>int</ProductionOrderId>
              </InvoiceRow>
            </InvoiceRows>
            <InvoiceNumber>string</InvoiceNumber>
            <InvoiceId>int</InvoiceId>
            <Title>string</Title>
            <InvoiceDate>dateTime</InvoiceDate>
            <InvoicePeriodStart>dateTime</InvoicePeriodStart>
            <InvoicePeriodEnd>dateTime</InvoicePeriodEnd>
            <InvoiceAmount>decimal</InvoiceAmount>
            <IsExported>boolean</IsExported>
            <ShipmentId>int</ShipmentId>
            <InvoiceYourOrderNumber>string</InvoiceYourOrderNumber>
            <InvoiceYourReference>string</InvoiceYourReference>
            <PayerOrganisationId>int</PayerOrganisationId>
          </Invoice>
          <Invoice>
            <GoodsOwner>
              <GoodsOwnerIdentification>string</GoodsOwnerIdentification>
              <GoodsOwnerCode>string</GoodsOwnerCode>
              <GoodsOwnerId>int</GoodsOwnerId>
              <FinancialCode>string<FinancialCode>
              <GoodsLocationCode>string</GoodsLocationCode>
              <GoodsOwnerReference>string</GoodsOwnerReference>
              <GoodsOwnerInvoiceCurrencyCode>string</GoodsOwnerInvoiceCurrencyCode>
            </GoodsOwner>
            <InvoiceRows>
              <InvoiceRow>
                <InvoiceRowId>int</InvoiceRowId>
                <Price>decimal</Price>
                <UnitPrice>decimal</UnitPrice>
                <Currency>string</Currency>
                <IsTentative>boolean</IsTentative>
                <IStatistics>boolean</IStatistics>
                <IsFormula>boolean</IsFormula>
                <NumberOfItems>decimal</NumberOfItems>
                <ContainerBatch>string</ContainerBatch>
                <ActionDate>datetime</ActionDate>
                <RowReference>string</RowReference>
                <RowComment>string</RowComment>
                <ProiftCenterTitle>string</ProiftCenterTitle>
                <ProiftCenterCode>string</ProiftCenterCode>
                <OrderNumber>string</OrderNumber>
                <OrderConsigneeName>string</OrderConsigneeName>
                <OrderId>int</OrderId>
                <OrderConsigneeId>int</OrderConsigneeId>
                <OrderDeliveryDate>datetime</OrderDeliveryDate>
                <OrderReferenceNumber>string</OrderReferenceNumber>
                <OrderConsigneeCountryName>string</OrderConsigneeCountryName>
                <OrderConsigneeCountryCode>string</OrderConsigneeCountryCode>
                <TotalOrderCharges>decimal</TotalOrderCharges>
                <OrderConsigneePostCode>string</OrderConsigneePostCode>
                <OrderRemark>string</OrderRemark>
                <OrderWaybill>string</OrderWaybill>
                <OrderTransporterName>string</OrderTransporterName>
                <ExternalInvoiceRowId>string</ExternalInvoiceRowId>
                <InvoiceArticle>
                  <Code>string</Code>
                  <Title>string</Title>
                  <Account>string</Account>
                </InvoiceArticle>
                <IsCalculatedIncome>boolean</IsCalculatedIncome>
                <InOrderId>int</InOrderId>
                <ProductionOrderId>int</ProductionOrderId>
              </InvoiceRow>
              <InvoiceRow>
                <InvoiceRowId>int</InvoiceRowId>
                <Price>decimal</Price>
                <UnitPrice>decimal</UnitPrice>
                <Currency>string</Currency>
                <IsTentative>boolean</IsTentative>
                <IStatistics>boolean</IStatistics>
                <IsFormula>boolean</IsFormula>
                <NumberOfItems>decimal</NumberOfItems>
                <ContainerBatch>string</ContainerBatch>
                <ActionDate>datetime</ActionDate>
                <RowReference>string</RowReference>
                <RowComment>string</RowComment>
                <ProiftCenterTitle>string</ProiftCenterTitle>
                <ProiftCenterCode>string</ProiftCenterCode>
                <OrderNumber>string</OrderNumber>
                <OrderConsigneeName>string</OrderConsigneeName>
                <OrderId>int</OrderId>
                <OrderConsigneeId>int</OrderConsigneeId>
                <OrderDeliveryDate>datetime</OrderDeliveryDate>
                <OrderReferenceNumber>string</OrderReferenceNumber>
                <OrderConsigneeCountryName>string</OrderConsigneeCountryName>
                <OrderConsigneeCountryCode>string</OrderConsigneeCountryCode>
                <TotalOrderCharges>decimal</TotalOrderCharges>
                <OrderConsigneePostCode>string</OrderConsigneePostCode>
                <OrderRemark>string</OrderRemark>
                <OrderWaybill>string</OrderWaybill>
                <OrderTransporterName>string</OrderTransporterName>
                <ExternalInvoiceRowId>string</ExternalInvoiceRowId>
                <InvoiceArticle>
                  <Code>string</Code>
                  <Title>string</Title>
                  <Account>string</Account>
                </InvoiceArticle>
                <IsCalculatedIncome>boolean</IsCalculatedIncome>
                <InOrderId>int</InOrderId>
                <ProductionOrderId>int</ProductionOrderId>
              </InvoiceRow>
            </InvoiceRows>
            <InvoiceNumber>string</InvoiceNumber>
            <InvoiceId>int</InvoiceId>
            <Title>string</Title>
            <InvoiceDate>dateTime</InvoiceDate>
            <InvoicePeriodStart>dateTime</InvoicePeriodStart>
            <InvoicePeriodEnd>dateTime</InvoicePeriodEnd>
            <InvoiceAmount>decimal</InvoiceAmount>
            <IsExported>boolean</IsExported>
            <ShipmentId>int</ShipmentId>
            <InvoiceYourOrderNumber>string</InvoiceYourOrderNumber>
            <InvoiceYourReference>string</InvoiceYourReference>
            <PayerOrganisationId>int</PayerOrganisationId>
          </Invoice>
        </Invoices>
      </GetInvoicesResult>
    </GetInvoicesResponse>
  </soap:Body>
</soap:Envelope>

Response specification

GetInvoicesResult
Invoices Invoice[] List of invoices matching the filter.
Invoice
GoodsOwner object Contains information about which goodsowner the invoice belongs to, see GoodsOwner.
InvoiceRows object A list of InvoiceRows.
InvoiceNumber str(50) Invoice number.
InvoiceId int Ongoing WMS' unique internal id for the invoice.
Title str(500) The title of the invoice.
InvoiceDate datetime The date when the invoice was created.
InvoicePeriodStart datetime The start date of the invoice period.
InvoicePeriodEnd datetime The end date of the invoice period.
InvoiceAmount dec The total amount of money on the invoice.
IsExported bool Whether or not the invoice has been exported to an external system.
ShipmentId int Obsolete, do not use.
InvoiceYourOrderNumber str(200) The external order number reference.
InvoiceYourReference str(300) The external invoice reference.
PayerOrganisationId int The id of the organization which the invoice belongs to.
GoodsOwner
GoodsOwnerIdentification string Obsolete, do not use.
GoodsOwnerCode string The name of the goods owner.
GoodsOwnerId int The internal Ongoing WMS id of the goods owner.
FinancialCode string Goods owner's financial code.
GoodsLocationCode string Goods owner's location code.
GoodsOwnerReference string Goods owner reference.
GoodsOwnerInvoiceCurrencyCode string The invoice which is used for the goods owner's invoices.
InvoiceRow
InvoiceRowId int Ongoing WMS' internal unique id for this invoice row.
Price dec The price for this invoice row.
UnitPrice dec The unit price. You should generally have Price = UnitPrice * NumberOfItems.
Currency str The currency.
IsTentative bool Whether or not this charge is mandatory to have on an invoice. Note that "tentative" is a misspelling and should be "mandatory".
IStatistics bool Whether or not this charge was computed using statistics.
IsFormula bool Whether or not this charge was priced using a formula.
NumberOfItems dec The number of items which have been charged on this row.
ContainerBatch str Container number or batch number.
ActionDate datetime The time when the charge was added.
RowReference str Row reference.
RowComment str Row comment.
ProiftCenterTitle str Obsolete, do not use.
ProiftCenterCode str The code of the charge.
OrderNumber str The order number (if the charge was due to an order).
OrderConsigneeName str The consignee name on the order (if the charge was due to an order).
OrderId int The order id (if the charge was due to an order).
OrderConsigneeId int The consignee id (if the charge was due to an order).
OrderDeliveryDate datetime The delivery date of the order (if the charge was due to an order).
OrderReferenceNumber str The reference number of the order (if the charge was due to an order).
OrderConsigneeCountryName str The consignee's country name (if the charge was due to an order).
OrderConsigneeCountryCode str The consignee's country code (if the charge was due to an order).
TotalOrderCharges dec Obsolete, do not use.
OrderConsigneePostCode str The consignee's post code (if the charge was due to an order).
OrderRemark str The order remark (if the charge was due to an order).
OrderWaybill str The order waybill (if the charge was due to an order).
OrderTransporterName str The order transporter (if the charge was due to an order).
ExternalInvoiceRowId str Obsolete, do not use.
InvoiceArticle object An object of type InvoiceArticle.
IsCalculatedIncome bool Obsolete, do not use.
InOrderId int The inorder id (if the charge was due to an inorder/purchase order).
ProductionOrderId int The production order id (if the charge was due to an production order).
InvoiceArticle
Code str The code of the charge.
Title str The title of the charge.
Account str The account which the charge belongs to.