Docs

Create Resource

POST /resources

POST/resources

Creates one inventory resource and returns its id; the variant's axis values are written onto it from the variant. The resourceTypeId and resourceVariantId (a live variant of the type) come from ResourceTypes_Get and ResourceTypes_GetVariants, and a rateCardId must be one of the type's own cards. For a Crew resource, crewId comes from OrgCrew_GetCrew. A required Inventory-active attribute (not Checkbox) cannot be left blank in attributeValues. To create many units of one type and variant at once, use Resources_BulkCreateResources. Needs the resource inventory edit permission.

Request Body

FieldTypeRequiredDescription
typestringOptional
resourceTypeIduuidOptional
resourceVariantIduuidOptional
namestringOptional
labelstringOptional
identifierstringOptional
quantityintegerOptional
crewIduuidOptional
settlementstringOptional
rateCardIduuidOptional
attributeValuesCreateResourceRequestAttributeValue[]Optional

CreateResourceRequestAttributeValue

FieldTypeDescription
resourceAttributeIduuid
valueJsonElement| null

Response

Type: uuid