Skip to content

Create Template

Creates the specified templates.

Verb PUT
Endpoint {base-url}/templates/
Max Page Size N/A

Request body

{
  "body": [
    {
      "organizationId": 1,
      "name": "Lunch Room Template",
      "comment": null,
      "count": 0
    }
  ]
}

Note

All changes in this request are atomic. If any item fails, the entire batch is rolled back and no changes are made.

Returns

On Success

The IDs of the created templates.

Response body

[
  6
]

On Error

HTTP Code Error Code Definition
403 DATA_ACCESS_VIOLATION One or more of the specified organizationId values belong to an organization you do not have access to.
422 VALIDATION_ERROR A required field is missing or invalid (e.g. organizationId must be a positive integer, name is required and must be 25 characters or fewer, comment must be 100 characters or fewer).