Contractor Dashboard
Contractors need a space to view their profile information and payment history as well as access their 1099 form and other tax information. You can provide this out-of-the-box with the white-label component or build a custom dashboard using our API.
In this guide
- The endpoints needed to recreate the Contractor Dashboard.
- How to embed the white-label Contractor Dashboard in your application.
API
Weโll use Zealโs white-labeled Contractor Dashboard as a reference for our custom dashboard.
How to build a Home Page
Note
Remember to replace the placeholders such as
{{testApiKey}}
in the code samples below.
curl --request GET \
--url 'https://api.zeal.com/contractorPayments?companyID={{companyID}}&contractorID={{contractorID}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{testApiKey}}' \
- Call Get Contractor Payment by ID to show details of a particular payment.
curl --request GET \
--url 'https://api.zeal.com/contractorPayment?companyID={{companyID}}&contractorPaymentID={{contractorPaymentID}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{testApiKey}}' \
How to build a Profile Page
- Use Get/Update Contractor Information to allow the contractor to view/edit their profile information.
curl --request GET \
--url 'https://api.zeal.com/contractors?companyID={{companyID}}&contractorID={{contractorID}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{testApiKey}}'
- Call Get Bank Account by Employee/Contractor ID to get information about a contractor's bank account. Use Update Bank Account to allow the contractor to correct their bank information.
curl --request GET \
--url 'https://api.joinpuzzl.com/bankaccount?companyID={{companyID}}&id={{contractorID}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{testApiKey}}'
How to build a Contractor Documents section
Call Get Documents to retrieve a list of employee documents such as 1099s or 1099 Cs.
curl --request GET \
--url 'https://api.zeal.com/documents?companyID={{companyID}}&id={{contractorID}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{testApiKey}}'
White-Label
There are two ways to allow a Contractor to access their dashboard.
SSO Link
- If youโve already authenticated the contractor on your system, call Generate Contractor Dashboard Link to get an SSO link directly to the contractor's dashboard.
curl --location --request POST 'https://api.zeal.com/getAuthLink'
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{testApiKey}}' \
--header 'Content-Type: application/json'
--data-raw '
{
"partnerID": "{{partnerID}}",
"companyID": "{{companyID}}",
"contractorID": "{{contractorID}}"
}
'
- Now, allow the contractor to access the link or embed the component directly in your application through an iframe .
<a href="{{contractorLoginLink}}">Click to begin payroll onboarding!</a>
Login Credentials
- During the Contractor Onboarding, include the account creation step by setting
"contractor_acct": true
curl --request POST \
--url https://api.zeal.com/contractors/onboard \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{testApiKey}}' \
--header 'Content-Type: application/json' \
--data '
{
"profile": true,
"contractor_acct": true
}
'
- The contractor creates credentials that they can use to log into their contractor dashboard.
- The contractor navigates to your domain (e.g. payroll.[your-domain].com) and inputs their credentials to log in.
Recap
- The Contractor Dashboard provides core functionality to your payroll products such as allowing users to access paystubs and personal information.
- All the data and processes needed to build your customer contractor dashboard are exposed through Zeal's API endpoints.
- You may embed the white-label Contractor Dashboard directly in your application.
Updated 2 months ago