Skip to main content

Source Data

Read

Most Agave API endpoints allow you to fetch the raw data from the Source System that are not included in Agave API’s unified model.

If you would like to use endpoints in a Source System that aren't yet supported by Agave API, you create an Authenticated Pass-through Request instead.

Here is example source_data returned from Procore for the Get Project endpoint:

Example Request

curl https://api.agaveapi.com/projects/ee9b53e7-f982-4be6-bc12-75f716d3ee94 \
--header 'API-Version: 2021-11-21' \
--header 'Client-Id: CLIENT_ID' \
--header 'Client-Secret: CLIENT_SECRET' \
--header 'Account-Token: ACCOUNT_TOKEN'
--header 'Include-Source-Data: true'

Example Response

  {
"id": "ee9b53e7-f982-4be6-bc12-75f716d3ee94",
"source_id": "12345",
"address": {
"street_1": "123 Main Street",
"street_2": "Unit 1",
"city": "AnyTown",
"state": "California",
"postal_code": "19703",
"country": "US"
},
"amount": 500000,
"completion_date": "2022-01-01",
"name": "Test Project-1",
"number": "A123",
"start_date": "2022-01-01",
"status": "Active",
"type": "Residential",
"source_data": {
"id": 12345,
"name": "Test Project-1",
"is_demo": false,
"parent_job_id": null,
"display_name": "Test Project 1",
"project_number": "A123",
"address": "123 Main Street, Unit 1",
"city": "AnyTown",
"state_code": "DE",
"country_code": "US",
"zip": "19703",
"county": "New Castle County",
"time_zone": "Pacific Time (US & Canada)",
"latitude": null,
"longitude": null,
"stage": "None",
"phone": "(123) 555-0100",
"created_at": "2022-01-01T00:00:00Z",
"updated_at": "2022-01-01T00:00:00Z",
"active": true,
"origin_id": null,
"origin_data": null,
"origin_code": null,
"owners_project_id": null,
"estimated_value": "500000.0",
"project_region_id": null,
"project_bid_type_id": null,
"project_owner_type_id": null,
"photo_id": null,
"start_date": "2022-01-01",
"completion_date": "2023-01-01",
"total_value": "500000.0",
"accounting_project_number": null,
"store_number": null,
"designated_market_area": null,
"custom_fields": [ ],
"company": {
"id": 12345,
"name": "AnyCompany"
}
}
}

Write

In addition to supporting reading source data, Agave supports writing to source data and accessing fields that are not included in our unified data model.

Example Request

curl --request POST 'https://api.agaveapi.com/budget-line-items' \ 
--header 'API-Version: 2021-11-21' \
--header 'Client-Id: CLIENT_ID' \
--header 'Client-Secret: CLIENT_SECRET' \
--header 'Account-Token: ACCOUNT_TOKEN' \
--header 'Include-Source-Data: true' \
--header 'Project-Id: b10f7906-e65e-5a9e-9500-0ee1e73b4f1d' \
--header 'Content-Type: application/json' \
--data-raw '{
"cost_code_id": "c840285e-e65f-4342-943f-5950ef8072dc",
"cost_type_id": "c840285e-e65f-4342-943f-5950ef8072dc",
"name": "Equipment",
"original_amount": "100.00",
"quantity": "10.00",
"unit_of_measure": "hours",
"unit_cost": "10.0",
"wbs_id": "c840285e-e65f-4342-943f-5950ef8072dc",
"source_data": {
"code": "003000"
}
}'

Example Response

{
"data": [
{
"id": "ee9b53e7-f982-4be6-bc12-75f716d3ee94",
"source_id": "12345",
"cost_code_id": "ee9b53e7-f982-4be6-bc12-75f716d3ee94",
"cost_type_id": "ee9b53e7-f982-4be6-bc12-75f716d3ee94",
"current_amount": "100.00",
"name": "Equipment",
"original_amount": "100.00",
"quantity": "10.00",
"unit_of_measure": "hours",
"unit_cost": "10.0",
"wbs_id": "ee9b53e7-f982-4be6-bc12-75f716d3ee94",
"source_create_time": "2022-01-01T00:00:00Z",
"source_update_time": "2022-01-01T00:00:00Z",
"source_data": {
"path": "https://developer.api.autodesk.com/cost/v1/containers/{Container_Id}/budgets",
"content_type": "application/json",
"data": {
"id": "12345",
...
"name": "Solicitation",
"description": null,
"unit": "ea",
"code": "001000",
"plannedStartDate": null,
...
}
}
}
],
"meta": {...}
}