Features - Connectors Framework - Inbound REST API - Generic Entities
Add Generic Entity
Add Generic Entity
Add a generic entity to the MobiWork system.
URL Format
https://{domain}.mobiwork.com/api/rest/{clientId}/{versionNumber}/genericEntity/add.html?token=XXXXXXXX&userId={userId}
Arguments
clientID
Required
MobiWork assigned unique ID of the company
versionNumber
Required
Version number of MobiWork API SDK release
token
Required
Part of the URL as a request parameter and is required in every call to verify access to API calls
userId
Optional
If provided, this User ID wil be taken as a logged in user. If not provided, we use an active global administrator ID
Return
Returns the added Generic Entity object if successful, or an error if not.
Request Body XSD
Response Body XSD
Sample Call
HTTP Method: POST
Request: curl -k -X POST -H "https://www.mobiwork.com/api/rest/12014/10.0.78/genericEntity/add.html?token=COJL8X2FKSLMMRTYCH2B" -data '<request>
<genericEntity>
<mobiworkGenericEntityId>1</mobiworkGenericEntityId>
<externalId>ABC-123</externalId>
<name>Generic Entitle Sample</name>
<createdDate>01/01/2019</createdDate>
<primaryAddress>
<addressId>1</addressId>
<address1>123 Way Place</address1>
<address2></address2>
<city>Delray Beach</city>
<state>Florida</state>
<zipCode>12345</zipCode>
<countryId>1</countryId>
<latitude></latitude>
<longitude></longitude>
<name>Primary Address</name>
</primaryAddress>
<primaryContact>
<genericEntityContactId>1</genericEntityContactId>
<genericEntityId>1</genericEntityId>
<title>Primary</title>
<firstName>John</firstName>
<lastName>Doe</lastName>
<email>john.doe@company.com</email>
<phoneNumber>1234567891</phoneNumber>
<faxNumber>1234567891</faxNumber>
<enabled>true</enabled>
<createdDate>01/01/2019</createdDate>
</primaryContact>
</genericEntity>
</request>
Response: <?xml version="1.0" encoding="UTF-8" ?>
<response version="5.0.156" statusCode="1">
<genericEntity>
<mobiworkGenericEntityId>1</mobiworkGenericEntityId>
<externalId>ABC-123</externalId>
<name>Generic Entitle Sample</name>
<createdDate>01/01/2019</createdDate>
<primaryAddress>
<addressId>1</addressId>
<address1>123 Way Place</address1>
<address2></address2>
<city>Delray Beach</city>
<state>Florida</state>
<zipCode>12345</zipCode>
<countryId>1</countryId>
<latitude></latitude>
<longitude></longitude>
<name>Primary Address</name>
</primaryAddress>
<primaryContact>
<genericEntityContactId>1</genericEntityContactId>
<genericEntityId>1</genericEntityId>
<title>Primary</title>
<firstName>John</firstName>
<lastName>Doe</lastName>
<email>john.doe@company.com</email>
<phoneNumber>1234567891</phoneNumber>
<faxNumber>1234567891</faxNumber>
<enabled>true</enabled>
<createdDate>01/01/2019</createdDate>
</primaryContact>
</genericEntity>
</response>