Skip to content

Commit 9a2adf3

Browse files
committed
feat: add technical guide for PDM API
1 parent c755a36 commit 9a2adf3

2 files changed

Lines changed: 1065 additions & 4 deletions

File tree

document_management_integration/document_management_metadata_details.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,31 @@ All metadata fields follow a consistent structure in Document Upload and Documen
344344
}
345345
```
346346

347+
### Constructing the Fields Array for API Requests
348+
349+
When initializing or updating documents using the Document Uploads API (POST or PATCH requests), you will pass your metadata values inside the `fields` array. This array acts as a map, linking a specific project field's ID to the value you want to apply.
350+
351+
Because Procore supports diverse field types — ranging from open text to strict dropdown lists — the format of the value you provide depends entirely on the field's data type. For example, text fields accept literal strings, whereas List of Values (LOV) fields require you to pass specific Procore value IDs.
352+
353+
Use the following structuring rules and reference table to correctly construct your `fields` array payloads.
354+
355+
**Structuring Rules**
356+
357+
- **Always wrap values in an array**, even for single-value fields.
358+
- **Text-type fields** (`string` / `numeric` / `timestamp`): Use literal values directly.
359+
- **Select-type fields** (`lov_entry` / `lov_entries`): You cannot pass literal text. You must use the value IDs retrieved from the [List Project Metadata Values](https://developers.procore.com/reference/rest/document-management-fields?version=2.0#list-document-management-project-field-values) endpoint.
360+
- **For `lov_entries` multi-select**: Pass multiple value IDs inside the single `values` array, e.g., `"values": ["ID_1", "ID_2"]`.
361+
362+
**Quick Reference: How to Structure Field Values**
363+
364+
| Field Type | From: List Fields | From: List Field Values | Fields Array Entry Example |
365+
| --- | --- | --- | --- |
366+
| `lov_entry` (single select) | `{ "id": "01JDXMPK09...", "name": "type", "type": "lov_entry" }` | `{ "id": "01JDXMPK0H...", "code": "DRW", "label": "Drawing" }` | `{ "id": "01JDXMPK09...", "values": ["01JDXMPK0H..."] }` |
367+
| `lov_entries` (multi-select) | `{ "id": "01JDXMPK0K...", "name": "disciplines", "type": "lov_entries" }` | `{ "id": "01JDXMPK0H...", "label": "Structural" }`, `{ "id": "01JDXMPK0I...", "label": "Electrical" }` | `{ "id": "01JDXMPK0K...", "values": ["01JDXMPK0H...", "01JDXMPK0I..."] }` |
368+
| `string` | `{ "id": "01JDXMPK0B...", "name": "revision", "type": "string" }` || `{ "id": "01JDXMPK0B...", "values": ["Rev A"] }` |
369+
| `numeric` | `{ "id": "01JDXMPK0C...", "name": "page_count", "type": "numeric" }` || `{ "id": "01JDXMPK0C...", "values": ["42"] }` |
370+
| `timestamp` | `{ "id": "01JDXMPK06...", "name": "date_authored", "type": "timestamp" }` || `{ "id": "01JDXMPK06...", "values": ["2025-12-15T14:30:00Z"] }` |
371+
347372
### Querying Project Fields
348373

349374
To identify which fields are configured for a specific project, query the [List Project Fields](https://developers.procore.com/reference/rest/project-fields?version=latest#list-project-fields) endpoint.
@@ -1008,5 +1033,3 @@ Document Management can process 3D model files (BIM/Building Information Models)
10081033
}
10091034
</code></pre>
10101035
</details>
1011-
1012-
***

0 commit comments

Comments
 (0)