The below demonstrates how to pull data from Procore and push it to Bridgit Bench using available public REST APIs. Perfect for subcontractors managing data transmission from Procore to Bridgit Bench.
In order to begin the process, you’ll need the following items:
First, you’ll need to configure your environment variables to limit the modifications you’ll need to make later on when data changes.
Setup OAuth2 in Postman to get an authorization code. See Generating OAuth 2.0 Tokens in Postman for step by step instructions.
Next you’ll need to complete a POST request to Procore to authorize the subsequent Procore requests to retrieve data.
Example:
To get a complete list of your company’s projects from Procore, run a GET request to the following path.
Example:
GET
https://{{procore_sandbox_url}}/vapid/projects?company_id={{procore_company_id}}
Then to get complete project details, you have to run a second GET request to the following subpath.
Example:
GET
https://{{procore_sandbox_url}}/vapid/projects/{{procore_project_id}}?company_id={{procore_company_id}}
Next, POST an authentication request to authenticate for subsequent Bench requests. See the Authentication instructions here.
Example:
To retrieve your Bench Account ID, complete another GET request to Bench.
Example:
GET
https://{{bench_url}}/rp/api/v1/Accounts
Now, finally, let’s create a project. Complete a POST request to Bench with the Procore project parameters required by Bench.
Example:
POST
https://bench.gobridgit.com/rp/api/v1/accounts/{{bench_account_id}}/projects
Example Post Body:
{
“name”: “{{procore_project_name}}”,
“colour”: #ffc0cb”,
“startDate”: “{{procore_project_start}}”,
“endDate”: “{{procore_project_end}}”
}
Example Response Body:
{
“Id”:10118,
“name”: “Sandbox Test Project”,
“colour”: “#ffc0cb”,
“startDate”: “2018-01-11”,
“endDate”: “2019-05-08”,
“state”: “Complete”
“unfilledRoles”: 0,
“totalRoles”: 0,
“issueCount”: 0,
“lastModification”: 2019-11-07T21:06:16.2455388Z”,
“currentPhases”:[]
}