- Overview
- Account Settings
- Assets
- Connectors Framework
- Customer Portal
- Customers
- Dashboards
- Devices
- Dispatching
- Forms
- Inventory
- Invoices & Billing
- Locations
- Payments
- Parts
- Projects
- Quotes
- Recurrent Routes
- Recurrent Services
- Reports
- Sales Orders
- Schedule
- Services
- Tasks
- Text Messaging
- Time Tracking
- Users
- Work Orders
Overview
Creates a Customer in MobiWork
Creates a Customer in MobiWork
URL Format
https://{domain}.mobiwork.com/api/rest/{clientId}/{versionNumber}/customer/add.html?token=XXXXXXXX&userId={userId}
https://{domain}.mobiwork.com/api/rest/{clientId}/{versionNumber}/customer/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. Current version is: 10.0.78 |
token required |
Part of URL as a request parameter and is required in every call to verify access to API calls |
userId optional |
If provided, this User ID will be taken as a logged in user. If not provided we use an active global administrator ID |
Return
Returns successful message or errors will be returned Customer Object if customer creation is successful or errors will be returned
Returns successful message or errors will be returned Customer Object if customer creation is successful or errors will be returned
Request Body XSD
Response Body XSD
Curl Example
HTTP Method: | POST |
Request: |
curl -k -X POST -H
"https://www.mobiwork.com/api/rest/12014/10.0.78/customer/add.html?token=COJL8X2FKSLMMRTYCH2B"
-data '<request> <customer> <externalCustomerId>123456</externalCustomerId> <companyName>Test Company 8001</companyName> <type>BUSINESS</type> <statusId>771</statusId> <customStatus>Lead</customStatus> <enabled>TRUE</enabled> <address> <address1>160 Congress Park Dr</address1> <address2>Ste 205</address2> <city>Delray Beach</city> <state>FL</state> <countryId>0</countryId> </address> <contact> <firstName>John</firstName> <lastName>Doe</lastName> <title/> <email>jdoe@gmail.com</email> <phoneNumber>12345678901</phoneNumber> <phoneExt/> <altPhoneExt/> <pin>4549</pin> <enabled>true</enabled> <fax/> <admin>true</admin> </contact> <addressList> <address> <address1>160 Congress Park Dr</address1> <address2>Ste 205</address2> <city>Delray Beach</city> <state>FL</state> <countryId>0</countryId> </address> </addressList> <contactList> <contact> <firstName>John</firstName> <lastName>Doe</lastName> <title/> <email>jdoe@gmail.com</email> <phoneNumber>561111115</phoneNumber> <phoneExt/> <altPhoneExt/> <pin>4549</pin> <enabled>true</enabled> <admin>false</admin> </contact> </contactList> <customFields> <customField> <fieldType>1</fieldType> <apiName>Text</apiName> <index>0</index> <value/> <name>Text</name> </customField> <customField> <fieldType>1</fieldType> <apiName>Text2</apiName> <index>0</index> <value/> <name>Text2</name> </customField> <customField> <fieldType>1</fieldType> <apiName>Text3</apiName> <index>0</index> <value/> <name>Text3</name> </customField> <customField> <fieldType>3</fieldType> <apiName>Date</apiName> <index>0</index> <value/> <name>Date</name> </customField> </customFields> </customer> </request> ' |
Response: |
<?xml version="1.0" encoding="UTF-8" ?> <response version="5.0.156" statusCode="1"> <customer> <mobiworkCustomerId>1223587</mobiworkCustomerId> <externalCustomerId>123456</externalCustomerId> <companyName>Test Company 8001</companyName> <fromDate>09/17/2018</fromDate> <type>BUSINESS</type> <statusId>771</statusId> <enabled>true</enabled> <address> <addressId>1788006</addressId> <address1>160 Congress Park Dr</address1> <address2>Ste 205</address2> <city>Delray Beach</city> <state>FL</state> <countryId>0</countryId> <latitude>26.4581805</latitude> <longitude>-80.0940717</longitude> <baseDistance>9022408</baseDistance> </address> <contact> <contactId>1728596</contactId> <customerId>1223587</customerId> <firstName>John</firstName> <lastName>Doe</lastName> <title></title> <email>jdoe@gmail.com</email> <phoneNumber>12345678901</phoneNumber> <phoneExt></phoneExt> <altPhoneExt></altPhoneExt> <pin>6674</pin> <enabled>true</enabled> <createdDate>09/17/2018 14:30:42</createdDate> <fax></fax> <admin>true</admin> </contact> <addressList/> <contactList/> <mobiForms/> </customer> </response> |