| GET | /api/invoice/type/{Type} | Get paged invoice response by type |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using DX.STF.Application.ClientApi.Messages.Invoice;
using DX.Framework.Core.Querying;
namespace DX.Framework.Core.Querying
{
public partial class PagedQueryResult<T>
{
public virtual long StartIndex { get; set; }
public virtual long EndIndex { get; set; }
public virtual int NumberOfRecordsReturned { get; set; }
public virtual int TotalNumberOfPages { get; set; }
public virtual long TotalNumberOfRecords { get; set; }
public virtual List<ResultItem<ClaimMessage>> Results { get; set; } = [];
}
}
namespace DX.STF.Application.ClientApi.Messages.Invoice
{
///<summary>
///Invoice
///</summary>
[Api(Description="Invoice")]
[ApiResponse(Description="Paged invoice response by type", IsDefaultResponse=true, StatusCode=200)]
public partial class GetInvoiceByType
{
///<summary>
///Not used
///</summary>
[ApiMember(Description="Not used")]
public virtual string SearchTerm { get; set; }
///<summary>
///Requested page number, starting at 1
///</summary>
[ApiMember(Description="Requested page number, starting at 1")]
public virtual int RequestedPage { get; set; }
///<summary>
///Number of records to return on a page
///</summary>
[ApiMember(Description="Number of records to return on a page")]
public virtual int NumberOfRecordsPerPage { get; set; }
///<summary>
///Invoice type to be returned
///</summary>
[ApiMember(Description="Invoice type to be returned", ExcludeInSchema=true, ParameterType="path")]
public virtual string Type { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/invoice/type/{Type} HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
startIndex: 0,
endIndex: 0,
numberOfRecordsReturned: 0,
totalNumberOfPages: 0,
totalNumberOfRecords: 0,
results:
[
{
}
]
}