PUT: ADD CLIENT
PUT
client
https://www.bizstim.com/api/client
ELEMENT | TYPE | DESCRIPTION |
---|---|---|
first_name |
string | required |
last_name |
string | required |
status |
string | required (active, inactive, prospect) |
state |
string | required |
country |
string | required |
city |
string | optional |
text_phone |
string | optional (format: 9055551111,9055552222) |
email |
string | optional (format: blah@mail.com,bah@mail.com) |
address1 |
string | optional |
address2 |
string | optional |
zipcode |
string | optional |
p_phone |
string | optional |
s_phone |
string | optional |
password |
string | optional |
password2 |
string | optional (confirm password) |
username |
string | optional (must be unique) |
start_date |
string | optional (YYYY-MM-DD) |
timezone |
string (see note below) | optional |
meeting_url |
string | optional |
service_id |
array | optional (array of service ID's assigned to the client) |
custom_??? |
string | optional. Add the custom post type ID to the field where you see the question marks. For example: custom_23. Use this field if you have custom post types for clients. The ID's can be derived from querying custom post types. |
notes |
string | optional |
mAvailf |
string | optional (Monday Start Time - HH:MM) |
mAvailt |
string | optional (Monday End Time - HH:MM) |
tAvailf |
string | optional (Tuesday Start Time - HH:MM) |
tAvailt |
string | optional (Tuesday End Time - HH:MM) |
wAvailf |
string | optional (Wednesday Start Time - HH:MM) |
wAvailt |
string | optional (Wednesday End Time - HH:MM) |
rAvailf |
string | optional (Thursday Start Time - HH:MM) |
rAvailt |
string | optional (Thursday End Time - HH:MM) |
fAvailf |
string | optional (Friday Start Time - HH:MM) |
fAvailt |
string | optional (Friday End Time - HH:MM) |
satAvailf |
string | optional (Saturday Start Time - HH:MM) |
satAvailt |
string | optional (Saturday End Time - HH:MM) |
sunAvailf |
string | optional (Sunday Start Time - HH:MM) |
sunAvailt |
string | optional (Sunday End Time - HH:MM) |
- * For the
timezone
field use the Timezone get method and select an appropriate value from theTimeZone
field. - * If the
timezone
is unrecognized or empty, America/New_York will be applied as default.
{ "id": 1546, "status": "success", "code": 6, "response": "The client was added successfully." }
ELEMENT | TYPE | DESCRIPTION |
---|---|---|
id |
integer | Unique ID of the newly created client |
status |
string | success or failure |
code |
integer |
The code is the return response from the API and identifies what happened with respect to the client being added to the database, and an e-mail sent to the receiver.
0 validation errors 1 Client id or client information missing. 2 There is already a client with that name. 3 Passwords do not match. 4 That username is already taken. 5 Unable to create the client. 6 The client was added successfully. |
PUT: CLIENT SALES INQUIRY
PUT
clientinquiry
a = 0 or 1
save client as 'prospect' in database b = 1, 2, or 3
inquiry e-mail recipient identifier c = username or e-mail
inquiry e-mail recipient username or defined e-mailhttps://www.bizstim.com/api/clientinquiry
https://www.bizstim.com/api/clientinquiry/{a}
https://www.bizstim.com/api/clientinquiry/{a}/{b}
https://www.bizstim.com/api/clientinquiry/{a}/{b}/{c}
ELEMENT | TYPE | DESCRIPTION |
---|---|---|
first_name |
string | required |
last_name |
string | required |
city |
string | required |
state |
string | required |
country |
string | required |
email |
string | required |
p_phone |
string | optional |
message |
string | required |
{ "status": "success", "code": 1, "response": "E-mail success. Client previously added to database." }
ELEMENT | TYPE | DESCRIPTION |
---|---|---|
status |
string | success or failure |
code |
integer |
The code is the return response from the API and identifies what happened with respect to the client being added to the database, and an e-mail sent to the receiver.
0 e-mail sent | client not added to the database 1 e-mail sent | client already in database 2 e-mail sent | failure adding client to database 3 e-mail sent | client added to the database 4 e-mail send error | [database outcome message] 5 validation errors
We recommend you use the return |
response |
string |
Possible responses are:
|
Information on Parameters
Parameter 1
Do you want to create a client record within the CRM software and assign them as a prospect?
Options are 0
: do not create a client record, 1
: create a client record, or {blank}
(do not provide a parameter): do not create a client record.
If you do not provide a 0 or 1 for this parameter, you may not provide additional parameters.
In this case, only an e-mail will be sent to the admin.
The software will use the e-mail address stored for the admin user, NOT the business e-mail.
You may define an e-mail address using parameter 3.
Parameter 2
Who receives via e-mail the client inquiry?
Options are 1
: admin, 2
: staff, or 3
: defined e-mail.
To set a parameter 2, you must have a parameter 1.
Parameter 3
If parameter 2 = 2
, provide the username
of the staff user.
If parameter 2 = 3
, provide an e-mail address you want the client inquiry sent to.
The e-maill address must be constructed in a specific way.
For example: sending an e-mail to sales@mysite.com
must be written as sales_mysite~com
.
Replace the @ symbol with an _ (underscore), and replace the . (dot) symbol with a ~ (tilda).
The software will convert the e-mail address and check to ensure it is properly formatted.
If the e-mail is incorrectly formatted, the admin user will be notified instead.
Possible API URL's
-
https://www.bizstim.com/api/clientinquiry
https://www.bizstim.com/api/clientinquiry/0
https://www.bizstim.com/api/clientinquiry/0/1
send e-mail to admin -
https://www.bizstim.com/api/clientinquiry/1
https://www.bizstim.com/api/clientinquiry/1/1
send e-mail to admin and create client record in db https://www.bizstim.com/api/clientinquiry/0/2/johngreen
send e-mail to staff with username = johngreenhttps://www.bizstim.com/api/clientinquiry/1/2/johngreen
send e-mail to staff with username = johngreen and create client record in dbhttps://www.bizstim.com/api/clientinquiry/0/3/sales_mysite~com
send e-mail to a defined e-mail of sales@mysite.comhttps://www.bizstim.com/api/clientinquiry/1/3/sales_mysite~com
send e-mail to a defined e-mail of sales@mysite.com and create client record in db
Integration Information
PUT: GET CLIENT BY E-MAIL
PUT
clientbyemail
https://www.bizstim.com/api/clientbyemail
ELEMENT | TYPE | DESCRIPTION |
---|---|---|
email |
string | required |
- * If the response did not find a client you should also make a call to the
GET: ALL CLIENTS API
. We make this recommendation because there may be multiple e-mail addresses for a single client separated by a comma. If a space was added to the e-mail string this API call will fail. We strip spaces from the e-mail field but there may be rare cases of parsing error.
{ "status": "success", "response": [ { "id": "49", "first_name": "Jane", "last_name": "Smith" }, } ... { ] }
ELEMENT | TYPE | DESCRIPTION |
---|---|---|
status |
string | success or failure |
response |
array of objects | An e-mail address can be associated with multiple accounts. Therefore, the return response is an array of objects where each object provides the client's:
|