REST Web Services: Sample client code
These sample codes show getParty XML payload and responses. The same request and response sample code as JSON is also provided.
XML
Request:
<TCRMService xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.ibm.com/mdm/schema"
xsi:schemaLocation="http://www.ibm.com/mdm/schema MDMDomains.xsd">
<RequestControl>
<requestID>100187</requestID>
<DWLControl>
<requesterName>cusadmin</requesterName>
<requesterLocale>en</requesterLocale>
</DWLControl>
</RequestControl>
<TCRMInquiry>
<InquiryType>getParty</InquiryType>
<InquiryParam>
<tcrmParam name="PartyId">1</tcrmParam>
<tcrmParam name="PartyType">P</tcrmParam>
<tcrmParam name="InquiryLevel">1</tcrmParam>
</InquiryParam>
</TCRMInquiry>
</TCRMService>Response:
<TCRMService
xmlns="http://www.ibm.com/mdm/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ibm.com/mdm/schema MDMDomains.xsd">
<ResponseControl>
<ResultCode>SUCCESS</ResultCode>
<ServiceTime>123</ServiceTime>
<DWLControl>
<requesterName>mdmadmin</requesterName>
<requesterLanguage>100</requesterLanguage>
<requesterLocale>en</requesterLocale>
<userRole>mdm_admin</userRole>
<requestID>100187</requestID>
</DWLControl>
</ResponseControl>
<TxResponse>
<RequestType>getParty</RequestType>
<TxResult>
<ResultCode>SUCCESS</ResultCode>
</TxResult>
<ResponseObject>
<TCRMPersonBObj>
<PartyId>1</PartyId>
<DisplayName>Jane Doh</DisplayName>
…
<DWLStatus>
<Status>0</Status>
</DWLStatus>
</TCRMPersonBObj>
</ResponseObject>
</TxResponse>
</TCRMService>
JSON
In the sample code, the value of both Content-Type and Accept headers is application/json
Request:
{
"TCRMService": {
"@schemaLocation": "http:\/\/www.ibm.com\/mdm\/schema MDMDomains.xsd",
"RequestControl": {
"requestID": 604157,
"DWLControl": {
"requesterName": "cusadmin",
"requesterLocale": "en"
}
},
"TCRMInquiry": {
"InquiryType": "getParty",
"InquiryParam": {
"tcrmParam": [{
"@name": "PartyId",
"$": "1"
},
{
"@name": "PartyType",
"$": "P"
},
{
"@name": "InquiryLevel",
"$": "1"
}]
}
}
}
}
Response
{
"TCRMService": {
"@schemaLocation": "http://www.ibm.com/mdm/schema MDMDomains.xsd",
"ResponseControl": {
"ResultCode": "SUCCESS",
"ServiceTime": "86",
"DWLControl": {
"requesterName": "mdmadmin",
"requesterLanguage": "100",
"requesterLocale": "en",
"userRole": "mdm_admin",
"requestID": "604157"
}
},
"TxResponse": {
"RequestType": "getParty",
"TxResult": {
"ResultCode": "SUCCESS"
},
"ResponseObject": {
"TCRMPersonBObj": {
"PartyId": "1",
"DisplayName": "Jane Doh",
"PreferredLanguageType": "100",
"PreferredLanguageValue": "English",
"ComputerAccessType": "1",
"ComputerAccessValue": "14.4K Baud",
"PartyType": "P",
"CreatedDate": "2015-09-10 15:16:47.583",
"SinceDate": "2015-09-10 00:00:00.0",
"StatementFrequencyType": "1",
"StatementFrequencyValue": "Annually",
"ClientStatusType": "1",
"ClientStatusValue": "Active",
"AlertIndicator": "N",
"SolicitationIndicator": "N",
"ConfidentialIndicator": "N",
"ClientPotentialType": "1",
"ClientPotentialValue": "Client",
"ClientImportanceType": "4",
"ClientImportanceValue": "Medium",
"DoNotDeleteIndicator": "1",
"PartyLastUpdateDate": "2015-09-10 15:16:50.138",
"PartyLastUpdateUser": "mdmadmin",
"PartyLastUpdateTxId": "616244191260573356",
"PersonPartyId": "1",
"BirthDate": "1966-08-25 00:00:00.0",
"BirthPlaceType": "1",
"BirthPlaceValue": "Afghanistan",
"GenderType": "M",
"UserIndicator": "N",
"AgeVerifiedWithType": "2",
"AgeVerifiedWithValue": "Passport",
"HighestEducationType": "5",
"HighestEducationValue": "Master Degree",
"CitizenshipType": "1",
"CitizenshipValue": "Afghanistan",
"NumberOfChildren": "3",
"MaritalStatusType": "2",
"MaritalStatusValue": "Single",
"PartyActiveIndicator": "Y",
"PersonLastUpdateDate": "2015-09-10 15:16:50.31",
"PersonLastUpdateUser": "mdmadmin",
"PersonLastUpdateTxId": "616244191260573356",
"TCRMPartyAddressBObj": [
{
"PartyAddressIdPK": "826144191261145264",
"PartyId": "1",
"AddressId": "828144191261121794",
"AddressUsageType": "1",
"AddressUsageValue": "Primary Residence",
"StartDate": "2001-06-11 00:00:00.0",
"AddressGroupLastUpdateDate": "2015-09-10 15:16:51.591",
"AddressGroupLastUpdateUser": "mdmadmin",
"AddressGroupLastUpdateTxId": "616244191260573356",
"LocationGroupLastUpdateDate": "2015-09-10 15:16:51.451",
"LocationGroupLastUpdateUser": "mdmadmin",
"LocationGroupLastUpdateTxId": "616244191260573356",
"TCRMAddressBObj": {
"AddressIdPK": "828144191261121794",
"ResidenceType": "2",
"ResidenceValue": "Detached House",
"AddressLineOne": "120 Richmond St",
"City": "Toronto",
"ZipPostalCode": "M5A 1P4",
"ResidenceNumber": "789",
"ProvinceStateType": "108",
"ProvinceStateValue": "ON",
"CountyCode": "1",
"CountryType": "31",
"CountryValue": "Canada",
"LatitudeDegrees": "180",
"LongitudeDegrees": "90",
"AddressLastUpdateDate": "2015-09-10 15:16:51.216",
"AddressLastUpdateUser": "mdmadmin",
"AddressLastUpdateTxId": "616244191260573356",
"DWLStatus": {
"Status": "0"
}
},
"DWLStatus": {
"Status": "0"
}
}
],
"TCRMPartyIdentificationBObj": [
{
"IdentificationIdPK": "826744191261084265",
"PartyId": "1",
"IdentificationType": "1",
"IdentificationValue": "Social Security Number",
"IdentificationNumber": "1245",
"IdentificationStatusType": "2",
"IdentificationStatusValue": "Active",
"IdentificationExpiryDate": "2005-08-11 23:59:59.0",
"StartDate": "2002-02-02 00:00:00.0",
"PartyIdentificationLastUpdateDate": "2015-09-10 15:16:50.841",
"PartyIdentificationLastUpdateUser": "mdmadmin",
"PartyIdentificationLastUpdateTxId": "616244191260573356",
"DWLStatus": {
"Status": "0"
}
}
],
"TCRMPersonNameBObj": [
{
"PersonNameIdPK": "822844191261056191",
"NameUsageType": "1",
"NameUsageValue": "Legal",
"PrefixType": "12",
"PrefixValue": "Miss",
"GivenNameOne": "Jane",
"StdGivenNameOne": "JANE",
"LastName": "Doh",
"StdLastName": "DOH",
"PersonPartyId": "1",
"StartDate": "2002-02-02 00:00:00.0",
"PersonNameLastUpdateDate": "2015-09-10 15:16:50.56",
"PersonNameLastUpdateUser": "mdmadmin",
"PersonNameLastUpdateTxId": "616244191260573356",
"LastUpdatedBy": "mdmadmin",
"LastUpdatedDate": "2015-09-10 15:16:50.56",
"DWLStatus": {
"Status": "0"
}
}
],
"DWLStatus": {
"Status": "0"
}
}
}
}
}
}