Customer API Documentation: Giggle Finance
- 1 Introduction
- 1.1 Authentication
- 2 Create a Customer Record
- 2.1 End Point URL
- 2.2 Request Method
- 2.3 Request Body
- 2.4 Response
- 2.5 Example POST Request
- 2.5.1 Body
- 2.5.2 Example (Python)
- 2.5.3 Example Response (Success)
- 2.5.4 Example Response (Failure)
- 2.6 Error Handling
- 2.7 Notes
- 3 Read a Customer Record
- 3.1 End Point URL
- 3.2 Request Method
- 3.3 Request Body
- 3.4 Response
- 3.5 Example GET Request
- 3.5.1 Example (Python)
- 3.5.2 Example Response (Success)
- 3.5.3 Example Response (Failure)
- 3.6 Error Handling
- 3.7 Notes
- 4 Update a Customer Record
- 4.1 End Point URL
- 4.2 Request Method
- 4.3 Request Body
- 4.4 Response
- 4.5 Example PATCH Request
- 4.5.1 Body
- 4.5.2 Example (Python)
- 4.5.3 Example Response (Success)
- 4.5.4 Example Response (Failure)
- 4.6 Error Handling
- 4.7 Notes
- 5 Delete a Customer Record
- 5.1 End Point URL
- 5.2 Request Method
- 5.3 Request Body
- 5.4 Response
- 5.5 Example DELETE Request
- 5.5.1 Example (Python)
- 5.5.2 Example Response (Success)
- 5.5.3 Example Response (Failure)
- 5.6 Error Handling
- 5.7 Notes
- 6 Support
Introduction
The /customers
endpoint allows you to perform Create, Read, Update, and Delete queries for a Customer Record by providing relevant information. This endpoint is accessible through either a GET, POST, PATCH, or DELETE request and requires the use of a valid <api_key>
for authentication purposes. TaskSuite will provide the appropriate key for Giggle Finance.
Authentication
To access this endpoint, you need to include the <api_key>
in the header payload. The <api_key>
serves as an authentication mechanism to ensure only authorized users can manipulate Customer Records.
Create a Customer Record
End Point URL
https://www.giggle.tasksuite.com/webhook/json/v1/customers
Request Method
POST
Request Body
The request body must be a JSON payload with the following fields
Field | Sub-Field | Description | Data Type/Format | Required | Recommended | |
---|---|---|---|---|---|---|
1 | active |
| Either “true” or “false” indicating whether the customer is active or not. | Boolean | X |
|
2 | customerType |
| Either “person” or “company” indicating the type of customer record. | String | X |
|
3 | ssn |
| The Social Security Number of the contact person. | String |
|
|
4 | dob |
| The Date of Birth of the customer | String (YYYY-MM-DD) | X |
|
5 | name |
| The first name of the customer. | String | X |
|
6 | surname |
| The last name of the customer. | String | X |
|
7 | accessUserName |
| The first and last name of the customer. | String (firstname_lastname) E.G: john_doe | X |
|
8 |
| Email address of the customer. | String (johndoe@email.com) | X |
| |
9 | companyName |
| Name of the company the customer is affiliated with. | String | X |
|
10 | ein |
| Employer identification number provided by the employer. | String
| X
|
|
11 | giggleId |
| The unique identifier provided by Giggle for this Customer | Integer
| X |
|
12 | address |
| The address of the Customer | Object | X |
|
13 |
| street1 | Street address of the customer. | String | X |
|
14 |
| street2 | Additional address details (e.g. suite number) | String |
| X |
15 |
| country | Country Code where the Customer’s address resides. | String
| X |
|
16 |
| state | State of the customer’s address. | String | X |
|
17 |
| city | City of the customer’s address. | String | X |
|
18 |
| zip | Zip Code of the customer’s address. | String | X |
|
19 | phone |
|
| Object |
|
|
20 |
| number | Phone number of the user | string
| X |
|
21 |
| type | The type of phone the user has. | String
|
| X |
22 |
| carrierVerified | This is true if the carrier associated with this phone number is verified. true or false | Boolean | X |
|
23 |
| carrierName | The name of the carrier for this phone number | String |
| X |
Response
The response will indicate the success or failure of the request to the Contact endpoint. The details of the response may vary based on the implementation of the API. A typical response will be a JSON object containing a success message or an error message.
Example POST Request
The following example is how one would create a customer record in the TaskSuite system.
Body
{
"active": true,
"customerType": "person",
"ssn": 123456789,
"dob": "2000-01-30",
"name": "John",
"surname": "Doe",
"accessUserName": "john_doe",
"email": "john.doe@email.com",
"companyName": "ABC Company L.L.C",
"ein": 123456789,
"giggleId": 89043762,
"address": {
"street1": "123 Main St.",
"street2": "Suite 5.",
"country": "USA",
"city": "Austin",
"state": "TX",
"zip": "22222"
},
"phone": {
"number": "123-456-7890",
"type": "mobile",
"carrierVerified": true,
"carrierName": "AT&T"
}
}
Example (Python)
import requests
import json
url = "https://www.giggle.tasksuite.com/webhook/json/v1/customers"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <api_key>'
}
payload = json.dumps({
"active": true,
"customerType": "person",
"ssn": 123456789,
"dob": "2000-01-30",
"name": "John",
"surname": "Doe",
"accessUserName": "john_doe",
"email": "john.doe@email.com",
"companyName": "ABC Company L.L.C",
"ein": 123456789,
"giggleId": 89043762,
"address": {
"street1": "123 Main St.",
"street2": "Suite 5.",
"country": "USA",
"city": "Austin",
"state": "TX",
"zip": "22222"
},
"phone": {
"number": "123-456-7890",
"type": "mobile",
"carrierVerified": true,
"carrierName": "AT&T"
}
})
response = requests.request("POST", url, headers=headers, data=payload)
Example Response (Success)
Example Response (Failure)
Error Handling
In case of errors, the response will contain an appropriate error message with details on what caused the error. Make sure to handle these errors.
Notes
Ensure that the required fields are provided in the request body; otherwise, the API will return an error indicating the missing fields.
The
<api_key>
in the headers must be valid and active for the Customer creation to be successful.
Read a Customer Record
End Point URL
Request Method
GET
Request Body
None
Response
The response will indicate the success or failure of the request to the Contact endpoint. The details of the response may vary based on the implementation of the API. A typical response will be a JSON object containing a success message with the details of the Customer or an error message. This request will include the customer data as well as any loan data associated with the customer.
Example GET Request
The following is an example of how one would perform a GET request in the TaskSuite system.
Example (Python)
Example Response (Success)
Example Response (Failure)
Error Handling
In case of errors, the response will contain an appropriate error message with details on what caused the error. Make sure to handle these errors.
Notes
Ensure that the required fields are provided in the request body; otherwise, the API will return an error indicating the missing fields.
The
<api_key>
in the headers must be valid and active for the access to the Customer record to be successful.
Update a Customer Record
End Point URL
Request Method
PATCH
Request Body
The request body must be a JSON payload with the following fields. Please keep in mind that all fields are optional.
Field | Sub-Field | Description | Data Type/Format | |
---|---|---|---|---|
1 | active |
| Either “true” or “false” indicating whether the customer is active or not. | Boolean |
2 | customerType |
| Either “person” or “company” indicating the type of customer record. | String |
3 | ssn |
| The Social Security Number of the contact person. | Integer |
4 | dob |
| The Date of Birth of the customer | String (YYYY-MM-DD) |
5 | name |
| The first name of the customer. | String |
6 | surname |
| The last name of the customer. | String |
7 | accessUserName |
| The first and last name of the customer. | String (firstname_lastname) E.G: john_doe |
8 |
| Email address of the customer. | String | |
9 | companyName |
| Name of the company the customer is affiliated with. | String |
10 | ein |
| Employer identification number provided by the employer. | String
|
11 | address |
| The address of the Customer | Object |
12 |
| street1 | Street address of the customer. | String |
13 |
| street2 | Additional address details (e.g. suite number) | String |
14 |
| country | Country Code where the Customer’s address resides. | String
|
15 |
| state | State of the customer’s address. | String |
16 |
| city | City of the customer’s address. | String |
17 |
| zip | Zip Code of the customer’s address. | String |
18 | phone |
|
| Object |
19 |
| number | Phone number of the user | Integer
|
20 |
| type | The type of phone the user has. | String
|
21 |
| carrierVerified | This is true if the carrier associated with this phone number is verified. true or false | Boolean |
22 |
| carrierName | The name of the carrier for this phone number | String |
Response
The response will indicate the success or failure of the request to the Contact endpoint. The details of the response may vary based on the implementation of the API. A typical response will be a JSON object containing a success message or an error message.
Example PATCH Request
The following example is how one would update a customer record in the TaskSuite system.
Body
Example (Python)
Example Response (Success)
Example Response (Failure)
Error Handling
In case of errors, the response will contain an appropriate error message with details on what caused the error. Make sure to handle these errors.
Notes
Ensure that the required fields are provided in the request body; otherwise, the API will return an error indicating the missing fields.
The
<api_key>
in the headers must be valid and active for the access to the Customer record to be successful.
Delete a Customer Record
End Point URL
Request Method
DELETE
Request Body
None
Response
The response will indicate the success or failure of the request to the Contact endpoint. The details of the response may vary based on the implementation of the API. A typical response will be a JSON object containing a success message with the details of the Customer or an error message.
Example DELETE Request
The following is an example of how one would perform a GET request in the TaskSuite system.
Example (Python)
Example Response (Success)
Example Response (Failure)
Error Handling
In case of errors, the response will contain an appropriate error message with details on what caused the error. Make sure to handle these errors.
Notes
Ensure that the required fields are provided in the request body; otherwise, the API will return an error indicating the missing fields.
The
<api_key>
in the headers must be valid and active for the access to the Customer record to be successful.
Support
If there are any errors or discrepancies with this document or the related API endpoints. Please reach out to support@tasksuite.com and a support engineer with handle your query.