| POST | /api/transactionalParty | Add new transactional party |
|---|
"use strict";
export class TokenDto {
/** @param {{token?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
token;
}
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;
}
export class AvpList {
/** @param {{code?:string,value?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
code;
/** @type {string} */
value;
}
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;
}
/** @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 TransactionalPartyMessageType extends TransactionalParty {
/** @param {{creationDateTime?:string,lastUpdateDateTime?:string,documentActionCode?:DocumentAction,documentStatusCode?:DocumentStatus,documentStructureVersion?:string,revisionNumber?:number,avpList?:AvpList[],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 {string} */
creationDateTime;
/** @type {?string} */
lastUpdateDateTime;
/** @type {DocumentAction} */
documentActionCode;
/** @type {DocumentStatus} */
documentStatusCode;
/** @type {string} */
documentStructureVersion;
/** @type {?number} */
revisionNumber;
/** @type {AvpList[]} */
avpList = [];
}
export class TransactionalPartyMessage {
/** @param {{header?:Header,transactionalParty?:TransactionalPartyMessageType}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Header} */
header;
/** @type {TransactionalPartyMessageType} */
transactionalParty;
}
export class AddTransactionalParty {
/** @param {{transactionalParty?:TransactionalPartyMessage}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {TransactionalPartyMessage}
* @description Transactional Party model containing all of the transactional party data */
transactionalParty;
}
JavaScript AddTransactionalParty DTOs
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/transactionalParty HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"transactionalParty":{"header":{"documentIdentification":{"identifier":"String","type":"String"},"sender":{"identifier":{"authority":"String","text":"String"},"contactInformation":[{}]},"receiver":{"identifier":{"authority":"String","text":"String"},"contactInformation":[{}]}},"transactionalParty":{"lastUpdateDateTime":"0001-01-01","documentActionCode":"ADD","documentStatusCode":"ADDITIONAL_TRANSMISSION","documentStructureVersion":"String","revisionNumber":0,"avpList":[{"code":"String","value":"String"}],"contact":[{"contactTypeCode":"String","personName":"String","departmentName":"String","jobTitle":"String","responsibility":"String","communicationChannel":[{"communicationChannelCode":"String","communicationChannelName":"String","communicationValue":"String"}]}],"address":{"streetAddressOne":"String","streetAddressTwo":"String","streetAddressThree":"String","city":"String","postalCode":"String","provinceCode":"String","countryCode":"String"},"communicationChannel":[{"code":"String","value":"String"}],"financialInstitutionInformation":{"financialInstitutionBranchName":"String","financialInstitutionName":"String","financialRoutingNumber":{"number":"String","numberTypeCode":"String"},"financialAccount":{"number":"String","numberTypeCode":"String","name":"String"},"swiftCode":"String","exportersCode":"String"},"dutyFeeTaxRegistration":"String","entityIdentification":"String","gln":"String","name":"String","additionalPartyIdentification":[{"code":"String","value":"String"}]}}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{}