---
title: "Update an allocation template"
method: PUT
path: "/demand/accounts/{account_id}/allocation-templates/{template_id}"
tags: ["Allocation Templates Admin"]
---

# Update an allocation template

`PUT /demand/accounts/{account_id}/allocation-templates/{template_id}`

## Request

- Base URL: `https://api.cint.com/v1`
- URL: `https://api.cint.com/v1/demand/accounts/{account_id}/allocation-templates/{template_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/cint/apis/demand-api/docs/demand/accounts/:account_id/allocation-templates/:template_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates the name and allocation specifications for a template. This endpoint uses the If-Match header for optimistic locking. To get the required ETag value, first make a GET request for this resource.

## Headers

- `If-Match` string, etag

## Request body

- AllocationTemplateUpdateRequest
  - `name` string, required: A descriptive name for the allocation template.
  - `supply_allocations` union[], required: A list of allocation objects. You must include a `type` field in each object (`blocked`, `group`, or `exchange`) to define its structure and purpose.
    - union
      - AllocationTemplateExchangeSupplier
        - `type` 'exchange', required: The type of supply allocation. For this object, the value is always `exchange`.
        - `percentage_max` integer, required: The inclusive maximum percentage of survey completes that can come from this allocation.
        - `percentage_min` integer, nullable, required: The inclusive minimum percentage of survey completes that can come from this allocation.
      - AllocationTemplateGroupSupplier
        - `type` 'group', required: The type of supply allocation. For this object, the value is always `group`.
        - `name` string, required: The name of the allocation group.
        - `percentage_max` integer, required: The inclusive maximum percentage of completes that can come from this allocation.
        - `percentage_min` integer, nullable, required: The inclusive minimum percentage of completes that can come from this allocation.
        - `suppliers` AllocationTemplateSupplier[], required
          - `supplier_id` integer, required: The ID of the supplier
      - AllocationTemplateBlockedSupplier
        - `type` 'blocked', required: The type of supply allocation. For this object, the value is always `blocked`.
        - `suppliers` AllocationTemplateSupplier[], required
          - `supplier_id` integer, required: The ID of the supplier

## Response `204`

The allocation template was updated successfully.

## Other responses

- `400`: A request is not valid and can't be processed.
- `401`: A request is unauthorized.
- `403`: A requested is forbidden.
- `404`: A requested resource isn't found.
- `412`: The resource could not be modified because the ETag in the If-Match header does not match the current version. This means the resource was updated by another request after you retrieved it.
- `500`: A request failed due to an internal error.

---

[API](https://skmtc.dev/cint/apis/demand-api.md) - [All operations](https://skmtc.dev/cint/apis/demand-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cint/apis/demand-api/revisions/077a4bdda5cb?raw)
