| POST | /api/claim/search | Search for claims based on parameters |
|---|
"use strict";
export class _Buyer {
/** @param {{gln?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
gln;
}
export class _ClaimNotification {
/** @param {{entityIdentification?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
entityIdentification;
}
export class _Invoice {
/** @param {{entityIdentification?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
entityIdentification;
}
export class SearchClaimQuery {
/** @param {{receiverGln?:string,fromDate?:string,toDate?:string,claimsNotificationTypeCode?:string,claimsNotificationIdentification?:string,buyer?:_Buyer,claimNotification?:_ClaimNotification,invoice?:_Invoice,excludeLinkedToCreditNote?:boolean,senderGln?:string,partnerGln?:string[],requestedPage?:number,numberOfRecordsPerPage?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
receiverGln;
/** @type {string} */
fromDate;
/** @type {string} */
toDate;
/** @type {string} */
claimsNotificationTypeCode;
/** @type {string} */
claimsNotificationIdentification;
/** @type {_Buyer} */
buyer;
/** @type {_ClaimNotification} */
claimNotification;
/** @type {_Invoice} */
invoice;
/** @type {boolean} */
excludeLinkedToCreditNote;
/** @type {string} */
senderGln;
/** @type {string[]} */
partnerGln = [];
/** @type {number} */
requestedPage;
/** @type {number} */
numberOfRecordsPerPage;
}
export class SearchClaim {
/** @param {{query?:SearchClaimQuery}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {SearchClaimQuery} */
query;
}
/** @typedef T {any} */
export class PagedQueryResult {
/** @param {{startIndex?:number,endIndex?:number,numberOfRecordsReturned?:number,totalNumberOfPages?:number,totalNumberOfRecords?:number,results?:ResultItem<ClaimMessage>[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
startIndex;
/** @type {number} */
endIndex;
/** @type {number} */
numberOfRecordsReturned;
/** @type {number} */
totalNumberOfPages;
/** @type {number} */
totalNumberOfRecords;
/** @type {ResultItem<ClaimMessage>[]} */
results = [];
}
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:
[
{
}
]
}