Get Or Create Document Info
get_or_create_document_infoFetch or create a document in Procore and get only essential document details for UI, with default company and project from config.
Instructions
Get or create a document and return only essential document information for UI. company_id and project_id default to the values set by procore_set_config when omitted. Acts on the or create document info and returns Procore's response for the operation. Failures come back as an error payload carrying the HTTP status — commonly 401 when the token has expired, 403 without tool permission, and 404 when an id does not resolve. Required parameters: company_id, project_id, item_id, item_type. Procore API (v2.0): Project Management > Document Markup. Endpoint: POST /rest/v2.0/companies/{company_id}/projects/{project_id}/viewer_documents/get_or_create
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | JSON request body field — unique identifier of the item | |
| item_type | Yes | JSON request body field — the item type for this Document Markup operation | |
| company_id | Yes | URL path parameter — unique identifier of the company | |
| project_id | Yes | URL path parameter — unique identifier of the project | |
| attachment_id | No | JSON request body field — unique identifier of the attachment | |
| attachment_source | No | JSON request body field — the attachment source for this Document Markup operation | |
| internal_pdm_tool_data | No | JSON request body field — internal_pdm_tool_data |