Shifts
Creating an API Key
- Create a new API Key in Accounts > API Keys
- Click on Add New
- You can now add the following details:
- Name
- Add the name of the API Key
- Comments
- Add any comments to go witih this Key
- Perrmissions > Give access to all campaigns
- Check this if this API Key should have access to all Jobs
- Perrmissions > Select jobs
- Add each job this API Key should have access to
- Name
- Press Submit
Retreiving your API Key
- Click on the Edit button
- Here you can take a Copy of your Key
Creating your Endpoint URL
- Your Endpoint URL will be:
https://subdomain.staffed.it/api/campaigns/get-data/{job-id}
- Where
subdomain
is the subdomain of your system - Where
{job-id}
is the Job ID of each report and can be retrieved the job list:- Go to Jobs > View Jobs
- The Job ID number is in ID column
- Go to Jobs > View Jobs
- Where
JSON request for retrieving shift details
- Request the body in JSON format
{
"token":"your-token-here",
"dateStart":"2023-03-31",
"dateEnd":"2023-04-30"
}
- token
- This is mandatory
- token
- API responses HTTP CODES:
- 400
- Incorrect request.
- If there's a specific error such as exportFormat incorrect or Wrong date then there will be an error message
- Incorrect request.
- 401
- Auth error
- No token or user inactive, etc
- Auth error
- 403
- Access denied for this report
- Report not added or does not exist
- Access denied for this report
- 200
- All is fine, and you have a JSON as the output
- All is fine, and you have a JSON as the output
- 400
JSON request for booking staff
Details available upon request
JSON request for unbooking staff
Details available upon request