DX STF Client API

<back to all web services

SearchSenderInvoice

Invoice Requests

Invoice

Requires Authentication
The following routes are available for this service:
POST/api/invoice/search/senderSearch invoice based on search parameters

export enum ORDER
{
    ASC = 'ASC',
    DESC = 'DESC',
}

export class SearchInvoiceByDateFilter implements ISearchInvoiceByDateFilter
{
    public fromDate: string;
    public toDate: string;
    public continuationToken: string;
    public requestedPage: number;
    public numberOfRecordsPerPage: number;
    public orderBy: string;
    public order: ORDER;

    public constructor(init?: Partial<SearchInvoiceByDateFilter>) { (Object as any).assign(this, init); }
}

/** @description Invoice */
// @Api(Description="Invoice")
// @ApiResponse(Description="Paged Purchase data", IsDefaultResponse=true, ResponseType="typeof(DX.STF.Models.Queries.QueryResult.PagedQueryResponseWithToken`1[[DX.Framework.Core.Querying.ResultItem`1[[DX.STF.Models.Dto.GS1.InvoiceMessage, DX.STF.Models, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], DX.Framework.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]])", StatusCode=200)
export class SearchSenderInvoice
{
    /** @description Search query */
    // @ApiMember(Description="Search query", ParameterType="model")
    public query: SearchInvoiceByDateFilter;

    public constructor(init?: Partial<SearchSenderInvoice>) { (Object as any).assign(this, init); }
}

export class PagedQueryResult<T>
{
    public startIndex: number;
    public endIndex: number;
    public numberOfRecordsReturned: number;
    public totalNumberOfPages: number;
    public totalNumberOfRecords: number;
    public results: ResultItem<ClaimMessage>[] = [];

    public constructor(init?: Partial<PagedQueryResult<T>>) { (Object as any).assign(this, init); }
}

export class PagedQueryResponseWithToken<T> extends PagedQueryResult<ResultItem<InvoiceMessage>>
{
    public continuationToken: string;

    public constructor(init?: Partial<PagedQueryResponseWithToken<T>>) { super(init); (Object as any).assign(this, init); }
}

TypeScript SearchSenderInvoice DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /api/invoice/search/sender HTTP/1.1 
Host: stf-api-uat.data-xchange.co.za 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"query":{"continuationToken":"String","requestedPage":0,"numberOfRecordsPerPage":0,"orderBy":"String","order":"ASC"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

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