I’m trying to use POSTMAN to test out creating a new customer contact with REST.
This is the API url (I found from another post about creating a customer contact): https://XXXXXX/E10Train/api/v1/Erp.BO.CustCntSvc/CustCnts
I keep getting The request is invalid. Here is dummy test I’m sending with POSTMAN:
{
"Company": "SD",
"CustNum": 440,
"ShipToNum": "",
"Name": "ABC",
"Func": "test",
"FaxNum": "6666",
"PhoneNum": "7777",
"EMailAddress": "w@example.com",
"SpecialAddress": 0,
"SFPortalPassword": "password123",
"SFUser": 0,
"PortalUser": 0,
"RoleCode": "",
"CellPhoneNum": "",
"PagerNum": "",
"HomeNum": "",
"AltNum": "",
"ContactTitle": "",
"ReportsTo": "",
"Inactive": 0,
"FirstName": "A",
"MiddleName": "B",
"LastName": "C",
"Prefix": "",
"Suffix": "",
"Initials": "ABC",
"ExternalID": "",
"GlobalLock": 1,
"ShowInputPrice": 1,
"ChangeTime": 0,
"ChangedBy": "",
"MasterCustNum": 0,
"MasterShipToNum": "",
"MasterConNum": 0,
"PerConID": 0,
"SyncNameToPerCon": 0,
"SyncAddressToPerCon": 0,
"SyncPhoneToPerCon": 0,
"SyncEmailToPerCon": 0,
"SyncLinksToPerCon": 0,
"PerConAddress": 0,
"SysRevID": "",
"SysRowID": "",
"SyncToExternalCRM": 1,
"ExternalCRMCustomerID": "",
"ExternalCRMContactID": "",
"RoleDescription": "",
"PrimaryBilling": 1,
"PrimaryPurchasing": 1,
"PrimaryShipping": 1,
"GlbFlag": 1,
"AttrCodeList": "",
"GlbLink": "",
"ContactName": "ABC",
"PerConName": "",
"BitFlag": 0,
"CustNumName": "",
"CustNumBTName": "",
"CustNumCustID": "",
"MasterCustNumBTName": "",
"MasterCustNumName": "",
"MasterCustNumCustID": "",
"RowMod": ""
}
The swagger documentation says that everything is optional. I don’t think that’s accurate. I’ve been playing around with adding and removing fields but have not sure where I can start to troubleshoot because here’s my POSTMAN response from the API:
If I want the system to create a new record, what should I put for sys-row-id and customer contact number? Should they be left blank? Should they not even be in the request?