| POST | /api/customerMaster | Add new customer master |
|---|
namespace DX.Framework.Core.Commands.Dto
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type TokenDto() =
member val Token:Guid = new Guid() with get,set
[<AllowNullLiteral>]
type AvpList() =
member val Code:String = null with get,set
member val Value:String = null with get,set
[<AllowNullLiteral>]
type Ecom_PartyIdentificationType() =
member val Gln:String = null with get,set
member val Name:String = null with get,set
member val AdditionalPartyIdentification:ResizeArray<AvpList> = null with get,set
[<AllowNullLiteral>]
type CommunicationChannel() =
member val CommunicationChannelCode:String = null with get,set
member val CommunicationChannelName:String = null with get,set
member val CommunicationValue:String = null with get,set
[<AllowNullLiteral>]
type Contact() =
member val ContactTypeCode:String = null with get,set
member val PersonName:String = null with get,set
member val DepartmentName:String = null with get,set
member val JobTitle:String = null with get,set
member val Responsibility:String = null with get,set
member val CommunicationChannel:ResizeArray<CommunicationChannel> = null with get,set
[<AllowNullLiteral>]
type Address() =
member val StreetAddressOne:String = null with get,set
member val StreetAddressTwo:String = null with get,set
member val StreetAddressThree:String = null with get,set
member val City:String = null with get,set
member val PostalCode:String = null with get,set
member val ProvinceCode:String = null with get,set
member val CountryCode:String = null with get,set
[<AllowNullLiteral>]
type FinancialRoutingNumber() =
member val Number:String = null with get,set
member val NumberTypeCode:String = null with get,set
[<AllowNullLiteral>]
type FinancialAccount() =
member val Number:String = null with get,set
member val NumberTypeCode:String = null with get,set
member val Name:String = null with get,set
[<AllowNullLiteral>]
type FinancialInstitutionInformation() =
member val FinancialInstitutionBranchName:String = null with get,set
member val FinancialInstitutionName:String = null with get,set
member val FinancialRoutingNumber:FinancialRoutingNumber = null with get,set
member val FinancialAccount:FinancialAccount = null with get,set
member val SwiftCode:String = null with get,set
member val ExportersCode:String = null with get,set
[<AllowNullLiteral>]
type TransactionalParty() =
inherit Ecom_PartyIdentificationType()
member val Contact:ResizeArray<Contact> = null with get,set
member val Address:Address = null with get,set
member val CommunicationChannel:ResizeArray<AvpList> = null with get,set
member val FinancialInstitutionInformation:FinancialInstitutionInformation = null with get,set
member val DutyFeeTaxRegistration:String = null with get,set
member val EntityIdentification:String = null with get,set
[<AllowNullLiteral>]
type CustomerMasterAddress() =
inherit Address()
member val AddressType:String = null with get,set
[<AllowNullLiteral>]
type CustomerRecord() =
member val Gln:String = null with get,set
member val Code:String = null with get,set
member val Name:String = null with get,set
member val BuyerAssignedVendorNo:String = null with get,set
member val SupplierAssignedVendorNo:String = null with get,set
member val DutyFeeTaxRegistration:String = null with get,set
member val EntityIdentification:String = null with get,set
member val Contact:ResizeArray<Contact> = null with get,set
member val Address:CustomerMasterAddress = null with get,set
member val AvpList:ResizeArray<AvpList> = null with get,set
[<AllowNullLiteral>]
type CreditLimit() =
member val Limit:Decimal = new Decimal() with get,set
member val Balance:Decimal = new Decimal() with get,set
member val Available:Decimal = new Decimal() with get,set
member val EffectiveDateTime:Nullable<DateTime> = new Nullable<DateTime>() with get,set
[<AllowNullLiteral>]
type CustomerMasterType() =
inherit CustomerRecord()
member val PayByCustomer:CustomerRecord = null with get,set
member val BillToCustomer:CustomerRecord = null with get,set
member val RoutingCode:String = null with get,set
member val StoreType:String = null with get,set
member val CurrencyCode:String = null with get,set
member val Type:String = null with get,set
member val Group:String = null with get,set
member val Region:String = null with get,set
member val ZoneRate:String = null with get,set
member val TaxRule:String = null with get,set
member val PaymentTerm:String = null with get,set
member val ShipmentSite:String = null with get,set
member val ShipmentSiteName:String = null with get,set
member val ShipmentSiteGln:String = null with get,set
member val AccountingCode:String = null with get,set
member val CommercialRepresentative:String = null with get,set
member val CommercialTerritory:String = null with get,set
member val Credit:CreditLimit = null with get,set
member val NOD:ResizeArray<String> = null with get,set
member val NDD:ResizeArray<String> = null with get,set
[<AllowNullLiteral>]
type CustomerMasterMessage() =
member val DataSource:TransactionalParty = null with get,set
member val DataRecipient:TransactionalParty = null with get,set
member val CustomerMasterIdentification:String = null with get,set
member val Customer:ResizeArray<CustomerMasterType> = null with get,set
member val DocumentStatusCode:String = null with get,set
member val DocumentActionCode:String = null with get,set
member val CreationDateTime:DateTime = new DateTime() with get,set
member val LastUpdateDateTime:DateTime = new DateTime() with get,set
///<summary>
///Customer Master
///</summary>
[<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=typeof<UnauthorizedAccessException>, StatusCode=403)>]
[<AllowNullLiteral>]
type AddCustomerMaster() =
///<summary>
///Customer Master model containing all of the Customer Master data
///</summary>
[<ApiMember(Description="Customer Master model containing all of the Customer Master data", ParameterType="model")>]
member val CustomerMaster:CustomerMasterMessage = null with get,set
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/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
{
}