{"openapi":"3.0.0","info":{"title":"Afineo Webservices API — mappings","description":"Module `mappings` of the Afineo API v3 (3 endpoints).\n\nRead-only access to field mapping configurations: list available mappings and retrieve mapping details. Mappings define how data is transformed during import and export operations.\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":"mappings","description":"Read-only access to field mapping configurations: list available mappings and retrieve mapping details. Mappings define how data is transformed during import and export operations."}],"paths":{"/api/v3/mappings/full/":{"post":{"tags":["mappings"],"summary":"Get all mappings for a class","description":"## Purpose\n\nReturns all mappings for a class grouped by type (export, import, asset_view, search_view, dynamic_grouped_view).\n\n## Response Details\n\nEach mapping includes metadata (creation/modification dates, users, permissions) and full configuration data.\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Mappings information 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":"Empty string on success"},"result":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","example":"export","description":"Mapping type"},"results_total":{"type":"integer","example":5,"description":"Total number of mappings returned for this mapping type"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1415,"description":"ID"},"code":{"type":"string","example":"export_products_csv","description":"Mapping code"},"label":{"type":"string","example":"My Mapping","description":"Label"},"tags":{"type":"array","items":{"type":"string"},"example":["tag1","tag2"],"description":"Array of tags (can be empty)"},"class_id":{"type":"integer","example":4,"description":"Class ID"},"permissions":{"type":"string","example":"Group 1 | Group 2","description":"Permissions"},"creation_date":{"type":"string","nullable":true,"example":"2016-02-17T00:00:00+01:00","description":"Creation date (ISO 8601 format)"},"creation_user":{"type":"string","nullable":true,"example":"creation_user@company.com","description":"Creation user"},"modification_date":{"type":"string","nullable":true,"example":"2018-02-17T00:00:00+01:00","description":"Modification date (ISO 8601 format)"},"modification_user":{"type":"string","nullable":true,"example":"modification_user@company.com","description":"Modification user"},"last_use_date":{"type":"string","nullable":true,"example":"2019-02-17T00:00:00+01:00","description":"Last use date (ISO 8601 format)"},"last_use_user":{"type":"string","nullable":true,"example":"last_use_user@company.com","description":"Last use user"},"hash":{"type":"string","example":"a84ef1b35017a6ce27eaca962d291124afaf005dc301656ef9b7492e29cc3d4d","description":"Hash"},"data":{"type":"object","nullable":true,"description":"Data","additionalProperties":true}},"required":["id","code","label","tags","class_id","hash"],"description":"Mapping information"}}},"required":["type","items"],"description":"List of mappings for the mapping type"}}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":997,"description":"Status code (997 = action not allowed)"},"status_message":{"type":"string","example":"You don't have the rights to do this action","description":"Error message because no rights"},"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}},"required":["class_id"]}}}}}},"/api/v3/mappings/get/":{"post":{"tags":["mappings"],"summary":"Get mapping details","description":"## Purpose\n\nReturns complete mapping configuration including metadata, permissions, and full data structure.\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Mapping information 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":"Empty string on success"},"result":{"type":"object","properties":{"id":{"type":"integer","example":1415,"description":"ID"},"code":{"type":"string","example":"export_products_csv","description":"Mapping code"},"label":{"type":"string","example":"My Mapping","description":"Label"},"tags":{"type":"array","items":{"type":"string"},"example":["tag1","tag2"],"description":"Array of tags (can be empty)"},"class_id":{"type":"integer","example":4,"description":"Class ID"},"type":{"type":"string","example":"export","description":"Mapping type"},"permissions":{"type":"string","example":"Group 1 | Group 2","description":"Permissions"},"creation_date":{"type":"string","nullable":true,"example":"2016-02-17T00:00:00+01:00","description":"Creation date (ISO 8601 format)"},"creation_user":{"type":"string","nullable":true,"example":"creation_user@company.com","description":"Creation user"},"modification_date":{"type":"string","nullable":true,"example":"2018-02-17T00:00:00+01:00","description":"Modification date (ISO 8601 format)"},"modification_user":{"type":"string","nullable":true,"example":"modification_user@company.com","description":"Modification user"},"last_use_date":{"type":"string","nullable":true,"example":"2019-02-17T00:00:00+01:00","description":"Last use date (ISO 8601 format)"},"last_use_user":{"type":"string","nullable":true,"example":"last_use_user@company.com","description":"Last use user"},"hash":{"type":"string","example":"a84ef1b35017a6ce27eaca962d291124afaf005dc301656ef9b7492e29cc3d4d","description":"Hash"},"data":{"type":"object","nullable":true,"description":"Data","additionalProperties":true}},"required":["id","code","label","tags","class_id","type","hash"],"description":"Mapping information"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":997,"description":"Status code (997 = action not allowed)"},"status_message":{"type":"string","example":"You don't have the rights to do this action","description":"Error message because no rights"},"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":{"id":{"type":"integer","description":"Mapping ID. Use POST /api/v3/mappings/list with class_id to get available mappings.","example":140}},"required":["id"]}}}}}},"/api/v3/mappings/list/":{"post":{"tags":["mappings"],"summary":"List mappings by class and type","description":"## Purpose\n\nReturns simplified mapping list for a specific class and type.\n\n## Mapping Types\n\n- `export`: Data export configurations\n- `import`: Data import configurations\n- `asset_view`: Asset display views\n- `search_view`: Search result views\n- `dynamic_grouped_view`: Grouped display views\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Mappings information 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":"Empty string on success"},"result":{"type":"object","properties":{"results_total":{"type":"integer","example":2,"description":"Total number of mappings found"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1415,"description":"Mapping ID"},"code":{"type":"string","example":"export_products_csv","description":"Mapping code"},"label":{"type":"string","example":"My Mapping","description":"Mapping label"},"tags":{"type":"array","items":{"type":"string"},"example":["tag1","tag2"],"description":"Array of tags (can be empty)"},"class_id":{"type":"integer","example":4,"description":"Class ID"},"type":{"type":"string","example":"export","description":"Mapping type"}},"required":["id","code","label","tags","class_id","type"]},"description":"Array of mapping objects"}},"required":["results_total","items"],"description":"Mappings with total count"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":997,"description":"Status code (997 = action not allowed)"},"status_message":{"type":"string","example":"You don't have the rights to do this action","description":"Error message because no rights"},"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},"type":{"type":"string","description":"Mapping type: \"export\" (data export), \"import\" (data import), \"asset_view\" (asset display), \"search_view\" (search results), \"dynamic_grouped_view\" (grouped display).","enum":["asset_view","dynamic_grouped_view","export","import","search_view"],"example":"export"}},"required":["class_id","type"]}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token generated with /api/v3/token/get/"}}}}