{"openapi":"3.0.0","info":{"title":"Afineo Webservices API — administration","description":"Module `administration` of the Afineo API v3 (2 endpoints).\n\nRead-only access to platform structure: list available libraries (classes) and versions. Use this to discover the data model foundation (library IDs, names) before querying other modules like attributes or types.\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":"administration","description":"Read-only access to platform structure: list available libraries (classes) and versions. Use this to discover the data model foundation (library IDs, names) before querying other modules like attributes or types."}],"paths":{"/api/v3/administration/classes/list/":{"post":{"tags":["administration"],"summary":"List all available classes","description":"## Purpose\n\nReturns all configured data structures (libraries) in the system.\n\n## Use Cases\n\n- Discover available entities before creating or searching assets\n- Get class IDs required by other API endpoints\n- Retrieve class configuration (multilingual, contexts, modules)\n\n## Common Classes\n\nProducts, Media, Categories, Suppliers, Brands - each with its own attributes, types, and business rules.\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Classes list response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message (empty string on success)"},"result":{"type":"object","properties":{"results_total":{"type":"integer","example":5,"description":"Total number of classes returned"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":4,"description":"Class ID"},"label":{"type":"string","example":"Products","description":"Class label"},"description":{"type":"string","example":"Product management class","description":"Class description"},"indexed":{"type":"boolean","nullable":true,"example":true,"description":"Whether the class is indexed"},"relation_type":{"type":"string","nullable":true,"example":"Product Board","description":"Relation type label"},"manage_visuel":{"type":"boolean","nullable":true,"example":true,"description":"Whether visual management is enabled"},"tree_type":{"type":"string","nullable":true,"example":"tree","description":"Tree type"},"path":{"type":"string","nullable":true,"example":"tree","description":"Path type"},"default_tree":{"type":"string","nullable":true,"example":"dynamic","description":"Default tree type"},"view":{"type":"string","nullable":true,"example":"grid","description":"Default view mode"},"associated_class":{"type":"boolean","nullable":true,"example":false,"description":"Whether class has advanced links"},"multilingual":{"type":"boolean","nullable":true,"example":true,"description":"Whether the class supports multiple languages"},"enable_contexts":{"type":"boolean","nullable":true,"example":true,"description":"Whether contexts are enabled for this class"},"enable_suggestions":{"type":"boolean","nullable":true,"example":false,"description":"Whether suggestions are enabled"},"enable_note_management":{"type":"boolean","nullable":true,"example":true,"description":"Whether note management is enabled (conditional)"},"synchronization_modification_date_linking_assets":{"type":"boolean","nullable":true,"example":false,"description":"Whether modification date sync is enabled for linked assets"},"compare_contexts":{"type":"boolean","nullable":true,"example":false,"description":"Whether context comparison is enabled"},"enable_hierarchical_tree":{"type":"boolean","nullable":true,"example":true,"description":"Whether hierarchical tree is enabled"},"enable_labels":{"type":"boolean","nullable":true,"example":false,"description":"Whether labels are enabled"},"media_transformation":{"type":"boolean","nullable":true,"example":true,"description":"Whether media transformation is enabled"},"enable_lock_attribute":{"type":"boolean","nullable":true,"example":true,"description":"Whether attribute locking is enabled (conditional)"},"hotfolder":{"type":"boolean","nullable":true,"example":false,"description":"Whether hotfolder functionality is enabled"},"modules":{"oneOf":[{"type":"object","additionalProperties":{"type":"string"},"example":{"3":"Workspace","7":"Process"},"description":"Available modules for this class"},{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array when no modules"}],"nullable":true},"supertype_default_search":{"type":"array","nullable":true,"items":{"type":"string"},"example":["7"],"description":"Default search supertype IDs (conditional)"},"overload_supertypes":{"type":"array","nullable":true,"items":{"type":"object","properties":{"supertype_id":{"type":"integer","description":"Supertype ID"},"label_custom":{"type":"string","description":"Custom label for the supertype"}}},"example":[{"supertype_id":7,"label_custom":"Custom Label"}],"description":"Custom supertype overloads (conditional)"},"linked_classes":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","description":"Linked class ID"},"label":{"type":"string","description":"Linked class label"},"link_table":{"type":"string","description":"Name of the linking table between the two classes"},"has_advanced_link":{"type":"boolean","description":"Whether an advanced link table (crossed data) has been generated for this link"}}},"example":[{"id":2,"label":"Media","link_table":"products_pictures","has_advanced_link":false}],"description":"List of classes linked (attached) to this class"}},"required":["id","label","description"]},"description":"Array of class objects"}},"required":["results_total","items"]}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","enum":[3,997],"example":997,"description":"Status code (997 = insufficient permissions, 3 = no results found)"},"status_message":{"type":"string","enum":["You don't have the rights to do this action","No results found"],"example":"You don't have the rights to do this action","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}}}},"/api/v3/administration/versions/list/":{"post":{"tags":["administration"],"summary":"List available versions","description":"## Purpose\n\nReturns available language versions (locales) configured in the system.\n\n## Use Cases\n\n- Get version IDs for multi-language operations\n- Discover available locales (language + country + channel)\n- Filter by class or project context\n\n## Filtering\n\n- **No parameters**: All system versions\n- **class_id**: Versions available for a specific class\n- **context + node_id**: Versions available in a specific project node\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Versions list response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message (empty string on success)"},"result":{"type":"object","properties":{"results_total":{"type":"integer","example":5,"description":"Total number of versions returned"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1,"description":"Version ID"},"label":{"type":"string","example":"France (canal défaut)","description":"Version label"},"active":{"type":"boolean","example":true,"description":"Whether the version is active"},"currency":{"type":"string","example":"EUR","description":"Currency code"},"flag":{"type":"string","example":"fr.png","description":"Flag filename"},"channel":{"type":"object","description":"Channel information","properties":{"id":{"type":"integer","example":1,"description":"Channel ID"},"label":{"type":"string","example":"canal défaut","description":"Channel label"},"active":{"type":"boolean","example":true,"description":"Whether the channel is active"},"color":{"type":"string","example":"#ffffff","description":"Channel color"}},"required":["id","label","active","color"]},"localisation":{"type":"object","description":"Localisation information","properties":{"id":{"type":"integer","example":1,"description":"Localisation ID"},"label":{"type":"string","example":"France","description":"Localisation label"},"active":{"type":"boolean","example":true,"description":"Whether the localisation is active"}},"required":["id","label","active"]},"country":{"type":"object","description":"Country information","properties":{"id":{"type":"integer","example":67,"description":"Country ID"},"code":{"type":"string","example":"FR","description":"Country ISO code"},"label":{"type":"string","example":"France","description":"Country label"}},"required":["id","code","label"]},"lang":{"type":"object","description":"Language information","properties":{"id":{"type":"integer","example":34,"description":"Language ID"},"code":{"type":"string","example":"fr","description":"Language ISO code"},"label":{"type":"string","example":"French","description":"Language label"}},"required":["id","code","label"]}},"required":["id","label","active","currency","flag","channel","localisation","country","lang"]},"description":"Array of version objects with localization and channel information"}},"required":["results_total","items"]}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","enum":[2,3],"example":3,"description":"Status code (2 = class or node not found, 3 = no results found)"},"status_message":{"type":"string","enum":["Class or node not found","No results found"],"example":"No results found","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}},"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},"context":{"type":"string","description":"Context of the versions list. Use \"repository\" to list versions by class, or \"node\" for a specific project node **⚠️ Required when:** `class_id` = `107` | `110` | `4` | `2` | `106` | `101`","enum":["repository","node"],"example":"repository","x-conditional-required":{"class_id":[107,110,4,2,106,101]}},"node_id":{"type":"integer","description":"Node ID. Use POST /api/v3/projects/list to find projects, then POST /api/v3/projects/get for project details **⚠️ Required when:** `context` = `node`","example":1254,"x-conditional-required":{"context":["node"]}}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token generated with /api/v3/token/get/"}}}}