Get Or Create Context With Hierarchy
get_or_create_context_with_hierarchyRetrieve an existing context hierarchy or create a new one with default layers for Document Markup records using context type and ID.
Instructions
Get existing context hierarchy based on context_type and context_type_id combination. If context doesn't exist, create a new context with default layers and return the hierarchy. Use this to perform the get or action on Document Markup records. Creates a new Document Markup records and returns the created object on success (HTTP 201). Required parameters: company_id, project_id, name, context_type, context_type_id. Procore API: Project Management > Document Markup. Endpoint: POST /rest/v1.0/companies/{company_id}/projects/{project_id}/contexts/get_or_create
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| company_id | Yes | URL path parameter — unique identifier for the Procore company | |
| project_id | Yes | URL path parameter — unique identifier for the Procore project | |
| name | Yes | JSON request body field — the name for this Document Markup operation | |
| context_type | Yes | JSON request body field — the context type for this Document Markup operation | |
| context_type_id | Yes | JSON request body field — unique identifier of the context type | |
| sub_context_type | No | JSON request body field — the sub context type for this Document Markup operation | |
| sub_context_type_id | No | JSON request body field — unique identifier of the sub context type | |
| settings | No | JSON request body field — the settings for this Document Markup operation |