GetInvoiceHeaders


 

Overview

Quick Links

Retrieves Invoice Headers from the system based on a set of criteria. The headers contain information about the invoice, but not the actual content of the invoice. The actual content can be retrieved using the GetInvoiceDetails call.


Resource Information



Request FormatXML
Response FormatXML

Request Header

NameTypeDescription
StringStringAuthentication Token

Request Body

NameTypeDescription
billingPeriodDateStringSelect invoices covering this date. This should be in the format YYYY-MM-DD'T'HH:mm:SS
customerCodeStringThe customerCode to filter on. This works as a contains, that is: if we filter on "1", a customer with code "12" will also match.
calculatedSinceDateStringSelect only invoices with a lastCalculatedDate greater than or equal to the date specified here. This should be in the format YYYY-MM-DD'T'HH:mm:SS
includedStatusesList of InvoiceStatusEnumsSelect only invoices with a status contained in this list

Response

NameTypeDescription
ResultList of InvoiceHeadersThe actual result. A list of Invoice Headers meeting the specified criteria.
ResultCodeStringString indicating the result. Either "Success" or "Error".
ResultMessageStringEmpty when call successful, error message otherwise.

In the case of an internal unhandled fault, a Fault object is returned instead. Providing information on what occurred exactly.

Examples

Request

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
 <Header xmlns:s="System"><s:String>72318cf3-f55d-4c93-ae52-a854336588ce</s:String></Header>
 <Body>
 <GetInvoiceHeaders xmlns="http://tempuri.org/">
 <billingPeriodDate>2014-11-05T00:00:00</billingPeriodDate>
 <customerCode>1</customerCode>
 <calculatedSinceDate>2014-11-07T12:00:00</calculatedSinceDate>
 <includedStatuses>
 <InvoiceStatusEnum xmlns="http://schemas.datacontract.org/2004/07/Kolonel.Public.Service.API.Contracts.V1_0">INVOICED_OK</InvoiceStatusEnum>
 <InvoiceStatusEnum xmlns="http://schemas.datacontract.org/2004/07/Kolonel.Public.Service.API.Contracts.V1_0">CALCULATED_OK</InvoiceStatusEnum>
 </includedStatuses>
 </GetInvoiceHeaders>
 </Body>
