I am creating a staff using mingBody API. My response status get success but staff not created. My code looks like this:
var mboFactory = require('mbo-api');
mboFactory.setSourceCredentials("xxxx", "xxxxx");
mboFactory.setApiKey("xxxxx")
mboFactory.createStaffServiceAsync()
.then(function (staffService) {
staffService.setUserCredentials('xxx', 'xxx', xxx)
var data = {
HomePhone: '9898426325',
State: 'NY',
Country: 'US',
Name: 'test',
FirstName: 'test',
LastName: 'testing',
Bio: 'aka The RockDo you smell what he is cooking?',
isMale: false,
email:"test@test.com",
password:"@123test123456"
}
staffService.AddOrUpdateStaff({UpdateAction: "AddNew", Test: true, Staff: data}).then(function (dataa) {
console.log(dataa);
}, function (err) {
console.log(err);
})
});
And the result is bellow:
{
Status: 'Success',
ErrorCode: 200,
XMLDetail: 'Full',
ResultCount: 0,
CurrentPageIndex: 0,
TotalPageCount: 0,
Staff: null
}
{
ResultCount: 0, Staff: null
}