{"openapi":"3.0.0","info":{"title":"Afineo Webservices API — types","description":"Module `types` of the Afineo API v3 (8 endpoints).\n\nManage asset types (categories) within a library: create types, update properties, configure status assignments and set group permissions. Types define the classification and permission structure for assets.\n\nFull specification: https://api.afineo.io/openapi.json","version":"3.0.0","contact":{"name":"Afineo Solutions","url":"https://www.afineo.com"},"x-logo":{"url":"./logo.png","altText":"Afineo - Powerful Data, Powerful People"}},"servers":[{"url":"https://{instance}.afineo.io","description":"Afineo instance","variables":{"instance":{"description":"Your Afineo instance name","default":"client"}}}],"tags":[{"name":"types","description":"Manage asset types (categories) within a library: create types, update properties, configure status assignments and set group permissions. Types define the classification and permission structure for assets."}],"paths":{"/api/v3/types/assign-attributes/":{"post":{"tags":["types"],"summary":"assign-attributes — Sync attribute assignments for a type (add, update, remove)","description":"## Purpose\n\nSynchronizes which attributes are assigned to a record type, along with per-attribute display options. Send the **complete desired state** for this type: the endpoint computes a diff and applies additions, updates, and removals automatically.\n\n## Library Context\n\nThe library (class_id) is automatically derived from the type — no class_id parameter is required. To discover the class_id of a type, call `POST /api/v3/types/get` with the type `id` — the response includes `class_id`.\n\n## Mode (`replace` vs `add`)\n\nThe `mode` parameter controls **one thing only: whether attributes absent from your list are removed.** In both modes, every attribute you *do* send is created if missing or updated if already present (upsert) — the two modes handle the *unlisted* attributes differently.\n\n- `mode: \"replace\"` (**default**) — full SYNC / authoritative state. Send the complete desired set: attributes **not** in the list are **removed** from the type.\n- `mode: \"add\"` — non-destructive upsert. Attributes absent from the list are **kept** (never removed). Send only the attributes you want to add or change. Use it to touch a few attributes without resending the whole set (avoids accidentally emptying the type).\n\n> ⚠️ `add` is **not** insert-only: an attribute already assigned that you send again **with different options** (editability/hidden) **is updated**. Sent with identical options → `unchanged`. It is never duplicated. The only thing `add` never does is *remove*.\n\n## Per-attribute behavior (both modes)\n\n- Attribute in the list but NOT currently assigned → **added**\n- Attribute in the list AND already assigned → **updated** if options differ, **unchanged** if identical\n- Attribute currently assigned but NOT in the list → **removed** in `replace`, **kept** in `add`\n\nSending `assignments: []` with `mode: \"replace\"` removes **all** attributes from the type. Use with care (or use `mode: \"add\"`, under which an empty list is a no-op).\n\n## Per-attribute options\n\nEach assignment entry supports two optional display options:\n\n**`editability`** — controls editability of the attribute value for this type:\n- `\"default\"` (default) — inherits the attribute's global editability setting\n- `\"read_only\"` — value is always read-only for this type, regardless of the global setting\n- `\"editable\"` — value is always editable for this type, regardless of the global setting\n\nOmitting `editability` is equivalent to `\"default\"`.\n\n**`hidden`** — hides the attribute in the interface for this type:\n- `false` (default) — attribute is visible\n- `true` — attribute is hidden in the interface for this type\n\nOmitting `hidden` is equivalent to `false`.\n\n## Partial Failures\n\nInvalid entries (unknown attribute ID or code, missing fields) do NOT fail the whole request — valid entries are still applied and `status_code` remains 1. All failures are reported in `result.errors`.\n\n## Accepts IDs or Codes\n\n`attribute`: integer (attribute ID) or string (attribute code, case-insensitive). To list available attributes for a type's library, call `POST /api/v3/attributes/list` with the `class_id` returned by `POST /api/v3/types/get`.\n\n## Related Endpoints\n\n- `attributes/assign-types` — inverse: given one attribute, sync all its types\n- `attributes/list` — list available attributes (requires class_id; use `types/get` to retrieve it)\n\n## Errors\n\n- `2` : the type does not exist, or one of the attributes cannot be assigned to it\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Sync result response","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"type_id":{"type":"integer","example":12,"description":"Type ID"},"attributes":{"type":"array","description":"Per-attribute action details. Only covers attributes that were in the request or currently assigned — not all attributes in the library.","items":{"type":"object","properties":{"attribute_id":{"type":"integer","example":456,"description":"Resolved attribute ID"},"action":{"type":"string","enum":["added","updated","unchanged","removed"],"example":"added","description":"Operation applied to this attribute assignment"},"editability":{"type":"string","enum":["default","read_only","editable"],"example":"default","description":"Reflects the value sent in the request (not the stored value). Absent when action is \"removed\"."},"hidden":{"type":"boolean","example":false,"description":"Reflects the value sent in the request (not the stored value). Absent when action is \"removed\"."}}}},"total_added":{"type":"integer","example":3},"total_updated":{"type":"integer","example":1},"total_removed":{"type":"integer","example":1},"cache_refreshed":{"type":"boolean","example":true},"errors":{"type":"array","items":{"type":"string"},"description":"Per-entry errors that did not block execution. Valid entries are still applied.","example":["Attribute not found: code_inexistant"]}}},"status_message":{"type":"string","example":"3 added, 1 updated, 1 removed","description":"Status message"}}}]},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Type ID. Use POST /api/v3/types/list with class_id to get available type IDs.","example":12},"mode":{"type":"string","description":"Assignment mode. Controls ONLY whether attributes absent from the list are removed. \"replace\" (default) = full SYNC: attributes not in the list are REMOVED. \"add\" = non-destructive: attributes absent from the list are KEPT. In BOTH modes, each attribute you send is created if missing or UPDATED if already present with different options (upsert — NOT insert-only; identical options = unchanged; never duplicated). Use \"add\" to add/change a few attributes without resending the complete set.","enum":["replace","add"],"example":"add"},"assignments":{"type":"array","description":"Desired attribute assignments for this type. Each entry must have \"attribute\" (integer ID or string code). Optional: \"editability\" (\"default\", \"read_only\", \"editable\") and \"hidden\" (boolean). In `mode: \"replace\"` (default) this is the COMPLETE desired state — attributes not in this list are REMOVED. In `mode: \"add\"`, only listed attributes are added/updated (others kept). (Array of objects - see example for structure)","example":[{"attribute":"datedecreation","editability":"editable","hidden":false},{"attribute":456,"editability":"default","hidden":true}],"items":{"type":"object","properties":{"attribute":{"oneOf":[{"type":"integer"},{"type":"string"}],"description":"Attribute ID (integer) or attribute code (string, case-insensitive). Use POST /api/v3/attributes/list with class_id to discover.","example":"datedecreation"},"editability":{"type":"string","description":"Editability for this attribute on this type. Defaults to \"default\" (inherits global setting).","enum":["default","read_only","editable"],"example":"editable"},"hidden":{"type":"boolean","description":"Hide attribute in interface for this type. Defaults to false.","example":false}},"required":["attribute"],"title":"Item"}}},"required":["id","assignments"]}}}}}},"/api/v3/types/create/":{"post":{"tags":["types"],"summary":"create — Create a new type in a library","description":"## Purpose\n\nCreates a new asset type (category) in a library with full configuration. If a type with the same label already exists for the given supertype, it returns the existing type without creating a duplicate.\n\n## Required Parameters\n\n- `class_id`: Library where the type will be created\n- `label`: Display name for the type\n- `supertype_id`: Category of type\n\n## Optional Parameters\n\nAll other parameters are optional and allow full type configuration at creation time: icon, color, help text, visibility, export, logging, file management, etc.\n\n## Idempotent Behavior\n\nIf a type with the same label already exists in the same library and supertype, the endpoint returns the existing type with `created: false` instead of creating a duplicate. Optional parameters are NOT applied to existing types.\n\n## Errors\n\n- `2` : `Class ID \"…\" is invalid`\n- `2` : `Invalid supertype_id \"…\". Allowed values: …`\n- `2` : `Label cannot be empty`\n- `2` : `No supertype available`\n- `2` : `Type creation failed for label \"…\"`\n- `2` : `Type not found with id …`\n- `2` : and 1 other validation message(s) of the same family\n- `997` : `You don't have the rights to access this class (…)`\n- `997` : `You don't have the rights to do this action`\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Type creation response","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"integer","example":42,"description":"Type ID"},"code":{"type":"string","example":"type_product","description":"Portable type code, stable across environments"},"class_id":{"type":"integer","example":4,"description":"Library ID"},"label":{"type":"string","example":"Product","description":"Type label"},"supertype_id":{"type":"integer","example":2,"description":"Supertype ID"},"created":{"type":"boolean","example":true,"description":"True if newly created, false if already existed"}},"required":["id","code","class_id","label","supertype_id","created"]}}}]},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"class_id":{"type":"integer","description":"Library ID. Use POST /api/v3/administration/classes/list to get available libraries.","example":4},"label":{"type":"string","description":"Type label (display name)","example":"Product"},"supertype_id":{"type":"integer","description":"Supertype ID : 1=Groupe de fiches, 2=Fiches Produits, 3=Dossier, 4=Page, 5=Publication, 6=Workspace, 7=Article, 8=Fiches Annexes","enum":[1,2,3,4,5,6,7,8],"example":2},"code":{"type":"string","description":"Portable code identifying the type across environments (preprod/prod). Must start with a letter, then letters, digits and underscores only (no hyphen), 100 characters max, unique across the whole platform. Auto-generated as \"code_{id}\" if omitted.","example":"type_product"},"help":{"type":"string","description":"Type description/help text","example":"Product type for catalog items"},"icon":{"type":"string","description":"FontAwesome icon class. Overrides the supertype default icon","example":"fa-solid fa-box"},"color":{"type":"string","description":"Hex color code for the type icon. Overrides the supertype default color","example":"#FF5733"},"active":{"type":"boolean","description":"Whether the type is active. Default: true","example":true},"indexed":{"type":"boolean","description":"Whether the type is indexed for search. Default: true","example":true},"not_logged":{"type":"boolean","description":"Disable logging for records of this type. Default: false","example":false},"not_exportable":{"type":"boolean","description":"Prevent export of records of this type. Default: false","example":false},"manage_file":{"type":"boolean","description":"Enable file management for this type. Default: false","example":false},"display_link_tab":{"type":"boolean","description":"Display link tab in the type view. Default: false","example":false},"bundle_option":{"type":"integer","description":"Bundle association option: 1=simple bundle, 2=variant bundle, 3=kit bundle. Leave empty or omit if not applicable","example":1},"display_related_assets":{"type":"integer","description":"Related assets display mode: 1=display related assets tab. Leave empty or omit if not applicable","example":1},"dynamic_search":{"type":"integer","description":"Smart folder / dynamic search setting. Only applied when supertype_id=3 (Folder). Silently ignored for other supertypes. 0=disabled, 1=enabled","example":0},"creation_status":{"type":"integer","description":"Default status ID assigned when creating a new record of this type. Use POST /api/v3/types/statuses with the type ID to get available statuses. Statuses are inherited from the supertype","example":1},"project_status":{"type":"integer","description":"Default status ID assigned when creating a new project of this type. Use POST /api/v3/types/statuses with the type ID to get available statuses. Statuses are inherited from the supertype","example":1},"parent_id":{"type":"integer","description":"Parent type ID for nesting this type under another. Use POST /api/v3/types/list with class_id to get existing types. Must belong to the same library","example":15},"order":{"type":"integer","description":"Display order position. Lower values appear first","example":1}},"required":["class_id","label","supertype_id"]}}}}}},"/api/v3/types/full/":{"post":{"tags":["types"],"summary":"full — Get all types with full details","description":"## Purpose\n\nReturns all asset types for a class with complete configuration including permissions, statuses, and display settings.\n\n## Filtering\n\nUse `supertype_id` to filter by category (Record, Folder, Page, etc.).\n\n## Comparison\n\nUse `types/list` to get the same types without their attribute and permission detail (id, code, label, supertype, active status).\n\n## Errors\n\n- `2` : `Class ID \"…\" is invalid`\n- `2` : a parameter is missing, of the wrong type, outside the allowed values, or a nested property is malformed (see the request schema)\n- `3` : `No types found for the class \"…\"`\n- `997` : `You don't have the rights to access this class (…)`\n- `997` : `You don't have the rights to do this action`\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Asset type list response","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"results_total":{"type":"integer","example":5,"description":"Total number of asset types returned"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":15,"description":"Type ID"},"class_id":{"type":"integer","example":4,"description":"Associated class ID"},"code":{"type":"string","example":"my_type_code","description":"Type code"},"label":{"type":"string","example":"Product category","description":"Type label"},"tags":{"type":"array","items":{"type":"string"},"example":["tag1","tag2"],"description":"Array of tags (can be empty)"},"manage_file":{"type":"boolean","nullable":true,"example":true,"description":"Whether the type can load a preview file"},"parent_id":{"type":"integer","nullable":true,"example":null,"description":"Parent asset type ID, null when the type is at the root of the hierarchy"},"supertype_id":{"type":"integer","nullable":true,"example":1,"description":"Supertype ID"},"supertype_label":{"type":"string","nullable":true,"example":"Record","description":"Supertype label"},"active":{"type":"boolean","example":true,"description":"Whether the type is active"},"indexed":{"type":"boolean","nullable":true,"example":true,"description":"Whether the type is indexed"},"order":{"type":"integer","nullable":true,"example":1,"description":"Display order"},"help":{"type":"string","nullable":true,"example":"Help text for this type","description":"Help text"},"creation_status":{"type":"integer","nullable":true,"example":1149,"description":"Status at creation"},"project_status":{"type":"integer","nullable":true,"example":1148,"description":"Status when adding project"},"bundle_option":{"type":"integer","nullable":true,"example":3,"description":"Association type : linked asset or not"},"display_link_tab":{"type":"boolean","nullable":true,"example":true,"description":"Displaying \"links\" tab in the asset"},"display_related_assets":{"type":"boolean","nullable":true,"example":false,"description":"Displaying related assets"},"font_awesome_code":{"type":"object","nullable":true,"properties":{"code":{"type":"string","nullable":true,"example":"fa-solid fa-file","description":"Font-Awesome code"},"color":{"type":"string","nullable":true,"example":"#FF5722","description":"Type color in hexadecimal"}},"description":"Font-Awesome code"},"not_logged":{"type":"boolean","nullable":true,"example":true,"description":"Not logged"},"not_exportable":{"type":"boolean","nullable":true,"example":true,"description":"Not exportable"},"dynamic_search":{"type":"integer","nullable":true,"example":0,"description":"Dynamic search"},"image":{"type":"string","nullable":true,"example":"<span><i class=\"fa-solid fa-file\" style=\"font-size: 16px;color:#c0c0c0;\"></i></span>","description":"Image"},"permissions":{"type":"object","nullable":true,"additionalProperties":{"type":"object","properties":{"label":{"type":"string","example":"Group 1","description":"User group label"},"create":{"type":"boolean","example":false,"description":"Create permission"},"edit":{"type":"boolean","example":false,"description":"Edit permission"},"view":{"type":"boolean","example":true,"description":"View permission"}},"required":["label","create","edit","view"]},"example":{"1557":{"label":"Afineo","create":false,"edit":false,"view":true}},"description":"Permissions by user group ID. Each key is a user group ID, and the value contains permissions (create, edit, view)"},"available_statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1015,"description":"Status ID"},"code":{"type":"string","example":"code_1015","description":"Portable Status code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Validated","description":"Status label"}},"required":["id","code","label"]},"description":"Statuses available for this asset type (including those inherited from the supertype)"}},"required":["id","class_id","code","label","tags","supertype_id","supertype_label","active"]},"description":"Array of asset types objects"}},"required":["results_total","items"]}}}]},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"class_id":{"type":"integer","description":"Library ID. Use POST /api/v3/administration/classes/list to get available libraries.","example":4},"supertype_id":{"type":"integer","description":"Supertype ID : Groupe de fiches,Fiches Produits,Dossier,Page,Publication,Workspace,Article,Fiches Annexes","enum":[1,2,3,4,5,6,7,8],"example":"Groupe de fiches"}},"required":["class_id"]}}}}}},"/api/v3/types/get/":{"post":{"tags":["types"],"summary":"get — Get asset type details","description":"## Purpose\n\nReturns complete asset type configuration including permissions, statuses, display settings, and file management options.\n\n## Errors\n\n- `2` : `Asset type \"…\" does not exist`\n- `2` : a parameter is missing, of the wrong type, outside the allowed values, or a nested property is malformed (see the request schema)\n- `997` : `You don't have the rights to do this action`\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Asset type information response","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"integer","example":15,"description":"Type ID"},"class_id":{"type":"integer","example":4,"description":"Associated class ID"},"code":{"type":"string","example":"my_type_code","description":"Type code"},"label":{"type":"string","example":"Product category","description":"Type label"},"tags":{"type":"array","items":{"type":"string"},"example":["tag1","tag2"],"description":"Array of tags (can be empty)"},"manage_file":{"type":"boolean","nullable":true,"example":true,"description":"Whether the type can load a preview file"},"parent_id":{"type":"integer","nullable":true,"example":null,"description":"Parent asset type ID, null when the type is at the root of the hierarchy"},"supertype_id":{"type":"integer","nullable":true,"example":1,"description":"Supertype ID"},"supertype_label":{"type":"string","nullable":true,"example":"Record","description":"Supertype label"},"active":{"type":"boolean","example":true,"description":"Whether the type is active"},"indexed":{"type":"boolean","nullable":true,"example":true,"description":"Whether the type is indexed"},"order":{"type":"integer","nullable":true,"example":1,"description":"Display order"},"help":{"type":"string","nullable":true,"example":"Help text for this type","description":"Help text"},"creation_status":{"type":"integer","nullable":true,"example":1149,"description":"Status at creation"},"project_status":{"type":"integer","nullable":true,"example":1148,"description":"Status when adding project"},"bundle_option":{"type":"integer","nullable":true,"example":3,"description":"Association type : linked asset or not"},"display_link_tab":{"type":"boolean","nullable":true,"example":true,"description":"Displaying \"links\" tab in the asset"},"display_related_assets":{"type":"boolean","nullable":true,"example":false,"description":"Displaying related assets"},"font_awesome_code":{"type":"object","nullable":true,"properties":{"code":{"type":"string","nullable":true,"example":"fa-solid fa-file","description":"Font-Awesome code"},"color":{"type":"string","nullable":true,"example":"#FF5722","description":"Type color in hexadecimal"}},"description":"Font-Awesome code"},"not_logged":{"type":"boolean","nullable":true,"example":true,"description":"Not logged"},"not_exportable":{"type":"boolean","nullable":true,"example":true,"description":"Not exportable"},"dynamic_search":{"type":"integer","nullable":true,"example":0,"description":"Dynamic search"},"image":{"type":"string","nullable":true,"example":"<span><i class=\"fa-solid fa-file\" style=\"font-size: 16px;color:#c0c0c0;\"></i></span>","description":"Image"},"permissions":{"type":"object","nullable":true,"additionalProperties":{"type":"object","properties":{"label":{"type":"string","example":"Group 1","description":"User group label"},"create":{"type":"boolean","example":false,"description":"Create permission"},"edit":{"type":"boolean","example":false,"description":"Edit permission"},"view":{"type":"boolean","example":true,"description":"View permission"}},"required":["label","create","edit","view"]},"example":{"1557":{"label":"Afineo","create":false,"edit":false,"view":true}},"description":"Permissions by user group ID. Each key is a user group ID, and the value contains permissions (create, edit, view)"},"available_statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1015,"description":"Status ID"},"code":{"type":"string","example":"code_1015","description":"Portable Status code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Validated","description":"Status label"}},"required":["id","code","label"]},"description":"Statuses available for this asset type (including those inherited from the supertype)"}},"required":["id","class_id","code","label","tags","supertype_id","supertype_label","active"],"description":"Asset type information"}}}]},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Asset type ID. Use POST /api/v3/types/list with class_id to get available asset types.","example":407}},"required":["id"]}}}}}},"/api/v3/types/list/":{"post":{"tags":["types"],"summary":"list — List types by class","description":"## Purpose\n\nReturns the asset types of a library with their id, portable code, label, supertype and active status.\n\n## Filtering\n\nUse `supertype_id` to filter by category (Record, Folder, Page, etc.).\n\n## Errors\n\n- `2` : `Class ID \"…\" is invalid`\n- `2` : a parameter is missing, of the wrong type, outside the allowed values, or a nested property is malformed (see the request schema)\n- `3` : `No types found for the class \"…\"`\n- `997` : `You don't have the rights to access this class (…)`\n- `997` : `You don't have the rights to do this action`\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Asset type list response","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"results_total":{"type":"integer","example":5,"description":"Total number of asset types returned"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":15,"description":"Type ID"},"class_id":{"type":"integer","example":4,"description":"Associated class ID"},"code":{"type":"string","example":"my_type_code","description":"Type code"},"label":{"type":"string","example":"Product category","description":"Type label"},"tags":{"type":"array","items":{"type":"string"},"example":["tag1","tag2"],"description":"Array of tags (can be empty)"},"supertype_id":{"type":"integer","nullable":true,"example":1,"description":"Supertype ID"},"supertype_label":{"type":"string","nullable":true,"example":"Record","description":"Supertype label"},"active":{"type":"boolean","example":true,"description":"Whether the type is active"}},"required":["id","class_id","code","label","tags","supertype_id","supertype_label","active"]},"description":"Array of asset types objects"}},"required":["results_total","items"]}}}]},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"class_id":{"type":"integer","description":"Library ID. Use POST /api/v3/administration/classes/list to get available libraries.","example":4},"supertype_id":{"type":"integer","description":"Supertype ID : Groupe de fiches,Fiches Produits,Dossier,Page,Publication,Workspace,Article,Fiches Annexes","enum":[1,2,3,4,5,6,7,8],"example":"Groupe de fiches"}},"required":["class_id"]}}}}}},"/api/v3/types/statuses/":{"post":{"tags":["types"],"summary":"statuses — Get type status assignments","description":"## Purpose\n\nReturns available workflow statuses for an asset type (includes inherited statuses from supertype).\n\n## Requirement\n\nRequires extension: `ASSIGNMENT_STATUS_TYPES`. This extension must be enabled at the platform level by an administrator. If not enabled, the endpoint will return status_code=2 with message \"Extension not available\".\n\n## Handling Unavailability\n\nIf you receive status_code=2, the extension is not enabled and this endpoint cannot be used. Fall back to POST /api/v3/permissions/statuses/list to get statuses without type-level filtering.\n\n## Errors\n\n- `2` : `Asset type \"…\" does not exist`\n- `2` : `This endpoint requires the \"ASSIGNMENT_STATUS_TYPES\" extension to be enabled`\n- `2` : a parameter is missing, of the wrong type, outside the allowed values, or a nested property is malformed (see the request schema)\n- `3` : `No status assignments found for asset type \"…\"`\n- `997` : `You don't have the rights to do this action`\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Status assignments response","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"results_total":{"type":"integer","example":3,"description":"Total number of statuses available for this type"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1149,"description":"Status ID"},"code":{"type":"string","example":"code_1149","description":"Portable Status code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Archived","description":"Status label"}},"required":["id","code","label"]},"description":"Available statuses for the type (includes inherited from supertype)"}},"required":["results_total","items"]}}}]},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Asset type ID. Use POST /api/v3/types/list with class_id to get available asset types.","example":407}},"required":["id"]}}}}}},"/api/v3/types/update-permissions/":{"post":{"tags":["types"],"summary":"update-permissions — Update group permissions for a type","description":"## Purpose\n\nManages group (LCA) permissions on an asset type. Controls which groups can create, edit, or view assets of this type. Type IDs are unique across all libraries.\n\n## Modes\n\n- **synchronize**: Replaces ALL permissions for the type. Groups not listed are removed. Use this to set the complete permission state.\n- **update**: Adds or modifies only the listed groups. Existing groups not mentioned are left unchanged. Recommended for incremental changes.\n- **delete**: Removes permissions for the listed groups. The `create`, `edit`, `view` fields are ignored in this mode.\n\n## Permission Hierarchy\n\nPermissions follow a logical hierarchy enforced server-side:\n- `create: true` automatically enables `edit` and `view`\n- `edit: true` automatically enables `view`\n- `view: false` automatically disables `create` and `edit`\n\n## Discovery Chain\n\n1. Get libraries: `POST /api/v3/administration/classes/list`\n2. Get types for a library: `POST /api/v3/types/list` with `class_id`\n3. Get available groups: `POST /api/v3/permissions/groups/list`\n4. Read current permissions: `POST /api/v3/types/get` with `id`\n\n## Common Errors\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Type not found with id X | Invalid type ID | Use `POST /api/v3/types/list` with `class_id` to get valid IDs |\n| Group ID X does not exist | Invalid group_id | Use `POST /api/v3/permissions/groups/list` to get valid group IDs |\n| Cannot manage permissions on a duplicates handler type | Type is reserved for duplicates management | Choose a different type |\n| Not allowed operation | User lacks admin permission or `lca_manage_type_fiche` right | Requires admin-level API token |\n\n## Example Requests\n\n### Update specific groups\n```json\n{\"id\": 42, \"mode\": \"update\", \"permissions\": [{\"group_id\": 5, \"create\": true, \"edit\": true, \"view\": true}]}\n```\n\n### Synchronize all permissions (replaces everything)\n```json\n{\"id\": 42, \"mode\": \"synchronize\", \"permissions\": [{\"group_id\": 5, \"create\": true, \"edit\": true, \"view\": true}, {\"group_id\": 8, \"create\": false, \"edit\": true, \"view\": true}]}\n```\n\n### Delete group permissions\n```json\n{\"id\": 42, \"mode\": \"delete\", \"permissions\": [{\"group_id\": 8}]}\n```\n\n## Errors\n\n- `2` : `Cannot manage permissions on a duplicates handler type`\n- `2` : `Group ID … does not exist. Use POST /api/v3/permissions/groups/list to get available groups.`\n- `2` : `Missing or invalid group_id at index …`\n- `2` : `Parameter \"permissions\" must be a non-empty array`\n- `2` : `Type not found with id …`\n- `2` : a parameter is missing, of the wrong type, outside the allowed values, or a nested property is malformed (see the request schema)\n- `997` : `You don't have the rights to do this action`\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Returns the complete permission state after the operation, including all groups with their create/edit/view flags","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"integer","example":42,"description":"Asset type ID"},"mode":{"type":"string","example":"update","description":"Operation mode used"},"affected_groups":{"type":"integer","example":2,"description":"Number of groups affected by the operation"},"permissions":{"type":"array","description":"Complete permission state after the operation","items":{"type":"object","properties":{"group_id":{"type":"integer","description":"Permission group (LCA) ID"},"label":{"type":"string","description":"Group display name"},"create":{"type":"boolean","description":"Can create assets of this type"},"edit":{"type":"boolean","description":"Can edit assets of this type"},"view":{"type":"boolean","description":"Can view assets of this type"}}}}},"required":["id","mode","affected_groups","permissions"]}}}]},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Asset type ID. First get a class_id from POST /api/v3/administration/classes/list, then use POST /api/v3/types/list with that class_id to discover type IDs.","example":42},"mode":{"type":"string","description":"Operation mode. \"synchronize\": replaces ALL permissions (groups not listed are removed). \"update\": adds or modifies only listed groups (others unchanged). \"delete\": removes listed groups (create/edit/view fields ignored). Recommendation: use \"update\" for incremental changes, \"synchronize\" for full state management.","enum":["synchronize","update","delete"],"example":"update"},"permissions":{"type":"array","description":"Array of permission objects defining group-level access. In \"update\"/\"synchronize\" modes, each object requires group_id + create/edit/view booleans. In \"delete\" mode, only group_id is needed (other fields are ignored). (Array of objects - see example for structure)","example":[{"group_id":5,"create":true,"edit":true,"view":true},{"group_id":8,"create":false,"edit":true,"view":true}],"items":{"type":"object","properties":{"group_id":{"type":"integer","description":"Permission group (LCA) ID. Use POST /api/v3/permissions/groups/list to get available groups and their IDs."},"create":{"type":"boolean","description":"Can create assets of this type. Default: false. Ignored in delete mode."},"edit":{"type":"boolean","description":"Can edit assets of this type. Default: false. Ignored in delete mode."},"view":{"type":"boolean","description":"Can view assets of this type. Default: false. Ignored in delete mode."}},"required":["group_id"]}}},"required":["id","mode","permissions"]}}}}}},"/api/v3/types/update/":{"post":{"tags":["types"],"summary":"update — Update an existing type in a library","description":"## Purpose\n\nUpdates properties of an existing asset type (category). Only provided fields are modified — omitted fields remain unchanged.\n\n## What can be updated\n\n- Label, help text, icon, color\n- Active status, indexed, logging, exportability\n- File management, display options, bundle, dynamic search\n- Default statuses (creation, project)\n- Parent type, display order\n\n## What cannot be updated\n\n- `class_id` (immutable — the type belongs to a specific library)\n- `supertype_id` (immutable — changing supertype would break type hierarchy)\n\n## Important\n\nThe `id` parameter refers to the type ID, not the class ID. Use POST /api/v3/types/list with class_id to discover type IDs.\n\n## Errors\n\n- `2` : `Label cannot be empty`\n- `2` : `Type not found with id …`\n- `2` : a parameter is missing, of the wrong type, outside the allowed values, or a nested property is malformed (see the request schema)\n- `997` : `You don't have the rights to do this action`\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Type update response","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"integer","example":42,"description":"Type ID"},"code":{"type":"string","example":"type_product","description":"Current portable type code (after update)"},"class_id":{"type":"integer","example":4,"description":"Library ID"},"label":{"type":"string","example":"Product","description":"Type label"},"updated_fields":{"type":"array","items":{"type":"string"},"example":["label","code","help","icon"],"description":"List of fields that were actually modified"}},"required":["id","code","class_id","label","updated_fields"]}}}]},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Type ID to update. Use POST /api/v3/types/list with class_id to get available types.","example":42},"label":{"type":"string","description":"New type label (display name)","example":"Product"},"code":{"type":"string","description":"New portable code for the type. Must start with a letter, then letters, digits and underscores only (no hyphen), 100 characters max, unique across the whole platform. ⚠️ Renaming breaks any external reference to the previous code.","example":"type_product"},"help":{"type":"string","description":"Type description/help text","example":"Product type for catalog items"},"icon":{"type":"string","description":"FontAwesome icon class","example":"fa-solid fa-box"},"color":{"type":"string","description":"Hex color code for the type icon","example":"#FF5733"},"active":{"type":"boolean","description":"Whether the type is active","example":true},"indexed":{"type":"boolean","description":"Whether the type is indexed for search","example":true},"not_logged":{"type":"boolean","description":"Disable logging for records of this type","example":false},"not_exportable":{"type":"boolean","description":"Prevent export of records of this type","example":false},"manage_file":{"type":"boolean","description":"Enable file management for this type","example":false},"display_link_tab":{"type":"boolean","description":"Display link tab in the type view","example":false},"bundle_option":{"type":"integer","description":"Bundle association option: 1=simple bundle, 2=variant bundle, 3=kit bundle. Leave empty or omit if not applicable","example":1},"display_related_assets":{"type":"integer","description":"Related assets display mode: 1=display related assets tab. Leave empty or omit if not applicable","example":1},"dynamic_search":{"type":"integer","description":"Smart folder / dynamic search setting. Only applied when supertype is Folder (supertype_id=3). Silently ignored for other supertypes. 0=disabled, 1=enabled","example":0},"creation_status":{"type":"integer","description":"Default status ID assigned when creating a new record of this type. Use POST /api/v3/types/statuses with the type ID to get available statuses","example":1},"project_status":{"type":"integer","description":"Default status ID assigned when creating a new project of this type. Use POST /api/v3/types/statuses with the type ID to get available statuses","example":1},"parent_id":{"type":"integer","description":"Parent type ID for nesting this type under another. Use POST /api/v3/types/list with class_id to get existing types. Must belong to the same library. Set to 0 to remove parent","example":15},"order":{"type":"integer","description":"Display order position. Lower values appear first","example":1}},"required":["id"]}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token generated with /api/v3/token/get/"}},"schemas":{"SuccessEnvelope":{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","enum":[1],"example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message"}},"required":["status_code","status_message","result"]},"ErrorResponse":{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (0 = the action does not exist, 2 = parameter error, 3 = no result, 997 = unauthorized action, 998 = invalid token, 999 = connection error)"},"status_message":{"type":"string","example":"Class not found or access denied","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]},"ExportPage":{"type":"object","properties":{"results_total":{"type":"integer","example":15,"description":"Total number of items"},"items":{"type":"array","items":{"type":"object"},"description":"Export data"},"num_page":{"type":"integer","nullable":true,"example":1,"description":"Current page number"},"nb_pages":{"type":"integer","nullable":true,"example":15,"description":"Total number of pages"},"results_per_page":{"type":"integer","nullable":true,"example":100,"description":"Number of results per page"}},"required":["results_total","items"],"description":"Export result"},"ExportJobQueued":{"type":"object","properties":{"queue_id":{"type":"integer","example":47593,"description":"Queue ID for async file retrieval via export/get-file"}},"required":["queue_id"],"description":"Queue information"},"ImportAutoResult":{"type":"object","properties":{"success":{"type":"boolean","example":true,"description":"Import success status"},"mapping":{"type":"object","properties":{"resolved":{"type":"array","items":{"type":"object","properties":{"column":{"type":"integer","example":1,"description":"Column index (1-based)"},"header":{"type":"string","example":"reference*","description":"Original column header from file"},"attribute_id":{"type":"integer","nullable":true,"example":145,"description":"Matched attribute ID. Null if mapped to a system field."},"attribute_code":{"type":"string","example":"reference","description":"Portable attribute code (ROLE_XML), stable across environments (the auto-incremented id is not). Only present for attribute mappings."},"attribute_label":{"type":"string","example":"Reference","description":"Matched attribute label. Only present for attribute mappings."},"system_field":{"type":"string","nullable":true,"example":"[ID_FICHE]","description":"System field identifier. Only present for system field mappings. Full list: [ID_FICHE], [ID_NODE], [ID_TYPE], [CODE_TYPE], [LABEL_TYPE], [ID_STATUT], [CODE_STATUT], [LABEL_STATUT], [STATUT] (legacy synonym of [LABEL_STATUT]), [ID_WFITEMS], [CODE_WFITEMS], [LABEL_WFITEMS], [ORDRE], [PARENT], [PAGENUM]. The [CODE_*] forms are the portable ones: they are stable across environments, unlike the ids, and not translated, unlike the labels."},"is_key":{"type":"boolean","example":true,"description":"Whether this column is marked as a key column (header ends with *)"}}},"description":"Columns successfully mapped to attributes or system fields"},"unresolved":{"type":"array","items":{"type":"object","properties":{"column":{"type":"integer","example":3,"description":"Column index (1-based)"},"header":{"type":"string","example":"unknown_column","description":"Column header that could not be matched to any attribute"}}},"description":"Columns that could not be mapped (no matching uname or label found in the class)"}},"description":"Mapping information"},"stats":{"type":"object","properties":{"total_rows":{"type":"integer","example":1500,"description":"Total number of data rows processed"},"created":{"type":"integer","example":1200,"description":"Number of assets created"},"updated":{"type":"integer","example":300,"description":"Number of assets updated"},"excluded":{"type":"integer","example":0,"description":"Number of rows excluded (no key value)"},"errors":{"type":"integer","example":0,"description":"Number of rows with errors"}},"required":["total_rows","created","updated","excluded","errors"],"description":"Import statistics"},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","description":"Row number"},"message":{"type":"string","description":"Error message"}}},"description":"List of row-level errors"},"history_id":{"type":"integer","example":12345,"description":"ID of the import action in the history log. Can be used to track or reference this import operation."}},"required":["success","mapping","stats","errors"],"description":"Import result"},"ImportJsonResult":{"type":"object","properties":{"success":{"type":"boolean","example":true,"description":"Import success status"},"stats":{"type":"object","properties":{"total_rows":{"type":"integer","example":2,"description":"Total number of data rows processed"},"created":{"type":"integer","example":1,"description":"Number of assets created"},"updated":{"type":"integer","example":1,"description":"Number of assets updated"},"excluded":{"type":"integer","example":0,"description":"Number of rows excluded (no key value)"},"errors":{"type":"integer","example":0,"description":"Number of rows with errors"}},"required":["total_rows","created","updated","excluded","errors"],"description":"Import statistics"},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","example":3,"description":"Row number where error occurred"},"message":{"type":"string","example":"Invalid attribute ID: 999","description":"Error message describing the issue"}}},"example":[{"row":3,"message":"Invalid attribute ID: 999"}],"description":"List of row-level errors encountered during import"},"history_id":{"type":"integer","example":12345,"description":"ID of the import action in the history log"},"mapping":{"type":"object","additionalProperties":true,"description":"Column-to-attribute mapping actually applied, always returned : the JSON endpoints share executeAutoImport() with the auto_* endpoints. Same shape as ImportAutoResult.mapping (resolved[] / unresolved[])."}},"required":["success","mapping","stats","errors"],"description":"Import result"},"PermissionGroup":{"type":"object","properties":{"id":{"type":"integer","example":15,"description":"Group ID"},"label":{"type":"string","example":"My group","description":"Group label"},"parent_id":{"type":"integer","example":1511,"description":"Parent group ID"},"parent_label":{"type":"string","example":"My group parent","description":"Parent group label"},"configuration":{"type":"object","properties":{"langs":{"type":"object","additionalProperties":true,"example":{"all_versions":true},"description":"Multilingual"},"default_display_mask":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":1032,"description":"Mask ID"},"code":{"type":"string","example":"mask_purchasing","description":"Portable mask code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"A mask","description":"Mask label"}},"description":"Default display mask of the group. Use `code` rather than `id` to replay this configuration on another environment."},"profiles":{"type":"object","description":"Profiles of the group, one per type. Use `code` rather than `id` to replay this configuration on another environment.","properties":{"asset":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":35,"description":"Profile ID"},"code":{"type":"string","example":"profile_full_rights","description":"Portable profile code"},"label":{"type":"string","example":"Full rights","description":"Profile label"}},"description":"Asset profile"},"general":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":33,"description":"Profile ID"},"code":{"type":"string","example":"profile_full_rights","description":"Portable profile code"},"label":{"type":"string","example":"Full rights","description":"Profile label"}},"description":"General profile"},"project":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":34,"description":"Profile ID"},"code":{"type":"string","example":"profile_full_rights","description":"Portable profile code"},"label":{"type":"string","example":"Full rights","description":"Profile label"}},"description":"Project profile"}}},"status":{"type":"array","items":{"type":"object","properties":{"class_id":{"type":"integer","example":2,"description":"Class ID"},"class_code":{"type":"string","example":"lib_products","description":"Portable library code, stable across environments (the auto-incremented id is not)"},"class_label":{"type":"string","example":"DAM","description":"Class label"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1093,"description":"Status ID"},"code":{"type":"string","example":"status_active","description":"Portable status code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Active","description":"Status label"}},"required":["id","code","label"]},"description":"Statuses granted to the group for this library. Use `code` rather than `id` to replay this configuration on another environment."}},"required":["class_id","class_code","class_label","items"]},"description":"Status list"},"overload_by_status":{"type":"array","items":{"type":"object","properties":{"class_id":{"type":"integer","example":2,"description":"Class ID"},"class_code":{"type":"string","example":"lib_products","description":"Portable library code, stable across environments (the auto-incremented id is not)"},"class_label":{"type":"string","example":"DAM","description":"Class label"},"items":{"type":"array","items":{"type":"object","properties":{"status":{"type":"object","properties":{"id":{"type":"integer","example":1111,"description":"Status ID"},"code":{"type":"string","example":"status_proposed","description":"Portable status code, stable across environments"},"label":{"type":"string","example":"Proposed","description":"Status label"}},"required":["id","code","label"],"description":"Status the overload applies to"},"profile_asset":{"type":"object","properties":{"id":{"type":"integer","example":53,"description":"Profile ID, 0 when the overload does not set a profile"},"code":{"type":"string","example":"profile_contributor","description":"Portable profile code, empty when the overload does not set a profile"},"label":{"type":"string","example":"Profile test","description":"Profile label, \"Default\" when the overload does not set a profile"}},"description":"Overloaded asset profile"},"mask":{"type":"object","properties":{"id":{"type":"integer","example":1064,"description":"Mask ID, 0 when the overload does not set a mask"},"code":{"type":"string","example":"mask_full_display","description":"Portable mask code, empty when the overload does not set a mask"},"label":{"type":"string","example":"Full display mask","description":"Mask label, \"Default\" when the overload does not set a mask"}},"description":"Overloaded display mask"}},"required":["status","profile_asset","mask"]},"description":"Overloads defined for this library"}},"required":["class_id","class_code","class_label","items"]},"description":"Overloaded by status"}},"required":["langs","default_display_mask","profiles","status","overload_by_status"],"description":"Group configuration (langs, default display mask, profiles, statuses and overload by status)"},"users":{"type":"object","additionalProperties":{"type":"string"},"example":{"2187":"login@company.com"},"description":"Users in group"}},"required":["id","label","parent_id","parent_label","configuration","users"]},"DisplayMask":{"type":"object","properties":{"id":{"type":"integer","example":1025,"description":"Mask ID"},"code":{"type":"string","example":"code_1025","description":"Portable mask code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Standard mask","description":"Mask label"},"class_id":{"type":"integer","example":2,"description":"Class ID"},"class_code":{"type":"string","example":"lib_products","description":"Portable library code, stable across environments (the auto-incremented id is not)"},"class_label":{"type":"string","example":"DAM","description":"Class label"},"attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":123,"description":"Attribute ID"},"code":{"type":"string","example":"product_name","description":"Portable attribute code (ROLE_XML), stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Product name","description":"Attribute label"},"hidden":{"type":"boolean","example":false,"description":"Whether attribute is hidden"},"read":{"type":"boolean","example":true,"description":"Whether attribute is readable"},"write":{"type":"boolean","example":true,"description":"Whether attribute is writable"},"locally_editable":{"type":"boolean","example":false,"description":"Whether attribute is locally editable (asset share)"}},"required":["id","code","label","hidden","read","write","locally_editable"]},"description":"Attributes configuration for the class"}},"required":["id","code","label","class_id","class_code","class_label","attributes"]},"WorkflowSummary":{"type":"object","properties":{"id":{"type":"integer","example":15,"description":"Workflow ID"},"code":{"type":"string","example":"","description":"Workflow code"},"label":{"type":"string","example":"Workflow validation","description":"Workflow label"},"class_id":{"type":"integer","example":4,"description":"Class ID"},"project_node_id":{"type":"integer","example":1234,"description":"Project node ID (0 for the repository project)"},"project_label":{"type":"string","example":"My Project","description":"Project label (\"Repository Project\" for the repository)"},"tags":{"type":"array","items":{"type":"string"},"example":["validation","review"],"description":"Array of tags (can be empty)"},"supertype":{"type":"object","properties":{"id":{"type":"integer","example":3,"description":"Supertype ID"},"label":{"type":"string","example":"Products","description":"Supertype label"}},"required":["id","label"],"description":"Supertype information"},"types":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","example":"type_product","description":"Portable type code, stable across environments (the auto-incremented id is not)"},"id":{"type":"integer","example":42,"description":"Type ID"},"label":{"type":"string","example":"Product","description":"Type label"}},"required":["id","code","label"]},"description":"Array of asset types associated with this workflow"}},"required":["id","code","label","class_id","project_node_id","project_label","tags","supertype","types"],"description":"Workflow information without its steps"},"WorkflowSummaryList":{"type":"object","properties":{"results_total":{"type":"integer","example":2,"description":"Total number of workflows returned"},"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowSummary"},"description":"Array of workflow objects"}},"required":["results_total","items"]},"Workflow":{"type":"object","properties":{"id":{"type":"integer","example":15,"description":"Workflow ID"},"code":{"type":"string","example":"","description":"Workflow code"},"label":{"type":"string","example":"Workflow validation","description":"Workflow label"},"tags":{"type":"array","items":{"type":"string"},"example":["validation","review"],"description":"Array of tags (can be empty)"},"class_id":{"type":"integer","example":4,"description":"Associated class ID"},"project_node_id":{"type":"integer","example":1234,"description":"Project node ID (0 for repository project)"},"project_label":{"type":"string","example":"My Project","description":"Project label"},"started":{"type":"boolean","example":true,"description":"Whether the workflow is started"},"filters":{"type":"array","nullable":true,"items":{"type":"object","properties":{"attribute_id":{"type":"integer","example":123,"description":"Attribute ID. Use POST /api/v3/attributes/list with class_id to get available attributes."},"attribute_code":{"type":"string","example":"product_name","description":"Portable attribute code (ROLE_XML), stable across environments (the auto-incremented id is not)"},"attribute_label":{"type":"string","example":"Status","description":"Attribute label"},"value":{"type":"string","example":"active","description":"Filter value"}}},"description":"Workflow filters (array of filter objects or null)"},"supertype":{"type":"object","properties":{"id":{"type":"integer","example":3,"description":"Supertype ID"},"label":{"type":"string","example":"Products","description":"Supertype label"}},"required":["id","label"],"description":"Supertype information"},"types":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","example":"type_product","description":"Portable type code, stable across environments (the auto-incremented id is not)"},"id":{"type":"integer","example":42,"description":"Type ID"},"label":{"type":"string","example":"Product","description":"Type label"}},"required":["id","code","label"]},"description":"Array of asset types associated with this workflow"},"configuration":{"type":"object","properties":{"step_groups":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowStepGroup"},"description":"Array of step groups containing steps with their nested data"}},"required":["step_groups"],"description":"Workflow configuration containing step groups hierarchy"}},"required":["id","code","label","class_id","project_node_id","project_label","tags","supertype","types","started","configuration"],"description":"Complete workflow information with hierarchical structure"},"WorkflowStepGroup":{"type":"object","properties":{"id":{"type":"integer","example":1,"description":"Step group ID"},"code":{"type":"string","example":"group_validation","description":"Portable step group code. Unique within the workflow (not across the platform)."},"label":{"type":"string","example":"Validation","description":"Step group label"},"order":{"type":"integer","example":1,"description":"Display order"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowStep"},"description":"Array of steps in this group"}},"required":["id","code","label","order","steps"]},"WorkflowStep":{"type":"object","properties":{"id":{"type":"integer","example":101,"description":"Step ID"},"code":{"type":"string","example":"step_draft","description":"Portable step code. Unique within the workflow (not across the platform). This is the value expected in the \"wf-{workflowCode}-{stepCode}\" format used to force a workflow step."},"label":{"type":"string","example":"Draft","description":"Step label"},"order":{"type":"integer","example":1,"description":"Display order"},"color":{"type":"string","nullable":true,"example":"#28a745","description":"Step color"},"start":{"type":"boolean","example":false,"description":"Whether this is a start step"},"notification":{"type":"object","nullable":true,"properties":{"mail_template_id":{"type":"integer","example":5,"description":"Mail template ID"},"mail_template_code":{"type":"string","example":"code_5","description":"Portable code of the mail template, stable across environments (the auto-incremented id is not)"},"mail_template_label":{"type":"string","example":"Validation notification","description":"Mail template label"}},"description":"Notification configuration (null if not configured)"},"delay_days":{"type":"integer","nullable":true,"example":7,"description":"Delay in days for the step"},"workflow_action_on_arrival":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":536,"description":"Process ID triggered when an asset reaches this step"},"code":{"type":"string","example":"code_536","description":"Portable process code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Create vendor component","description":"Process label"}},"required":["id","code","label"],"description":"Process triggered on arrival at this step (null if none)"},"contributors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":5,"description":"Contributor group ID"},"code":{"type":"string","example":"group_validators","description":"Portable contributor group code. Unique within the project (not across the platform)."},"label":{"type":"string","example":"Validation Group","description":"Contributor group label"}},"required":["id","code","label"]},"description":"Array of contributors for this step"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":201,"description":"Action ID"},"code":{"type":"string","example":"action_validate","description":"Portable action (button) code. Unique within the workflow (not across the platform)."},"label":{"type":"string","example":"Validate","description":"Action label"},"goto_step":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":102,"description":"Destination step ID"},"code":{"type":"string","example":"step_validated","description":"Portable step code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Validated","description":"Destination step label"}},"required":["id","code","label"],"description":"Destination step (null if no destination)"},"mode":{"type":"string","enum":["send_the_brief","submit","reject","validate"],"example":"validate","description":"Action mode (send_the_brief, submit, reject or validate)"},"display_if_completeness":{"type":"boolean","example":false,"description":"Display button only if all completeness attributes are filled"}},"required":["id","code","label","mode","display_if_completeness"]},"description":"Array of actions for this step"},"completeness":{"type":"object","nullable":true,"properties":{"attributes":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","example":1547,"description":"Attribute ID"},"code":{"type":"string","example":"component_commercial_name","description":"Portable attribute code (ROLE_XML), stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Component commercial name","description":"Attribute label"}},"required":["id","code","label"]},"description":"Attributes taken into account for completeness"},"automate_goto_step":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":102,"description":"Automatic transition step ID when complete"},"code":{"type":"string","example":"step_validate","description":"Portable step code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Validate","description":"Automatic transition step label when complete"}},"required":["id","code","label"],"description":"Automatic step transition when completeness is reached"}},"description":"Completeness configuration (null if not configured)"},"hotfolder":{"type":"object","nullable":true,"properties":{"action_on_update":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":201,"description":"Action ID to execute on update"},"code":{"type":"string","example":"action_validate","description":"Portable action code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","example":"Validate","description":"Action label"}},"required":["id","code","label"],"description":"Action to execute when hotfolder is updated (null for no automatic step change)"},"create_version":{"type":"boolean","example":true,"description":"Whether to create a version on update"}},"description":"Hotfolder configuration (null if not configured or not active)"},"status_piloting_view":{"type":"object","properties":{"status":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":1234,"description":"Status id"},"code":{"type":"string","example":"status_active","description":"Portable status code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","nullable":true,"example":"Admin Status","description":"Status label"}},"required":["id","code"],"description":"Status configuration (null if not configured)"},"default_view":{"type":"string","nullable":true,"enum":["default","completeness","list"],"example":"completeness","description":"Default view mode (default, completeness, or list)"},"children_piloting":{"$ref":"#/components/schemas/WorkflowChildrenPiloting"}},"description":"Status, piloting and view configuration"},"reminder":{"type":"object","nullable":true,"properties":{"days_before":{"type":"integer","example":7,"description":"Days before deadline to send notification"},"recurrence_days":{"type":"integer","nullable":true,"example":1,"description":"Recurrence interval in days for notifications"}},"description":"Reminder configuration (null if not configured)"}},"required":["id","code","label","order","start","contributors","actions","status_piloting_view"]},"WorkflowChildrenPiloting":{"type":"object","nullable":true,"oneOf":[{"type":"object","title":"Workflow Type","properties":{"type":{"type":"string","enum":["workflow"],"example":"workflow","description":"Children piloting type"},"items":{"type":"array","items":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"integer","example":15,"description":"Target workflow ID"},"code":{"type":"string","example":"code_15","description":"Portable workflow code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","nullable":true,"example":"Child Workflow","description":"Target workflow label"}},"required":["id","code"]},"step":{"type":"object","properties":{"id":{"type":"integer","example":101,"description":"Target step ID"},"code":{"type":"string","example":"step_draft","description":"Portable step code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","nullable":true,"example":"Draft","description":"Target step label"}},"required":["id","code"]}},"required":["workflow","step"]},"description":"Array of workflow step configurations"}},"required":["type","items"]},{"type":"object","title":"Status Type","properties":{"type":{"type":"string","enum":["status"],"example":"status","description":"Children piloting type"},"items":{"type":"array","items":{"type":"object","properties":{"status":{"type":"object","properties":{"id":{"type":"integer","example":123,"description":"Status ID"},"code":{"type":"string","example":"status_active","description":"Portable status code, stable across environments (the auto-incremented id is not)"},"label":{"type":"string","nullable":true,"example":"Active","description":"Status label"}},"required":["id","code"]},"supertypes":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","example":3,"description":"Supertype ID"},"label":{"type":"string","nullable":true,"example":"Products","description":"Supertype label"}},"required":["id"]},"description":"Array of supertypes (null if not configured)"},"types":{"type":"array","nullable":true,"items":{"type":"object","properties":{"code":{"type":"string","example":"type_product","description":"Portable type code, stable across environments (the auto-incremented id is not)"},"id":{"type":"integer","example":42,"description":"Type ID"},"label":{"type":"string","nullable":true,"example":"Product","description":"Type label"}},"required":["id","code"]},"description":"Array of types (null if not configured)"}},"required":["status"]},"description":"Array of status configurations"}},"required":["type","items"]}],"description":"Children piloting configuration (null if not configured)"},"WorkflowList":{"type":"object","properties":{"results_total":{"type":"integer","example":2,"description":"Total number of workflows returned"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Workflow"},"description":"Array of workflow objects with complete information"}},"required":["results_total","items"]}}}}