2.0.0
OAS3
This is a REST API that provides access to Riskcast data.
An API key is required in order to gain access. This will be used to generate a token that provides both authorization and authentication. The API key is a 40 character alphanumeric string value specific to your Riskcast tenant account. The API key is associated to an integration account specific to your Riskcast account that will have access to all of your Riskcast resources. Therefore, it is important that you safeguard your API key and it not be shared with anyone. A new API key can be generated if the original is compromised. Integration into this API using user-specific credentials is currently NOT supported.
The API key should be added as an x-api-key
header in all HTTPS requests. HTTP (non SSL) requests are not supported. If your API key is a read only key, then only GET requests will be allowed. All other requests will be denied and return a 403 Forbidden
error.
Any date fields labeled as Integer should be formatted as YYYYMMDD
. This applies to both query parameters and entity fields. For example, February 9th, 2023 would be formatted as 20230209
.
In contrast, the updatedAfter
date available as a parameter in most endpoints must be provided in ISO 8601 format. For example, February 9th, 2023 in UTC would be formatted as 2023-02-09T00:00:00Z
.
Several endpoints support paging. However, the page
parameter is optional. If it is NOT provided, then all available records are returned, as long as the count is equal to or less than 8000
records. An error will be thrown if there are more than 8000
records and a page
is not provided.
Riskcast provides production and test environments. If a test environment has not been created for your Riskcast account, you will need to submit a request to customer support to have one created for you. Both the production and test environments provide access to this API. The URL endpoints for each environment are listed below.
To ensure fair usage and maintain system stability, the following API rate limits apply:
Some of the list
end points have a record limit associated to them. If the record limit exceeds our internal limits, an error 413 Maximum results count allowed is ####
will be returned. Upon getting this error,
the client should adjust the parameters to lower the number of records retrieved.
It is possible to filter records returned from list endpoints that accept the filter
query parameter. The syntax for filter query is very similar to the one specified in OData Standard.
The only operators supported at the moment are: and
, eq
. For example, the following query would return the list of projects that are closed: GET /projects&filter=closed eq true
. When constructing these queries, it's important
to follow the rules below:
left_operand operator right_operand
)field eq 'string value'
)field eq 10
, field eq false
)and
operator, within the same filter
query parameter (filter=field1 eq 'value1' and field2 eq true
)What follows is an overview of the endpoints and the workflows needed to process payroll exports.
Get Export Formats for the company. An export format defines the schema that the data will be retrieved in. Riskcast allows a company to have more than one export format. However, most clients only end up using one format, per company. Each company will require a unique export format Id, even if every company ends up using the same schema. Use this endpoint to get the id for the Export Format you desire.
GET /core/payrollexports/exportformats?companyId={{companyId}}
Once you know the export format Id for the company, get a list of payroll exports for the given week end date and projectIds. If projectIds is an empty array, then all projects for that week are retrieved. Provide the flag isReceivedByERP
as true/false to specify whether you want exports that have already been received and processed. Send isReceivedByERP = false
to retrieve payroll exports that have not yet been received and processed. If isReceivedByERP
is not provided, then all payroll exports are sent back.
GET /core/payrollexports?exportFormatId={{exportFormatId}}&weekEndDateKey={{weekEndDateKey}}&isReceivedByERP={{isReceivedByERP}}&projectId={{projectId1}}&projectId={{projectId2}}
For each available payroll export Id, request the export data for that export. This contains the formatted labor, equipment, and "other" export data using the schema specified by the export format Id. The type
parameter is optional and can be one of the following values: labor
, equipment
, other
. If type
is not provided, then labor is returned. The snapshot
parameter is optional and can be one of the following values: true
, false
. If snapshot
is true, then the data is returned as a snapshot of the data at the time of the export. If snapshot
is false or not provided, then the data is returned as a live view of the data.
GET /core/payrollexports/{{id}}/data?type={{type}}&snapshot={{snapshot}}
Optional. Update the status of the payroll export to set the status of isReceivedByERP to true. It is recommended that this is done so that future requests in STEP 2 only retrieve exports that have NOT yet been processed.
PUT /core/payrollexports/{{id}}/received
In order to reset a payroll export if an error occurs, use the following end point
PUT /core/payrollexports/{{id}}/reset
https://apiv2.riskcast.com
environment |