Request One (Not working)
{
"AddNewRequest":{
"Patient":{
"PrimaryPhoneNumber":" ",
"DateOfBirth":" ",
"CellPhoneNumber1":" ",
"ResidentialAddress":{
"AddressLine1":" ",
"State":" ",
"City":" ",
"PostalCode":" "
},
"PhoneNumber1":" ",
"SSN":" ",
"FullName":"John",
"Religion":" ",
"Gender":" ",
"Race":" ",
"Firstname":"Vinoth",
"EmailAddress1":" ",
"LastName":"Cooper"
},
"Header":{
"SourceSiteID":"300242",
"DestinationSiteID":"300242",
"PrimeSuiteUserID":"1"
},
"Credentials":{
"VendorCredential":{
"VendorLogin":"testGUID",
"VendorPassword":"testGUID"
},
"PrimeSuiteCredential":{
"PrimeSuiteUserPassword":"password",
"PrimeSuiteSiteId":"1",
"PrimeSuiteUserName":"Admin"
}
}
}
}
Request Two (Working)
{
"PatientAddNewRequest":{
"Credentials":{
"PrimeSuiteCredential":{
"PrimeSuiteSiteId":"300242",
"PrimeSuiteUserName":"Admin",
"PrimeSuiteUserPassword":"password"
},
"VendorCredential":{
"VendorLogin":"testGUID",
"VendorPassword":"testGUID"
}
},
"Header":{
"DestinationSiteID":"300242",
"PrimeSuiteUserID":"1",
":SourceSiteID":"300242"
},
"Patient":{
"CellPhoneNumber1":"206-567-2222",
"DateOfBirth":"/Date(1306348200000)/",
"EmailAddress1":"JohnDoe@yahoo.com",
"Firstname":"TestMan1",
"FullName":"TestFullMan1",
"Gender":"2",
"LastName":"Testlastname1",
"PhoneNumber1":"205-567-1111",
"PrimaryPhoneNumber":"205-456-4545",
"Race":"2",
"Religion":"3",
"ResidentialAddress":{
"City":"Carrollton",
"PostalCode":"35209",
"State":"10"
},
"SSN":"911-91-9191"
}
}
}
I am just not able to figure out why the first request is not working and the second one gives response. Can anyone identify what i am doing wrong.
Does Order Matter?
Update
The First one throws me Bad Request and the second one responds as expected.
In JSON the order doesn’t matter but the name does. In the Request One you have
"AddNewRequest"while in Request Two you have"PatientAddNewRequest".Also on the server side, the serializer/de-serializer may need specific ordering.
JSON