| POST | /api/claim/search | Search for claims based on parameters |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
/**
* Claim
*/
@Api(Description="Claim")
@ApiResponse(Description="Claim search results", StatusCode=200)
open class SearchClaim
{
@ApiMember(ParameterType="model")
open var query:SearchClaimQuery? = null
}
open class SearchClaimQuery
{
open var receiverGln:String? = null
open var fromDate:Date? = null
open var toDate:Date? = null
open var claimsNotificationTypeCode:String? = null
open var claimsNotificationIdentification:String? = null
open var buyer:_Buyer? = null
open var claimNotification:_ClaimNotification? = null
open var invoice:_Invoice? = null
open var excludeLinkedToCreditNote:Boolean? = null
open var senderGln:String? = null
open var partnerGln:ArrayList<String> = ArrayList<String>()
open var requestedPage:Int? = null
open var numberOfRecordsPerPage:Int? = null
}
open class _Buyer : IBuyer
{
override var gln:String? = null
}
open class _ClaimNotification : IClaimNotification
{
override var entityIdentification:String? = null
}
open class _Invoice : IInvoice
{
override var entityIdentification:String? = null
}
open class PagedQueryResult<T>
{
open var startIndex:Long? = null
open var endIndex:Long? = null
open var numberOfRecordsReturned:Int? = null
open var totalNumberOfPages:Int? = null
open var totalNumberOfRecords:Long? = null
open var results:ArrayList<ResultItem<ClaimMessage>> = ArrayList<ResultItem<ClaimMessage>>()
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
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/csv
Content-Length: length
{"startIndex":0,"endIndex":0,"numberOfRecordsReturned":0,"totalNumberOfPages":0,"totalNumberOfRecords":0,"results":[{}]}