> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/product-collections/deactivate-a-product-collection.md).

# Deactivate a product collection

**Soft-deletes** the collection by setting `is_active` to `false`. The record is not removed and can be reactivated with `PATCH /product_collections/{id}/` sending `{"is_active": true}`.

```json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"Product Collections","description":"Administrative endpoints for **product collections** — named, reusable sets of products used to target promotions and campaigns. A basket offer references a collection to scope which products satisfy a condition and/or which products receive a benefit (for example a gift or sample-product collection). Collections are also referenced by CMS product-collection widgets.\n\nMembership is defined by explicit product↔collection links (managed through the separate `product_collection_items` endpoints); the collection record itself carries only its name, slug, ordering, and type.\n\n## Core Capabilities\n\n**1. Listing & Filtering**\n* Retrieve a paginated list of product collections (active and inactive).\n* Filter by `uuid`, `slug`, `name`, `is_active`, or a set of identifiers with `pk__in`.\n* Order results with the `sort` parameter.\n\n**2. Full CRUD**\n* Create a collection.\n* Retrieve a single collection.\n* Fully or partially update a collection.\n* Deactivate a collection (soft delete — see **Deleting a Product Collection**).\n\n## Product Collection Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `pk` | integer | The unique identifier of the collection. Read-only. |\n| `uuid` | string (uuid) | A stable unique identifier assigned on creation. Read-only. |\n| `name` | string (max 255) | The display name of the collection. Required on create. |\n| `slug` | string (max 255) | A URL-friendly identifier. Required on create and full update. Not required to be unique. |\n| `is_active` | boolean | Whether the collection is active. Defaults to `true`. |\n| `sort_option` | integer or `null` | The identifier of a sort option applied when listing the collection's products. Optional. |\n| `collection_type` | string enum | `static` (membership is the explicit product list) or `dynamic`. Defaults to `static`. |\n| `created_date` | string (date-time) | Read-only. When the collection was created. |\n| `modified_date` | string (date-time) | Read-only. When the collection was last modified. |\n\n## Collection Types\n\n| Value | Meaning |\n|-------|---------|\n| `static` | Membership is the explicit set of products linked to the collection. |\n| `dynamic` | Reserved for rule-based membership. |\n\n## Deleting a Product Collection\n\n> **Important:** `DELETE /product_collections/{id}/` is a **soft delete** — it sets `is_active` to `false` and keeps the record. The collection can be reactivated at any time with `PATCH /product_collections/{id}/` sending `{\"is_active\": true}`.\n\n## Filtering & Ordering\n\n| Parameter | Match |\n|-----------|-------|\n| `uuid` | The collection by its exact UUID. |\n| `slug` | Case-insensitive contains match on the slug. |\n| `name` | Case-insensitive contains match on the name. |\n| `is_active` | Boolean active status. |\n| `pk__in` | A comma-separated list of identifiers — keeps the collections whose `pk` is in the list. |\n\nNo default ordering is applied. Use the `sort` parameter to order the results; prefix a field with a hyphen for descending order.\n\n## Dynamic Settings & Environment Variables\n\nNo dynamic settings (`dj_dynamic_settings`) are read by these endpoints, and no environment variables are read directly. Create, update, and delete are fully synchronous and trigger no background tasks."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/v1/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"responses":{"Unauthorized":{"description":"Authentication credentials were not provided or are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The authenticated user does not have administrator privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ProductCollectionNotFound":{"description":"The requested product collection does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"An error response.","properties":{"detail":{"type":"string","description":"A human-readable description of the error."}},"additionalProperties":true}}},"paths":{"/product_collections/{id}/":{"delete":{"tags":["Product Collections"],"operationId":"deleteProductCollection","summary":"Deactivate a product collection","description":"**Soft-deletes** the collection by setting `is_active` to `false`. The record is not removed and can be reactivated with `PATCH /product_collections/{id}/` sending `{\"is_active\": true}`.","responses":{"204":{"description":"The collection was deactivated successfully. No response body."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductCollectionNotFound"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.akinon.com/commerce-openapis/admin/product-collections/deactivate-a-product-collection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
