| GET | /api/settlement | Get un-acknowledged Settlement, oldest first |
|---|
"use strict";
export class GetSettlement {
constructor(init) { Object.assign(this, init) }
}
export class DocumentIdentification {
/** @param {{identifier?:string,type?:string,creationDateAndTime?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
identifier;
/** @type {string} */
type;
/** @type {string} */
creationDateAndTime;
}
export class Identifier {
/** @param {{authority?:string,text?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
authority;
/** @type {string} */
text;
}
export class ContactInformation {
constructor(init) { Object.assign(this, init) }
}
export class Partner {
/** @param {{identifier?:Identifier,contactInformation?:ContactInformation[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Identifier} */
identifier;
/** @type {ContactInformation[]} */
contactInformation = [];
}
export class Header {
/** @param {{documentIdentification?:DocumentIdentification,sender?:Partner,receiver?:Partner}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {DocumentIdentification} */
documentIdentification;
/** @type {Partner} */
sender;
/** @type {Partner} */
receiver;
}
/** @typedef {'ADD'|'CHANGE_BY_REFRESH'|'DELETE'|'REJECTED'} */
export var DocumentAction;
(function (DocumentAction) {
DocumentAction["ADD"] = "ADD"
DocumentAction["CHANGE_BY_REFRESH"] = "CHANGE_BY_REFRESH"
DocumentAction["DELETE"] = "DELETE"
DocumentAction["REJECTED"] = "REJECTED"
})(DocumentAction || (DocumentAction = {}));
/** @typedef {'ADDITIONAL_TRANSMISSION'|'COPY'|'ORIGINAL'} */
export var DocumentStatus;
(function (DocumentStatus) {
DocumentStatus["ADDITIONAL_TRANSMISSION"] = "ADDITIONAL_TRANSMISSION"
DocumentStatus["COPY"] = "COPY"
DocumentStatus["ORIGINAL"] = "ORIGINAL"
})(DocumentStatus || (DocumentStatus = {}));
export class AvpList {
/** @param {{code?:string,value?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
code;
/** @type {string} */
value;
}
export class BaseDocument {
/** @param {{currencyCode?:string,creationDateTime?:string,documentActionCode?:DocumentAction,documentStatusCode?:DocumentStatus,documentStructureVersion?:string,lastUpdateDateTime?:string,revisionNumber?:number,avpList?:AvpList[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
currencyCode;
/** @type {string} */
creationDateTime;
/** @type {DocumentAction} */
documentActionCode;
/** @type {DocumentStatus} */
documentStatusCode;
/** @type {string} */
documentStructureVersion;
/** @type {?string} */
lastUpdateDateTime;
/** @type {?number} */
revisionNumber;
/** @type {AvpList[]} */
avpList = [];
}
export class Ecom_PartyIdentificationType {
/** @param {{gln?:string,name?:string,additionalPartyIdentification?:AvpList[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
gln;
/** @type {string} */
name;
/** @type {AvpList[]} */
additionalPartyIdentification = [];
}
export class CommunicationChannel {
/** @param {{communicationChannelCode?:string,communicationChannelName?:string,communicationValue?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
communicationChannelCode;
/** @type {string} */
communicationChannelName;
/** @type {string} */
communicationValue;
}
export class Contact {
/** @param {{contactTypeCode?:string,personName?:string,departmentName?:string,jobTitle?:string,responsibility?:string,communicationChannel?:CommunicationChannel[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
contactTypeCode;
/** @type {string} */
personName;
/** @type {string} */
departmentName;
/** @type {string} */
jobTitle;
/** @type {string} */
responsibility;
/** @type {CommunicationChannel[]} */
communicationChannel = [];
}
export class Address {
/** @param {{streetAddressOne?:string,streetAddressTwo?:string,streetAddressThree?:string,city?:string,postalCode?:string,provinceCode?:string,countryCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
streetAddressOne;
/** @type {string} */
streetAddressTwo;
/** @type {string} */
streetAddressThree;
/** @type {string} */
city;
/** @type {string} */
postalCode;
/** @type {string} */
provinceCode;
/** @type {string} */
countryCode;
}
export class FinancialRoutingNumber {
/** @param {{number?:string,numberTypeCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
number;
/** @type {string} */
numberTypeCode;
}
export class FinancialAccount {
/** @param {{number?:string,numberTypeCode?:string,name?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
number;
/** @type {string} */
numberTypeCode;
/** @type {string} */
name;
}
export class FinancialInstitutionInformation {
/** @param {{financialInstitutionBranchName?:string,financialInstitutionName?:string,financialRoutingNumber?:FinancialRoutingNumber,financialAccount?:FinancialAccount,swiftCode?:string,exportersCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
financialInstitutionBranchName;
/** @type {string} */
financialInstitutionName;
/** @type {FinancialRoutingNumber} */
financialRoutingNumber;
/** @type {FinancialAccount} */
financialAccount;
/** @type {string} */
swiftCode;
/** @type {string} */
exportersCode;
}
export class TransactionalParty extends Ecom_PartyIdentificationType {
/** @param {{contact?:Contact[],address?:Address,communicationChannel?:AvpList[],financialInstitutionInformation?:FinancialInstitutionInformation,dutyFeeTaxRegistration?:string,entityIdentification?:string,gln?:string,name?:string,additionalPartyIdentification?:AvpList[]}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {Contact[]} */
contact = [];
/** @type {Address} */
address;
/** @type {AvpList[]} */
communicationChannel = [];
/** @type {FinancialInstitutionInformation} */
financialInstitutionInformation;
/** @type {string} */
dutyFeeTaxRegistration;
/** @type {string} */
entityIdentification;
}
export class BillOfLading {
/** @param {{creationDate?:string,revisionNumber?:number,entityIdentification?:string,tagNumbers?:string[],totalBags?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
creationDate;
/** @type {number} */
revisionNumber;
/** @type {string} */
entityIdentification;
/** @type {string[]} */
tagNumbers = [];
/** @type {number} */
totalBags;
}
export class DocumentReference {
/** @param {{creationDateTime?:string,revisionNumber?:number,lineItemNumber?:number,entityIdentification?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
creationDateTime;
/** @type {?number} */
revisionNumber;
/** @type {?number} */
lineItemNumber;
/** @type {string} */
entityIdentification;
}
export class Quantity {
/** @param {{value?:number,measurementUnitCode?:string,codeListVersion?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
value;
/** @type {string} */
measurementUnitCode;
/** @type {string} */
codeListVersion;
}
export class TransactionalItem {
/** @param {{measurementUnitCode?:string,measurementType?:string,measurementValue?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
measurementUnitCode;
/** @type {string} */
measurementType;
/** @type {string} */
measurementValue;
}
export class SerialNumberRange {
/** @param {{maximumValue?:string,minimumValue?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
maximumValue;
/** @type {string} */
minimumValue;
}
export class TransactionalItemDimension {
/** @param {{measurementUnitCode?:string,depth?:string,height?:string,width?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
measurementUnitCode;
/** @type {string} */
depth;
/** @type {string} */
height;
/** @type {string} */
width;
}
export class TransactionalItemLogisticUnitInformation {
/** @param {{numberOfLayers?:number,numberOfUnitsPerLayer?:number,numberOfUnitsPerPallet?:number,packagingTerms?:string,packageTypeCode?:string,maximumStackingFactor?:number,returnablePackageTransportCostPayment?:string,dimensionsOfLogisticUnit?:TransactionalItemDimension[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
numberOfLayers;
/** @type {?number} */
numberOfUnitsPerLayer;
/** @type {?number} */
numberOfUnitsPerPallet;
/** @type {string} */
packagingTerms;
/** @type {string} */
packageTypeCode;
/** @type {?number} */
maximumStackingFactor;
/** @type {string} */
returnablePackageTransportCostPayment;
/** @type {TransactionalItemDimension[]} */
dimensionsOfLogisticUnit = [];
}
export class TransactionalItemDataCarrierAndIdentification {
/** @param {{gs1TransactionalItemIdentificationKey?:string,dataCarrier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
gs1TransactionalItemIdentificationKey;
/** @type {string} */
dataCarrier;
}
export class TradeItemWaste {
/** @param {{wasteIdentification?:string,typeOfWaste?:AvpList[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
wasteIdentification;
/** @type {AvpList[]} */
typeOfWaste = [];
}
export class TransactionalItemOrganicInformation {
/** @param {{isTradeItemOrganic?:boolean,organicCertification?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?boolean} */
isTradeItemOrganic;
/** @type {string} */
organicCertification;
}
export class TransactionalItemData {
/** @param {{availableForSaleDate?:string,batchNumber?:string,bestBeforeDate?:string,countryOfOrigin?:string,itemExpirationDate?:string,lotNumber?:string,packagingDate?:string,productionDate?:string,productQualityIndication?:string,sellByDate?:string,serialNumber?:string[],shelfLife?:string,tradeItemQuantity?:number,itemInContactWithFoodProduct?:boolean,transactionalItemWeight?:TransactionalItem[],transactionalItemVolume?:TransactionalItem[],serialNumberRange?:SerialNumberRange[],transactionalItemDimensions?:TransactionalItemDimension[],transactionalItemLogisticUnitInformation?:TransactionalItemLogisticUnitInformation,transactionalItemDataCarrierAndIdentification?:TransactionalItemDataCarrierAndIdentification,tradeItemWaste?:TradeItemWaste[],transactionalItemOrganicInformation?:TransactionalItemOrganicInformation,avpList?:AvpList[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
availableForSaleDate;
/** @type {string} */
batchNumber;
/** @type {?string} */
bestBeforeDate;
/** @type {string} */
countryOfOrigin;
/** @type {?string} */
itemExpirationDate;
/** @type {string} */
lotNumber;
/** @type {?string} */
packagingDate;
/** @type {?string} */
productionDate;
/** @type {string} */
productQualityIndication;
/** @type {?string} */
sellByDate;
/** @type {string[]} */
serialNumber = [];
/** @type {string} */
shelfLife;
/** @type {?number} */
tradeItemQuantity;
/** @type {?boolean} */
itemInContactWithFoodProduct;
/** @type {TransactionalItem[]} */
transactionalItemWeight = [];
/** @type {TransactionalItem[]} */
transactionalItemVolume = [];
/** @type {SerialNumberRange[]} */
serialNumberRange = [];
/** @type {TransactionalItemDimension[]} */
transactionalItemDimensions = [];
/** @type {TransactionalItemLogisticUnitInformation} */
transactionalItemLogisticUnitInformation;
/** @type {TransactionalItemDataCarrierAndIdentification} */
transactionalItemDataCarrierAndIdentification;
/** @type {TradeItemWaste[]} */
tradeItemWaste = [];
/** @type {TransactionalItemOrganicInformation} */
transactionalItemOrganicInformation;
/** @type {AvpList[]} */
avpList = [];
}
export class Colour {
/** @param {{colourCode?:string,colourDescription?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
colourCode;
/** @type {string} */
colourDescription;
}
export class Size {
/** @param {{descriptiveSize?:string,sizeCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
descriptiveSize;
/** @type {string} */
sizeCode;
}
export class TradeItemClassification {
/** @param {{gpcCategoryCode?:string,additionalTradeItemClassificationCode?:AvpList[],gpcCategoryName?:string,gpcAttribute?:AvpList[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
gpcCategoryCode;
/** @type {AvpList[]} */
additionalTradeItemClassificationCode = [];
/** @type {string} */
gpcCategoryName;
/** @type {AvpList[]} */
gpcAttribute = [];
}
export class TransactionalTradeItem {
/** @param {{gtin?:string,additionalTradeItemIdentification?:AvpList[],tradeItemQuantity?:number,tradeItemDescription?:string,productVariantIdentifier?:string,itemTypeCode?:string,tradeItemDataOwner?:string,butterFatReference?:string,transactionalItemData?:TransactionalItemData[],colour?:Colour[],size?:Size,tradeItemClassification?:TradeItemClassification,avpList?:AvpList[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
gtin;
/** @type {AvpList[]} */
additionalTradeItemIdentification = [];
/** @type {?number} */
tradeItemQuantity;
/** @type {string} */
tradeItemDescription;
/** @type {string} */
productVariantIdentifier;
/** @type {string} */
itemTypeCode;
/** @type {string} */
tradeItemDataOwner;
/** @type {string} */
butterFatReference;
/** @type {TransactionalItemData[]} */
transactionalItemData = [];
/** @type {Colour[]} */
colour = [];
/** @type {Size} */
size;
/** @type {TradeItemClassification} */
tradeItemClassification;
/** @type {AvpList[]} */
avpList = [];
}
export class ClaimsNotificationItemDiscrepancy {
/** @param {{price?:number,quantity?:Quantity,transactionalTradeItem?:TransactionalTradeItem}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
price;
/** @type {Quantity} */
quantity;
/** @type {TransactionalTradeItem} */
transactionalTradeItem;
}
export class ClaimsNotificationDiscrepancyInformation {
/** @param {{claimAmount?:number,claimReasonCode?:string,discrepancyDescription?:string,actualReceived?:ClaimsNotificationItemDiscrepancy,expectedToReceive?:ClaimsNotificationItemDiscrepancy,avpList?:AvpList[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
claimAmount;
/** @type {string} */
claimReasonCode;
/** @type {string} */
discrepancyDescription;
/** @type {ClaimsNotificationItemDiscrepancy} */
actualReceived;
/** @type {ClaimsNotificationItemDiscrepancy} */
expectedToReceive;
/** @type {AvpList[]} */
avpList = [];
}
export class ClaimTotals {
/** @param {{baseAmount?:number,totalTaxAmount?:number,totalClaimAmount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
baseAmount;
/** @type {?number} */
totalTaxAmount;
/** @type {?number} */
totalClaimAmount;
}
export class ClaimExtension {
/** @param {{claimTotals?:ClaimTotals,shipFrom?:TransactionalParty,shipTo?:TransactionalParty}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ClaimTotals} */
claimTotals;
/** @type {TransactionalParty} */
shipFrom;
/** @type {TransactionalParty} */
shipTo;
}
export class ClaimNotification extends BaseDocument {
/** @param {{claimsNotificationTypeCode?:string,isManualProcessNeededForClaimsResolution?:boolean,isSupplementalMessageBeingSent?:boolean,supplementalMessageDescription?:string,claimsNotificationIdentification?:string,buyer?:TransactionalParty,remitTo?:TransactionalParty,seller?:TransactionalParty,billOfLading?:BillOfLading,claimsNotification?:DocumentReference,dispatchAdvice?:DocumentReference,purchaseOrder?:DocumentReference,invoice?:DocumentReference,claimsNotificationDiscrepancyInformation?:ClaimsNotificationDiscrepancyInformation[],extension?:ClaimExtension,currencyCode?:string,creationDateTime?:string,documentActionCode?:DocumentAction,documentStatusCode?:DocumentStatus,documentStructureVersion?:string,lastUpdateDateTime?:string,revisionNumber?:number,avpList?:AvpList[]}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
claimsNotificationTypeCode;
/** @type {boolean} */
isManualProcessNeededForClaimsResolution;
/** @type {boolean} */
isSupplementalMessageBeingSent;
/** @type {string} */
supplementalMessageDescription;
/** @type {string} */
claimsNotificationIdentification;
/** @type {TransactionalParty} */
buyer;
/** @type {TransactionalParty} */
remitTo;
/** @type {TransactionalParty} */
seller;
/** @type {BillOfLading} */
billOfLading;
/** @type {DocumentReference} */
claimsNotification;
/** @type {DocumentReference} */
dispatchAdvice;
/** @type {DocumentReference} */
purchaseOrder;
/** @type {DocumentReference} */
invoice;
/** @type {ClaimsNotificationDiscrepancyInformation[]} */
claimsNotificationDiscrepancyInformation = [];
/** @type {ClaimExtension} */
extension;
}
export class ClaimMessage {
/** @param {{header?:Header,claimNotification?:ClaimNotification}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Header} */
header;
/** @type {ClaimNotification} */
claimNotification;
}
/** @typedef T {any} */
export class ResultItem {
/** @param {{token?:string,item?:ClaimMessage}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
token;
/** @type {ClaimMessage} */
item;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/settlement HTTP/1.1 Host: stf-api-uat.data-xchange.co.za Accept: application/xml