| POST | /api/itemDataNotification/search | Search item data notification based on search parameters |
|---|
"use strict";
/** @typedef {'ASC'|'DESC'} */
export var ORDER;
(function (ORDER) {
ORDER["ASC"] = "ASC"
ORDER["DESC"] = "DESC"
})(ORDER || (ORDER = {}));
export class SearchItemDataNotificationQuery {
/** @param {{receiverGln?:string,senderGln?:string,partnerGln?:string[],requestedPage?:number,numberOfRecordsPerPage?:number,continuationToken?:string,categoryCode?:string,identifier?:string,tradeItemDescription?:string,gtin?:string,orderBy?:string,order?:ORDER}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
receiverGln;
/** @type {string} */
senderGln;
/** @type {string[]} */
partnerGln = [];
/** @type {number} */
requestedPage;
/** @type {number} */
numberOfRecordsPerPage;
/** @type {string} */
continuationToken;
/** @type {string} */
categoryCode;
/** @type {string} */
identifier;
/** @type {string} */
tradeItemDescription;
/** @type {string} */
gtin;
/** @type {string} */
orderBy;
/** @type {ORDER} */
order;
}
export class SearchItemDataNotification {
/** @param {{query?:SearchItemDataNotificationQuery}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {SearchItemDataNotificationQuery}
* @description Search query */
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 = [];
}
/** @typedef T {any} */
export class PagedQueryResponseWithToken extends PagedQueryResult {
/** @param {{continuationToken?:string,startIndex?:number,endIndex?:number,numberOfRecordsReturned?:number,totalNumberOfPages?:number,totalNumberOfRecords?:number,results?:ResultItem<ClaimMessage>[]}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
continuationToken;
}
JavaScript SearchItemDataNotification DTOs
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/itemDataNotification/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,
senderGln: String,
partnerGln:
[
String
],
requestedPage: 0,
numberOfRecordsPerPage: 0,
continuationToken: String,
categoryCode: String,
identifier: String,
tradeItemDescription: String,
gtin: String,
orderBy: String,
order: ASC
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
continuationToken: String,
startIndex: 0,
endIndex: 0,
numberOfRecordsReturned: 0,
totalNumberOfPages: 0,
totalNumberOfRecords: 0,
results:
[
{
}
]
}