</Envelope>

Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
 <s:Body>
 <GetInvoiceHeadersResponse xmlns="http://tempuri.org/">
 <GetInvoiceHeadersResult xmlns:a="http://schemas.datacontract.org/2004/07/Kolonel.Public.Service.API.Contracts.V1_0" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
 <a:Result>
 <a:InvoiceHeader>
 <a:ApprovalDate/>
 <a:BillingPeriodEnd>2014-11-30T23:59:59.999+01:00</a:BillingPeriodEnd>
 <a:BillingPeriodStart>2014-11-01T00:00:00.000+01:00</a:BillingPeriodStart>
 <a:CustomerClusterId>534e2c8eef4f8953d0a476f6</a:CustomerClusterId>
 <a:CustomerCode>1</a:CustomerCode>
 <a:CustomerId>53495858ef4f894064e4d0cd</a:CustomerId>
 <a:Id>5454069f5f568a02741a4890</a:Id>
 <a:InvoiceDate>2014-12-17T23:08:21.547+01:00</a:InvoiceDate>
 <a:InvoiceNumber i:nil="true"/>
 <a:InvoiceStatus>INVOICED_OK</a:InvoiceStatus>
 <a:LastCalculatedCostTotal>113.0666</a:LastCalculatedCostTotal>
 <a:LastCalculatedTotal>260.63108</a:LastCalculatedTotal>
 <a:LastCalculationFinishDate>2014-12-17T23:07:59.156+01:00</a:LastCalculationFinishDate>
 <a:LastInvoiceRunDate>2014-12-17T23:08:21.547+01:00</a:LastInvoiceRunDate>
 </a:InvoiceHeader>
 <a:InvoiceHeader>
 <a:BillingPeriodEnd>2014-11-30T23:59:59.999+01:00</a:BillingPeriodEnd>
 <a:BillingPeriodStart>2014-11-01T00:00:00.000+01:00</a:BillingPeriodStart>
 <a:CustomerClusterId>53f45dac6fdaeb061c4ff5f9</a:CustomerClusterId>
 <a:CustomerCode>1122</a:CustomerCode>
 <a:CustomerId>53f4619e6fdaeb061c4ff62a</a:CustomerId>
 <a:Id>545408ce5f568a02741ac9bf</a:Id>
 <a:InvoiceDate>2014-12-17T23:18:54.125+01:00</a:InvoiceDate>
 <a:InvoiceNumber i:nil="true"/>
 <a:InvoiceStatus>INVOICED_OK</a:InvoiceStatus>
 <a:LastCalculatedCostTotal>151.19087</a:LastCalculatedCostTotal>
 <a:LastCalculatedTotal>323.00987</a:LastCalculatedTotal>
 <a:LastCalculationFinishDate>2014-12-17T23:18:07.328+01:00</a:LastCalculationFinishDate>
 <a:LastInvoiceRunDate>2014-12-17T23:18:54.125+01:00</a:LastInvoiceRunDate>
 </a:InvoiceHeader>
 <a:InvoiceHeader>
 <a:BillingPeriodEnd>2014-11-30T23:59:59.999+01:00</a:BillingPeriodEnd>
 <a:BillingPeriodStart>2014-10-01T00:00:00.000+02:00</a:BillingPeriodStart>
 <a:CustomerClusterId>53f45dc66fdaeb061c4ff5fe</a:CustomerClusterId>
 <a:CustomerCode>12A</a:CustomerCode>
 <a:CustomerId>53f464e177664c0ed0cbdc82</a:CustomerId>
 <a:Id>54636aa95f568a02740e36c9</a:Id>
 <a:InvoiceDate>2014-12-17T23:20:05.305+01:00</a:InvoiceDate>
 <a:InvoiceNumber i:nil="true"/>
 <a:InvoiceStatus>INVOICED_OK</a:InvoiceStatus>
 <a:LastCalculatedCostTotal>377.40235</a:LastCalculatedCostTotal>
 <a:LastCalculatedTotal>816.93359</a:LastCalculatedTotal>
 <a:LastCalculationFinishDate>2014-12-17T23:18:55.688+01:00</a:LastCalculationFinishDate>
 <a:LastInvoiceRunDate>2014-12-17T23:20:05.305+01:00</a:LastInvoiceRunDate>
 </a:InvoiceHeader>
 <a:InvoiceHeader>
 <a:ApprovalDate/>
 <a:BillingPeriodEnd>2014-11-30T23:59:59.999+01:00</a:BillingPeriodEnd>
 <a:BillingPeriodStart>2014-11-01T00:00:00.000+01:00</a:BillingPeriodStart>
 <a:CustomerClusterId>53f45d166fdaeb061c4ff5f5</a:CustomerClusterId>
 <a:CustomerCode>1325</a:CustomerCode>
 <a:CustomerId>53f465896fdaeb061c4ff649</a:CustomerId>
 <a:Id>545409055f568a02741adf46</a:Id>
 <a:InvoiceDate>2014-12-17T23:20:02.977+01:00</a:InvoiceDate>
 <a:InvoiceNumber i:nil="true"/>
 <a:InvoiceStatus>INVOICED_OK</a:InvoiceStatus>
 <a:LastCalculatedCostTotal>165.68712</a:LastCalculatedCostTotal>
 <a:LastCalculatedTotal>352.87028999999995</a:LastCalculatedTotal>
 <a:LastCalculationFinishDate>2014-12-17T23:19:17.297+01:00</a:LastCalculationFinishDate>
 <a:LastInvoiceRunDate>2014-12-17T23:20:02.977+01:00</a:LastInvoiceRunDate>
 </a:InvoiceHeader>
 </a:Result>
 <a:ResultCode>Success</a:ResultCode>
 <a:ResultMessage/>
 </GetInvoiceHeadersResult>
 </GetInvoiceHeadersResponse>
 </s:Body>
</s:Envelope>