DX STF Client API

<back to all web services

AddCustomerMaster

Customer Master Requests

Customer Master

Requires Authentication
The following routes are available for this service:
POST/api/customerMasterAdd new customer master
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


/**
* Customer Master
*/
@Api(Description="Customer Master")
@ApiResponse(Description="Add customer master request received", IsDefaultResponse=true, StatusCode=200)
// @ApiResponse(Description="Customer master request not accepted, Confirm Sender GLN", ResponseType=UnauthorizedAccessException::class, StatusCode=403)
open class AddCustomerMaster
{
    /**
    * Customer Master model containing all of the Customer Master data
    */
    @ApiMember(Description="Customer Master model containing all of the Customer Master data", ParameterType="model")
    open var customerMaster:CustomerMasterMessage? = null
}

open class CustomerMasterMessage
{
    open var dataSource:TransactionalParty? = null
    open var dataRecipient:TransactionalParty? = null
    open var customerMasterIdentification:String? = null
    open var customer:ArrayList<CustomerMasterType> = ArrayList<CustomerMasterType>()
    open var documentStatusCode:String? = null
    open var documentActionCode:String? = null
    open var creationDateTime:Date? = null
    open var lastUpdateDateTime:Date? = null
}

open class TransactionalParty : Ecom_PartyIdentificationType()
{
    open var contact:ArrayList<Contact> = ArrayList<Contact>()
    open var address:Address? = null
    open var communicationChannel:ArrayList<AvpList> = ArrayList<AvpList>()
    open var financialInstitutionInformation:FinancialInstitutionInformation? = null
    open var dutyFeeTaxRegistration:String? = null
    open var entityIdentification:String? = null
}

open class Ecom_PartyIdentificationType
{
    open var gln:String? = null
    open var name:String? = null
    open var additionalPartyIdentification:ArrayList<AvpList> = ArrayList<AvpList>()
}

open class AvpList
{
    open var code:String? = null
    open var value:String? = null
}

open class Contact
{
    open var contactTypeCode:String? = null
    open var personName:String? = null
    open var departmentName:String? = null
    open var jobTitle:String? = null
    open var responsibility:String? = null
    open var communicationChannel:ArrayList<CommunicationChannel> = ArrayList<CommunicationChannel>()
}

open class CommunicationChannel
{
    open var communicationChannelCode:String? = null
    open var communicationChannelName:String? = null
    open var communicationValue:String? = null
}

open class Address
{
    open var streetAddressOne:String? = null
    open var streetAddressTwo:String? = null
    open var streetAddressThree:String? = null
    open var city:String? = null
    open var postalCode:String? = null
    open var provinceCode:String? = null
    open var countryCode:String? = null
}

open class FinancialInstitutionInformation
{
    open var financialInstitutionBranchName:String? = null
    open var financialInstitutionName:String? = null
    open var financialRoutingNumber:FinancialRoutingNumber? = null
    open var financialAccount:FinancialAccount? = null
    open var swiftCode:String? = null
    open var exportersCode:String? = null
}

open class FinancialRoutingNumber
{
    open var number:String? = null
    open var numberTypeCode:String? = null
}

open class FinancialAccount
{
    open var number:String? = null
    open var numberTypeCode:String? = null
    open var name:String? = null
}

open class CustomerMasterType : CustomerRecord()
{
    open var payByCustomer:CustomerRecord? = null
    open var billToCustomer:CustomerRecord? = null
    open var routingCode:String? = null
    open var storeType:String? = null
    open var currencyCode:String? = null
    @SerializedName("type") open var Type:String? = null
    open var group:String? = null
    open var region:String? = null
    open var zoneRate:String? = null
    open var taxRule:String? = null
    open var paymentTerm:String? = null
    open var shipmentSite:String? = null
    open var shipmentSiteName:String? = null
    open var shipmentSiteGln:String? = null
    open var accountingCode:String? = null
    open var commercialRepresentative:String? = null
    open var commercialTerritory:String? = null
    open var credit:CreditLimit? = null
    open var nod:ArrayList<String> = ArrayList<String>()
    open var ndd:ArrayList<String> = ArrayList<String>()
}

