Create a record
productive_createValidates required attributes and names, then creates a record on any writable resource. For financial or administrative resources, returns a staged operation for review before committing.
Instructions
Create a record on any writable resource. Required attributes are checked first, and so is every attribute name. On a financial or administrative resource this returns a staged operation to review rather than creating anything — pass it to productive_commit_operation to go through with it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resource | Yes | ||
| attributes | No | Attributes to write, by their Productive names. Validated against the resource contract first, because Productive answers 200 and ignores an unknown attribute rather than reporting it. Custom-field values go in a nested `custom_fields` object keyed by field id. | |
| relationships | No | JSON:API relationships, where the resource accepts them. Most links are set through an `_id` attribute instead. |