| GET | /api/customerMaster/{OwnerGln}/{CustomerMasterIdentification} | Get specific customer by customerMasterIdentification Id |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using DX.STF.Application.ClientApi.Messages.CustomerMaster;
using DX.STF.Models.Dto.MasterData;
using DX.STF.Models.Dto.GS1;
namespace DX.STF.Application.ClientApi.Messages.CustomerMaster
{
///<summary>
///Customer Master
///</summary>
[Api(Description="Customer Master")]
[ApiResponse(Description="Customer Master data", IsDefaultResponse=true, StatusCode=200)]
[ApiResponse(Description="No Content", ResponseType=typeof(ServiceStack.IReturnVoid), StatusCode=204)]
[ApiResponse(Description="Specified argument was out of the range of valid values.", ResponseType=typeof(System.ArgumentOutOfRangeException), StatusCode=400)]
public partial class GetCustomerMasterByIdentification
{
///<summary>
///Owner GLN
///</summary>
[ApiMember(Description="Owner GLN", ExcludeInSchema=true, ParameterType="path")]
public virtual string OwnerGln { get; set; }
///<summary>
///Customer Master Identification
///</summary>
[ApiMember(Description="Customer Master Identification", ExcludeInSchema=true, ParameterType="path")]
public virtual string CustomerMasterIdentification { get; set; }
}
}
namespace DX.STF.Models.Dto.GS1
{
public partial class Address
{
public virtual string StreetAddressOne { get; set; }
public virtual string StreetAddressTwo { get; set; }
public virtual string StreetAddressThree { get; set; }
public virtual string City { get; set; }
public virtual string PostalCode { get; set; }
public virtual string ProvinceCode { get; set; }
public virtual string CountryCode { get; set; }
}
public partial class AvpList
{
public virtual string Code { get; set; }
public virtual string Value { get; set; }
}
public partial class CommunicationChannel
{
public virtual string CommunicationChannelCode { get; set; }
public virtual string CommunicationChannelName { get; set; }
public virtual string CommunicationValue { get; set; }
}
public partial class Contact
{
public virtual string ContactTypeCode { get; set; }
public virtual string PersonName { get; set; }
public virtual string DepartmentName { get; set; }
public virtual string JobTitle { get; set; }
public virtual string Responsibility { get; set; }
public virtual List<CommunicationChannel> CommunicationChannel { get; set; } = [];
}
public partial class Ecom_PartyIdentificationType
{
public virtual string Gln { get; set; }
public virtual string Name { get; set; }
public virtual List<AvpList> AdditionalPartyIdentification { get; set; } = [];
}
public partial class FinancialAccount
{
public virtual string Number { get; set; }
public virtual string NumberTypeCode { get; set; }
public virtual string Name { get; set; }
}
public partial class FinancialInstitutionInformation
{
public virtual string FinancialInstitutionBranchName { get; set; }
public virtual string FinancialInstitutionName { get; set; }
public virtual FinancialRoutingNumber FinancialRoutingNumber { get; set; }
public virtual FinancialAccount FinancialAccount { get; set; }
public virtual string SwiftCode { get; set; }
public virtual string ExportersCode { get; set; }
}
public partial class FinancialRoutingNumber
{
public virtual string Number { get; set; }
public virtual string NumberTypeCode { get; set; }
}
public partial class TransactionalParty
: Ecom_PartyIdentificationType
{
public virtual List<Contact> Contact { get; set; } = [];
public virtual Address Address { get; set; }
public virtual List<AvpList> CommunicationChannel { get; set; } = [];
public virtual FinancialInstitutionInformation FinancialInstitutionInformation { get; set; }
public virtual string DutyFeeTaxRegistration { get; set; }
public virtual string EntityIdentification { get; set; }
}
}
namespace DX.STF.Models.Dto.MasterData
{
public partial class CreditLimit
{
public virtual decimal Limit { get; set; }
public virtual decimal Balance { get; set; }
public virtual decimal Available { get; set; }
public virtual DateTime? EffectiveDateTime { get; set; }
}
public partial class CustomerMasterAddress
: Address
{
public virtual string AddressType { get; set; }
}
public partial class CustomerMasterMessage
{
public virtual TransactionalParty DataSource { get; set; }
public virtual TransactionalParty DataRecipient { get; set; }
public virtual string CustomerMasterIdentification { get; set; }
public virtual List<CustomerMasterType> Customer { get; set; } = [];
public virtual string DocumentStatusCode { get; set; }
public virtual string DocumentActionCode { get; set; }
public virtual DateTime CreationDateTime { get; set; }
public virtual DateTime LastUpdateDateTime { get; set; }
}
public partial class CustomerMasterType
: CustomerRecord
{
public virtual CustomerRecord PayByCustomer { get; set; }
public virtual CustomerRecord BillToCustomer { get; set; }
public virtual string RoutingCode { get; set; }
public virtual string StoreType { get; set; }
public virtual string CurrencyCode { get; set; }
public virtual string Type { get; set; }
public virtual string Group { get; set; }
public virtual string Region { get; set; }
public virtual string ZoneRate { get; set; }
public virtual string TaxRule { get; set; }
public virtual string PaymentTerm { get; set; }
public virtual string ShipmentSite { get; set; }
public virtual string ShipmentSiteName { get; set; }
public virtual string ShipmentSiteGln { get; set; }
public virtual string AccountingCode { get; set; }
public virtual string CommercialRepresentative { get; set; }
public virtual string CommercialTerritory { get; set; }
public virtual CreditLimit Credit { get; set; }
public virtual List<string> NOD { get; set; } = [];
public virtual List<string> NDD { get; set; } = [];
}
public partial class CustomerRecord
{
public virtual string Gln { get; set; }
public virtual string Code { get; set; }
public virtual string Name { get; set; }
public virtual string BuyerAssignedVendorNo { get; set; }
public virtual string SupplierAssignedVendorNo { get; set; }
public virtual string DutyFeeTaxRegistration { get; set; }
public virtual string EntityIdentification { get; set; }
public virtual List<Contact> Contact { get; set; } = [];
public virtual CustomerMasterAddress Address { get; set; }
public virtual List<AvpList> AvpList { get; set; } = [];
}
}
C# GetCustomerMasterByIdentification 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.
GET /api/customerMaster/{OwnerGln}/{CustomerMasterIdentification} HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
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
}