| GET | /api/receivingAdvice/type/{Type} | Get paged ReceivingAdvice response by ReceivingAdvice 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.ReceivingAdvice;
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.ReceivingAdvice
{
///<summary>
///Receiving Advice
///</summary>
[Api(Description="Receiving Advice")]
[ApiResponse(Description="Paged ReceivingAdvice response by ReceivingAdvice type", IsDefaultResponse=true, StatusCode=200)]
public partial class GetReceivingAdviceByType
{
///<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>
///ReceivingAdvice type to be returned
///</summary>
[ApiMember(Description="ReceivingAdvice type to be returned", ExcludeInSchema=true, ParameterType="path")]
public virtual string Type { get; set; }
}
}
C# GetReceivingAdviceByType 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/receivingAdvice/type/{Type} HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"startIndex":0,"endIndex":0,"numberOfRecordsReturned":0,"totalNumberOfPages":0,"totalNumberOfRecords":0,"results":[{}]}