Docs
Create Resource
POST /resources
POST
/resourcesRequired Tokens
| Field | Type | Required | Description |
|---|---|---|---|
| Bearer | Authorization: Bearer <api-key> | Optional | Your API key. Pass it as the Bearer token on every request. |
| Organization token | x-Organization-Token | Optional | Run **Authorize Organization** in the Authorization folder. |
Creates one inventory resource. The variant's axis values are written onto the resource from the variant.
Requires
ResourceInventory.Edit permission.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| type | string | Required | `Asset` or `Crew`. |
| resourceTypeId | Guid | Required | The type. |
| resourceVariantId | Guid | Required | A live variant of the type. |
| name | string | Required | Name. |
| label | string | Optional | Label. |
| identifier | string | Optional | Serial or asset tag. |
| quantity | int? | Optional | Pooled and Expendable stock. |
| crewId | Guid? | Optional | For Crew. |
| settlement | string | Optional | `OwnedCost` or `Invoiceable`. |
| rateCardId | Guid? | Optional | One of the type's cards. |
| attributeValues | array | Optional | `{ resourceAttributeId, value }`. A required Inventory-active attribute (not Checkbox) can't be left blank. |
Response
201 Created with the new resource's id as a bare Guid.
Error Codes
| HTTP Status | Description |
|---|---|
| 400 | Invalid arguments, or a required Inventory attribute left blank ("A value is required for {names}."). |
| 404 | Type, variant or card not found. |