| POST | /api/claim/search | Search for claims based on parameters |
|---|
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.Claim;
using DX.STF.Models.Queries.Claim;
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.Claim
{
///<summary>
///Claim
///</summary>
[Api(Description="Claim")]
[ApiResponse(Description="Claim search results", StatusCode=200)]
public partial class SearchClaim
{
[ApiMember(ParameterType="model")]
public virtual SearchClaimQuery Query { get; set; }
}
}
namespace DX.STF.Models.Queries.Claim
{
public partial class _Buyer
: IBuyer
{
public virtual string Gln { get; set; }
}
public partial class _ClaimNotification
: IClaimNotification
{
public virtual string EntityIdentification { get; set; }
}
public partial class _Invoice
: IInvoice
{
public virtual string EntityIdentification { get; set; }
}
public partial class SearchClaimQuery
{
public virtual string ReceiverGln { get; set; }
public virtual DateTime FromDate { get; set; }
public virtual DateTime ToDate { get; set; }
public virtual string ClaimsNotificationTypeCode { get; set; }
public virtual string ClaimsNotificationIdentification { get; set; }
public virtual _Buyer Buyer { get; set; }
public virtual _ClaimNotification ClaimNotification { get; set; }
public virtual _Invoice Invoice { get; set; }
public virtual bool ExcludeLinkedToCreditNote { get; set; }
public virtual string SenderGln { get; set; }
public virtual List<string> PartnerGln { get; set; } = [];
public virtual int RequestedPage { get; set; }
public virtual int NumberOfRecordsPerPage { 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.
POST /api/claim/search HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
query:
{
receiverGln: String,
claimsNotificationTypeCode: String,
claimsNotificationIdentification: String,
buyer:
{
gln: String
},
claimNotification:
{
entityIdentification: String
},
invoice:
{
entityIdentification: String
},
excludeLinkedToCreditNote: False,
senderGln: String,
partnerGln:
[
String
],
requestedPage: 0,
numberOfRecordsPerPage: 0
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
startIndex: 0,
endIndex: 0,
numberOfRecordsReturned: 0,
totalNumberOfPages: 0,
totalNumberOfRecords: 0,
results:
[
{
}
]
}