Skip to content

Workspace API

Add View Records

Add records to a Static View with POST /workspace/views/{id}/records/add and /add/batch.

Endpoints
POST https://api.parcelengineering.com/api/v1/workspace/views/{id}/records/add
POST https://api.parcelengineering.com/api/v1/workspace/views/{id}/records/add/batch

Adds one or more record IDs to a Static View. Dynamic Views are rejected with 400 view_type_mismatch. Adds are idempotent: an ID already in the View reports ok.

Add costs 0 credits. Requires workspace:write.

Path parameters

ParameterDescription
idUUID of the Static View.

Request body

Single:

{ "record_id": "8a1f3c2e-0001-4b7d-9e5a-000000000001" }

Batch:

{
"inputs": [
{ "record_id": "8a1f3c2e-0001-4b7d-9e5a-000000000001" },
{ "record_id": "9b2e4d3f-0002-4b7d-9e5a-000000000002" }
]
}

1–100 inputs. Each record must exist in the View’s dataset and be visible to the workspace under the same pre-write rules as the web table. A candidate membership cannot authorize itself.

Example

Add a record to a Static View
curl -X POST \
https://api.parcelengineering.com/api/v1/workspace/views/a1b2c3d4-0001-4e8d-bf6a-000000000001/records/add \
-H "Authorization: Bearer pcl_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "record_id": "8a1f3c2e-0001-4b7d-9e5a-000000000001" }'

Response

Response
{
"data": {
"view_id": "a1b2c3d4-0001-4e8d-bf6a-000000000001",
"results": [
{
"index": 0,
"record_id": "8a1f3c2e-0001-4b7d-9e5a-000000000001",
"status": "ok"
}
]
},
"metadata": { "credits": 0, "succeeded": 1, "failed": 0 }
}

Errors

CodeStatusWhen
view_not_found404Unknown View.
view_type_mismatch400Parent is Dynamic.
record_not_found(per item)ID missing from the dataset.
record_not_visible(per item)Record exists but is not visible to the workspace.