DX STF Client API

<back to all web services

GetInvoiceByDateRange

Invoice Requests

Invoice

Requires Authentication
The following routes are available for this service:
GET/api/invoice/from/{FromDate}/to/{ToDate}Get invoice between start and end date
import Foundation
import ServiceStack

/**
* Invoice
*/
// @Api(Description="Invoice")
// @ApiResponse(Description="Paged invoice response between start and end date", IsDefaultResponse=true, StatusCode=200)
public class GetInvoiceByDateRange : Codable
{
    /**
    * Requested page number, starting at 1
    */
    // @ApiMember(Description="Requested page number, starting at 1")
    public var requestedPage:Int

    /**
    * Number of records to return on a page
    */
    // @ApiMember(Description="Number of records to return on a page")
    public var numberOfRecordsPerPage:Int

    /**
    * From Date Time
    */
    // @ApiMember(Description="From Date Time", ParameterType="path")
    public var fromDate:Date

    /**
    * To Date Time
    */
    // @ApiMember(Description="To Date Time", ParameterType="path")
    public var toDate:Date

    required public init(){}
}

public class PagedQueryResult<T : Codable> : Codable
{
    public var startIndex:Int
    public var endIndex:Int
    public var numberOfRecordsReturned:Int
    public var totalNumberOfPages:Int
    public var totalNumberOfRecords:Int
    public var results:[ResultItem<ClaimMessage>] = []

    required public init(){}
}


Swift GetInvoiceByDateRange DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/invoice/from/{FromDate}/to/{ToDate} HTTP/1.1 
Host: stf-api-uat.data-xchange.co.za 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"startIndex":0,"endIndex":0,"numberOfRecordsReturned":0,"totalNumberOfPages":0,"totalNumberOfRecords":0,"results":[{}]}