open class CustomerRecord
{
    open var gln:String? = null
    open var code:String? = null
    open var name:String? = null
    open var buyerAssignedVendorNo:String? = null
    open var supplierAssignedVendorNo:String? = null
    open var dutyFeeTaxRegistration:String? = null
    open var entityIdentification:String? = null
    open var contact:ArrayList<Contact> = ArrayList<Contact>()
    open var address:CustomerMasterAddress? = null
    open var avpList:ArrayList<AvpList> = ArrayList<AvpList>()
}

open class CustomerMasterAddress : Address()
{
    open var addressType:String? = null
}

open class CreditLimit
{
    open var limit:BigDecimal? = null
    open var balance:BigDecimal? = null
    open var available:BigDecimal? = null
    open var effectiveDateTime:Date? = null
}

open class TokenDto : ICommandResponse
{
    open var token:UUID? = null
}

Kotlin AddCustomerMaster DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/customerMaster HTTP/1.1 
Host: stf-api-uat.data-xchange.co.za 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	customerMaster: 
	{
		dataSource: 
		{
			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
				}
			]
		},
		dataRecipient: 
		{
			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
				}
			]
		},
		customerMasterIdentification: String,
		customer: 
		[
			{
				payByCustomer: 
				{
					gln: String,
					code: String,
					name: String,
					buyerAssignedVendorNo: String,
					supplierAssignedVendorNo: String,
					dutyFeeTaxRegistration: String,
					entityIdentification: String,
					contact: 
					[
						{
							contactTypeCode: String,
							personName: String,
							departmentName: String,
							jobTitle: String,
							responsibility: String,
							communicationChannel: 
							[
								{
									communicationChannelCode: String,
									communicationChannelName: String,
									communicationValue: String
								}
							]
						}
					],
					address: 
					{
						addressType: String,
						streetAddressOne: String,
						streetAddressTwo: String,
						streetAddressThree: String,
						city: String,
						postalCode: String,
						provinceCode: String,
						countryCode: String
					},
					avpList: 
					[
						{
							code: String,
							value: String
						}
					]
				},
				billToCustomer: 
				{
					gln: String,
					code: String,
					name: String,
					buyerAssignedVendorNo: String,
					supplierAssignedVendorNo: String,
					dutyFeeTaxRegistration: String,
					entityIdentification: String,
					contact: 
					[
						{
							contactTypeCode: String,
							personName: String,
							departmentName: String,
							jobTitle: String,
							responsibility: String,
							communicationChannel: 
							[
								{
									communicationChannelCode: String,
									communicationChannelName: String,
									communicationValue: String
								}
							]
						}
					],
					address: 
					{
						addressType: String,
						streetAddressOne: String,
						streetAddressTwo: String,
						streetAddressThree: String,
						city: String,
						postalCode: String,
						provinceCode: String,
						countryCode: String
					},
					avpList: 
					[
						{
							code: String,
							value: String
						}
					]
				},
				routingCode: String,
				storeType: String,
				currencyCode: String,
				type: String,
				group: String,
				region: String,
				zoneRate: String,
				taxRule: String,
				paymentTerm: String,
				shipmentSite: String,
				shipmentSiteName: String,
				shipmentSiteGln: String,
				accountingCode: String,
				commercialRepresentative: String,
				commercialTerritory: String,
				credit: 
				{
					limit: 0,
					balance: 0,
					available: 0,
					effectiveDateTime: 0001-01-01
				},
				nod: 
				[
					String
				],
				ndd: 
				[
					String
				],
				gln: String,
				code: String,
				name: String,
				buyerAssignedVendorNo: String,
				supplierAssignedVendorNo: String,
				dutyFeeTaxRegistration: String,
				entityIdentification: String,
				contact: 
				[
					{
						contactTypeCode: String,
						personName: String,
						departmentName: String,
						jobTitle: String,
						responsibility: String,
						communicationChannel: 
						[
							{
								communicationChannelCode: String,
								communicationChannelName: String,
								communicationValue: String
							}
						]
					}
				],
				address: 
				{
					addressType: String,
					streetAddressOne: String,
					streetAddressTwo: String,
					streetAddressThree: String,
					city: String,
					postalCode: String,
					provinceCode: String,
					countryCode: String
				},
				avpList: 
				[
					{
						code: String,
						value: String
					}
				]
			}
		],
		documentStatusCode: String,
		documentActionCode: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	
}