UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 1.06 MB
{"openapi":"3.0.0","info":{"contact":{"x-twitter":"akeneopim"},"title":"Akeneo PIM REST API","version":"1.0.0","x-apisguru-categories":["enterprise"],"x-logo":{"url":"https://twitter.com/akeneopim/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/akeneo/pim-api-docs/master/content/swagger/akeneo-web-api.json","version":"2.0"}],"x-providerName":"akeneo.com"},"paths":{"/api/oauth/v1/token":{"post":{"description":"This endpoint allows you to get an authentication token. No need to be authenticated to use this endpoint.","operationId":"post_token","parameters":[{"description":"Equal to 'application/json' or 'application/x-www-form-urlencoded', no other value allowed","in":"header","name":"Content-type","required":true,"schema":{"type":"string"}},{"description":"Equal to 'Basic xx', where 'xx' is the base 64 encoding of the client id and secret. Find out how to generate them in the <a href=\"/documentation/authentication.html#client-idsecret-generation\">Client ID/secret generation</a> section.","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"example":{"grant_type":"password","password":"admin","username":"admin"},"properties":{"grant_type":{"description":"Always equal to \"password\"","type":"string"},"password":{"description":"Your PIM password","type":"string"},"username":{"description":"Your PIM username","type":"string"}},"required":["username","password","grant_type"],"type":"object"}}},"x-form-data":true},"responses":{"200":{"description":"Return an authentication token","x-no-entity":true,"content":{"application/json":{"schema":{"properties":{"access_token":{"description":"Authentication token that should be given in every authenticated request to the API","type":"string"},"expires_in":{"description":"Validity of the token given in seconds, 3600s = 1h by default","type":"integer"},"refresh_token":{"description":"Use this token when your access token has expired. See <a href=\"/documentation/authentication.html#refresh-an-expired-token\">Refresh an expired token</a> section for more details.","type":"string"},"scope":{"description":"Unused, always equal to \"null\"","type":"string"},"token_type":{"description":"Token type, always equal to \"bearer\"","type":"string"}},"type":"object"}},"access_token":{"examples":{"response":{"value":"ZTZmYjU4ZmQxZWNmMzk1M2NlYzA5NmFhNmIzVjExMzE4NmJmODBkZGIyYTliYmQyNjk2ZDQwZThmNjdiZDQzOQ"}}},"expires_in":{"examples":{"response":{"value":3600}}},"refresh_token":{"examples":{"response":{"value":"M2FlODI0OTE3ODMyNjViMzRiOWE5ODMyNWViMThkNDU5YzJjNjFiZjNkZWFjMzIyYjc4YTgzZWY1MjE5ZTY5Mw"}}},"scope":{"examples":{"response":{"value":null}}},"token_type":{"examples":{"response":{"value":"bearer"}}}}},"400":{"description":"Bad request","x-details":"Can be caused by a malformed JSON request","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":400}}},"message":{"examples":{"response":{"value":"Invalid JSON message received"}}}}},"415":{"description":"Unsupported Media type","x-details":"The `Content-type` header has to be `application/json`","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":415}}},"message":{"examples":{"response":{"value":"‘xxx’ in ‘Content-type’ header is not valid. Only ‘application/json’ is allowed."}}}}},"422":{"description":"Unprocessable entity","x-details":"The validation of the entity given in the body of the request failed","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"_links":{"examples":{"response":{"value":{"documentation":{"href":"http://api.akeneo.com/api-reference.html"}}}}},"code":{"examples":{"response":{"value":422}}},"message":{"examples":{"response":{"value":"Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation."}}}}}},"summary":"Get authentication token","tags":["Authentication"],"x-no-token":true,"x-versions":["1.7","2.x","3.x","4.0","5.0","6.0","7.0","SaaS"]}},"/api/rest/v1":{"get":{"description":"This endpoint allows you to get the list of all the available endpoints. No need to be authenticated to use this endpoint.","operationId":"get_endpoints","responses":{"200":{"description":"Return the list of all available endpoints","x-no-entity":true,"content":{"application/json":{"schema":{"properties":{"authentication":{"description":"Endpoint to get the authentication token","type":"object"},"host":{"description":"Host name","type":"string"},"routes":{"description":"All the availables endpoints","type":"object"}},"type":"object"}},"authentication":{"examples":{"response":{"value":{"fos_oauth_server_token":{"methods":["POST"],"route":"/api/oauth/v1/token"}}}}},"host":{"examples":{"response":{"value":"https://demo.akeneo.com"}}},"routes":{"examples":{"response":{"value":{"pim_api_category_create":{"methods":["POST"],"route":"/api/rest/v1/categories"},"pim_api_category_get":{"methods":["GET"],"route":"/api/rest/v1/categories/{code}"},"pim_api_category_list":{"methods":["GET"],"route":"/api/rest/v1/categories"},"pim_api_category_partial_update":{"methods":["PATCH"],"route":"/api/rest/v1/categories/{code}"}}}}}}},"406":{"description":"Not Acceptable","x-details":"The `Accept` header is not `application/json` but it should","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":406}}},"message":{"examples":{"response":{"value":"‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."}}}}}},"summary":"Get list of all endpoints","tags":["Overview"],"x-no-token":true,"x-versions":["1.7","2.x","3.x","4.0","5.0","6.0","7.0","SaaS"]}},"/api/rest/v1/asset-categories":{"get":{"description":"This endpoint allows you to get a list of PAM asset categories. PAM asset categories are paginated and sorted by `root/left`.","operationId":"get_asset_categories","parameters":[{"description":"Number of the page to retrieve when using the `page` pagination method type. <strong>Should never be set manually</strong>, see <a href=\"/documentation/pagination.html#pagination\">Pagination</a> section","in":"query","name":"page","required":false,"schema":{"type":"integer","default":1}},{"description":"Number of results by page, see <a href=\"/documentation/pagination.html\">Pagination</a> section","in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"description":"Return the count of items in the response. Be carefull with that, on a big catalog, it can decrease performance in a significative way","in":"query","name":"with_count","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Returns PAM asset categories paginated","content":{"application/json":{"schema":{"allOf":[{"properties":{"_links":{"properties":{"first":{"properties":{"href":{"description":"URI of the first page of resources","type":"string"}},"type":"object"},"next":{"properties":{"href":{"description":"URI of the next page of resources","type":"string"}},"type":"object"},"previous":{"properties":{"href":{"description":"URI of the previous page of resources","type":"string"}},"type":"object"},"self":{"properties":{"href":{"description":"URI of the current page of resources","type":"string"}},"type":"object"}},"type":"object"},"current_page":{"description":"Current page number","type":"integer"}},"type":"object"},{"properties":{"_embedded":{"properties":{"items":{"items":{"allOf":[{"properties":{"_links":{"properties":{"self":{"properties":{"href":{"description":"URI of the resource","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},{"example":{"code":"front_views","labels":{"en_US":"Front views","fr_FR":"Vues de face"},"parent":"pictures"},"properties":{"code":{"description":"PAM asset category code","type":"string","x-immutable":true},"labels":{"default":{},"description":"PAM asset category labels for each locale","properties":{"localeCode":{"description":"PAM asset category label for the locale `localeCode`","type":"string"}},"type":"object","x-validation-rules":"The `localeCode` is the code of an existing and activated locale"},"parent":{"default":"null","description":"PAM ssset category code of the parent's asset category","type":"string","x-validation-rules":"&bull; It is either equal to `null` or to an existing asset category code. &#10;&bull; If equal to an existing asset category code, it cannot reference itself."}},"required":["code"],"type":"object"}],"type":"object"},"type":"array"}},"type":"object"}}}],"title":"PAM Asset Categories","type":"object"}},"_embedded":{"examples":{"response":{"value":{"items":[{"_links":{"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-categories/pictures"}},"code":"pictures","labels":{"de_DE":"Bilder","en_US":"Pictures","fr_FR":"Images"},"parent":null},{"_links":{"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-categories/front_views"}},"code":"front_views","labels":{"de_DE":"Vorderansichten","en_US":"Front views","fr_FR":"Vues de face"},"parent":"pictures"},{"_links":{"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-categories/side_views"}},"code":"side_views","labels":{"de_DE":"Profilansichten","en_US":"Side views","fr_FR":"Vues de profil"},"parent":"pictures"}]}}}},"_links":{"examples":{"response":{"value":{"first":{"href":"https://demo.akeneo.com/api/rest/v1/asset-categories?page=1&limit=3"},"next":{"href":"https://demo.akeneo.com/api/rest/v1/asset-categories?page=3&limit=3"},"previous":{"href":"https://demo.akeneo.com/api/rest/v1/asset-categories?page=1&limit=3"},"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-categories?page=2&limit=3"}}}}},"current_page":{"examples":{"response":{"value":2}}}}},"401":{"description":"Authentication required","x-details":"Can be caused by a missing or expired token","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":401}}},"message":{"examples":{"response":{"value":"Authentication is required"}}}}},"403":{"description":"Access forbidden","x-details":"The user does not have the permission to execute this request","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":403}}},"message":{"examples":{"response":{"value":"Access forbidden. You are not allowed to list categories."}}}}},"406":{"description":"Not Acceptable","x-details":"The `Accept` header is not `application/json` but it should","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":406}}},"message":{"examples":{"response":{"value":"‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."}}}}}},"summary":"Get list of PAM asset categories","tags":["PAM asset category"],"x-deprecated":true,"x-ee":true,"x-versions":["2.1","2.2","2.3","3.x"]},"patch":{"description":"This endpoint allows you to update several PAM asset categories at once.","operationId":"patch_asset_categories","requestBody":{"content":{"application/json":{"schema":{"example":{"code":"front_views","labels":{"en_US":"Front views","fr_FR":"Vues de face"},"parent":"pictures"},"properties":{"code":{"description":"PAM asset category code","type":"string","x-immutable":true},"labels":{"default":{},"description":"PAM asset category labels for each locale","properties":{"localeCode":{"description":"PAM asset category label for the locale `localeCode`","type":"string"}},"type":"object","x-validation-rules":"The `localeCode` is the code of an existing and activated locale"},"parent":{"default":"null","description":"PAM ssset category code of the parent's asset category","type":"string","x-validation-rules":"&bull; It is either equal to `null` or to an existing asset category code. &#10;&bull; If equal to an existing asset category code, it cannot reference itself."}},"required":["code"],"type":"object","x-examples":{"x-example-1":"{\"code\":\"pictures\",\"parent\":null}","x-example-2":"{\"code\":\"front_views\",\"parent\":\"pitures\"}","x-example-3":"{\"code\":\"other_views\",\"parent\":\"pictures\"}"}}}}},"responses":{"200":{"description":"OK","x-details":"Returns a plain text response whose lines are JSON containing the status of each update or creation","x-no-entity":true,"content":{"application/json":{"schema":{"properties":{"code":{"description":"Resource code, only filled when the resource is not a product","type":"string"},"identifier":{"description":"Resource identifier, only filled when the resource is a product","type":"string"},"line":{"description":"Line number","type":"integer"},"message":{"description":"Message explaining the error","type":"string"},"status_code":{"description":"HTTP status code, see <a href=\"/documentation/responses.html#client-errors\">Client errors</a> to understand the meaning of each code","type":"integer"}},"type":"object"}},"x-example-1":{"examples":{"response":{"value":"{\"line\":1,\"code\":\"spring_collection\",\"status_code\":201}"}}},"x-example-2":{"examples":{"response":{"value":"{\"line\":2,\"code\":\"front_views\",\"status_code\":422,\"message\":\"Asset category \"pitures\" does not exist.\"}"}}},"x-example-3":{"examples":{"response":{"value":"{\"line\":3,\"code\":\"other_views\",\"status_code\":204}"}}}}},"401":{"description":"Authentication required","x-details":"Can be caused by a missing or expired token","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":401}}},"message":{"examples":{"response":{"value":"Authentication is required"}}}}},"403":{"description":"Access forbidden","x-details":"The user does not have the permission to execute this request","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":403}}},"message":{"examples":{"response":{"value":"Access forbidden. You are not allowed to list categories."}}}}},"413":{"description":"Request Entity Too Large","x-details":"There are too many resources to process (max 100) or the line of JSON is too long (max 1 000 000 characters)","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":413}}},"message":{"examples":{"response":{"value":"Too many resources to process, 100 is the maximum allowed."}}}}},"415":{"description":"Unsupported Media type","x-details":"The `Content-type` header has to be `application/vnd.akeneo.collection+json`","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":415}}},"message":{"examples":{"response":{"value":"‘xxx’ in ‘Content-type’ header is not valid. Only ‘application/vnd.akeneo.collection+json’ is allowed."}}}}}},"summary":"Update/create several PAM asset categories","tags":["PAM asset category"],"x-body-by-line":"Contains several lines, each line is a category in JSON standard format","x-deprecated":true,"x-ee":true,"x-versions":["2.1","2.2","2.3","3.x"]},"post":{"description":"This endpoint allows you to create a new PAM asset category.","operationId":"post_asset_categories","requestBody":{"content":{"application/json":{"schema":{"example":{"code":"front_views","labels":{"en_US":"Front views","fr_FR":"Vues de face"},"parent":"pictures"},"properties":{"code":{"description":"PAM asset category code","type":"string","x-immutable":true},"labels":{"default":{},"description":"PAM asset category labels for each locale","properties":{"localeCode":{"description":"PAM asset category label for the locale `localeCode`","type":"string"}},"type":"object","x-validation-rules":"The `localeCode` is the code of an existing and activated locale"},"parent":{"default":"null","description":"PAM ssset category code of the parent's asset category","type":"string","x-validation-rules":"&bull; It is either equal to `null` or to an existing asset category code. &#10;&bull; If equal to an existing asset category code, it cannot reference itself."}},"required":["code"],"type":"object"}}}},"responses":{"201":{"description":"Created","headers":{"Location":{"description":"URI of the created resource","schema":{"type":"string"}}},"x-details":"Means that the creation was successful"},"400":{"description":"Bad request","x-details":"Can be caused by a malformed JSON request","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":400}}},"message":{"examples":{"response":{"value":"Invalid JSON message received"}}}}},"401":{"description":"Authentication required","x-details":"Can be caused by a missing or expired token","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":401}}},"message":{"examples":{"response":{"value":"Authentication is required"}}}}},"403":{"description":"Access forbidden","x-details":"The user does not have the permission to execute this request","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":403}}},"message":{"examples":{"response":{"value":"Access forbidden. You are not allowed to list categories."}}}}},"415":{"description":"Unsupported Media type","x-details":"The `Content-type` header has to be `application/json`","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":415}}},"message":{"examples":{"response":{"value":"‘xxx’ in ‘Content-type’ header is not valid. Only ‘application/json’ is allowed."}}}}},"422":{"description":"Unprocessable entity","x-details":"The validation of the entity given in the body of the request failed","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"_links":{"examples":{"response":{"value":{"documentation":{"href":"http://api.akeneo.com/api-reference.html"}}}}},"code":{"examples":{"response":{"value":422}}},"message":{"examples":{"response":{"value":"Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation."}}}}}},"summary":"Create a new PAM asset category","tags":["PAM asset category"],"x-deprecated":true,"x-ee":true,"x-versions":["2.1","2.2","2.3","3.x"]}},"/api/rest/v1/asset-categories/{code}":{"get":{"description":"This endpoint allows you to get the information about a given PAM asset category.","operationId":"get_asset_categories__code_","parameters":[{"description":"Code of the resource","in":"path","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","x-details":"Returns the content of the asset category in JSON standard format","content":{"application/json":{"schema":{"example":{"code":"front_views","labels":{"en_US":"Front views","fr_FR":"Vues de face"},"parent":"pictures"},"properties":{"code":{"description":"PAM asset category code","type":"string","x-immutable":true},"labels":{"default":{},"description":"PAM asset category labels for each locale","properties":{"localeCode":{"description":"PAM asset category label for the locale `localeCode`","type":"string"}},"type":"object","x-validation-rules":"The `localeCode` is the code of an existing and activated locale"},"parent":{"default":"null","description":"PAM ssset category code of the parent's asset category","type":"string","x-validation-rules":"&bull; It is either equal to `null` or to an existing asset category code. &#10;&bull; If equal to an existing asset category code, it cannot reference itself."}},"required":["code"],"type":"object"}}}},"401":{"description":"Authentication required","x-details":"Can be caused by a missing or expired token","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":401}}},"message":{"examples":{"response":{"value":"Authentication is required"}}}}},"403":{"description":"Access forbidden","x-details":"The user does not have the permission to execute this request","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":403}}},"message":{"examples":{"response":{"value":"Access forbidden. You are not allowed to list categories."}}}}},"404":{"description":"Resource not found","x-details":"The resource code given in the URI does not correspond to any existing PIM resource","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":404}}},"message":{"examples":{"response":{"value":"Resource `my_resource_code` does not exist."}}}}},"406":{"description":"Not Acceptable","x-details":"The `Accept` header is not `application/json` but it should","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":406}}},"message":{"examples":{"response":{"value":"‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."}}}}}},"summary":"Get a PAM asset category","tags":["PAM asset category"],"x-deprecated":true,"x-ee":true,"x-versions":["2.1","2.2","2.3","3.x"]},"patch":{"description":"This endpoint allows you to update a given PAM asset category. Know more about <a href=\"/documentation/update.html#update-behavior\">Update behavior</a>. Note that if no category exists for the given code, it creates it.","operationId":"patch_asset_categories__code_","parameters":[{"description":"Code of the resource","in":"path","name":"code","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"example":{"code":"front_views","labels":{"en_US":"Front views","fr_FR":"Vues de face"},"parent":"pictures"},"properties":{"code":{"description":"PAM asset category code","type":"string","x-immutable":true},"labels":{"default":{},"description":"PAM asset category labels for each locale","properties":{"localeCode":{"description":"PAM asset category label for the locale `localeCode`","type":"string"}},"type":"object","x-validation-rules":"The `localeCode` is the code of an existing and activated locale"},"parent":{"default":"null","description":"PAM ssset category code of the parent's asset category","type":"string","x-validation-rules":"&bull; It is either equal to `null` or to an existing asset category code. &#10;&bull; If equal to an existing asset category code, it cannot reference itself."}},"required":["code"],"type":"object"}}},"required":true},"responses":{"201":{"description":"Created","headers":{"Location":{"description":"URI of the created resource","schema":{"type":"string"}}},"x-details":"Means that the creation was successful"},"204":{"description":"No content to return","headers":{"Location":{"description":"URI of the updated resource","schema":{"type":"string"}}},"x-details":"Means that the update was successful"},"400":{"description":"Bad request","x-details":"Can be caused by a malformed JSON request","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":400}}},"message":{"examples":{"response":{"value":"Invalid JSON message received"}}}}},"401":{"description":"Authentication required","x-details":"Can be caused by a missing or expired token","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":401}}},"message":{"examples":{"response":{"value":"Authentication is required"}}}}},"403":{"description":"Access forbidden","x-details":"The user does not have the permission to execute this request","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":403}}},"message":{"examples":{"response":{"value":"Access forbidden. You are not allowed to list categories."}}}}},"415":{"description":"Unsupported Media type","x-details":"The `Content-type` header has to be `application/json`","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":415}}},"message":{"examples":{"response":{"value":"‘xxx’ in ‘Content-type’ header is not valid. Only ‘application/json’ is allowed."}}}}},"422":{"description":"Unprocessable entity","x-details":"The validation of the entity given in the body of the request failed","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"_links":{"examples":{"response":{"value":{"documentation":{"href":"http://api.akeneo.com/api-reference.html"}}}}},"code":{"examples":{"response":{"value":422}}},"message":{"examples":{"response":{"value":"Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation."}}}}}},"summary":"Update/create a PAM asset category","tags":["PAM asset category"],"x-deprecated":true,"x-ee":true,"x-versions":["2.1","2.2","2.3","3.x"]}},"/api/rest/v1/asset-families":{"get":{"description":"This endpoint allows you to get a list of asset families. Asset families are paginated.","operationId":"get_asset_families","parameters":[{"description":"Cursor when using the `search_after` pagination method type. <strong>Should never be set manually</strong>, see <a href=\"/documentation/pagination.html\">Pagination</a> section","in":"query","name":"search_after","required":false,"schema":{"type":"string","default":"cursor to the first page"}}],"responses":{"200":{"description":"Return asset families paginated","content":{"application/json":{"schema":{"allOf":[{"properties":{"_links":{"properties":{"first":{"properties":{"href":{"description":"URI of the first page of resources","type":"string"}},"type":"object"},"next":{"properties":{"href":{"description":"URI of the next page of resources","type":"string"}},"type":"object"},"self":{"properties":{"href":{"description":"URI of the current page of resources","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},{"properties":{"_embedded":{"properties":{"items":{"items":{"allOf":[{"properties":{"_links":{"properties":{"self":{"properties":{"href":{"description":"URI of the resource","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},{"example":{"attribute_as_main_media":"main_image","code":"model_pictures","labels":{"en_US":"Model pictures","fr_FR":"Photographies en pied"},"naming_convention":{"abort_asset_creation_on_error":true,"pattern":"/(?P<product_ref>.*)-.*/","source":{"channel":null,"locale":null,"property":"code"}},"product_link_rules":[{"assign_assets_to":[{"attribute":"model_pictures","mode":"replace"}],"product_selections":[{"field":"sku","operator":"EQUALS","value":"{{product_ref}}"}]}],"transformations":[{"filename_suffix":"_thumbnailBW","label":"Thumbnail plus black and white transformation","operations":[{"parameters":{"height":150,"width":150},"type":"thumbnail"},{"parameters":{"colorspace":"grey"},"type":"colorspace"}],"source":{"attribute":"main_image","channel":null,"locale":null},"target":{"attribute":"thumbnail","channel":null,"locale":null}}]},"properties":{"attribute_as_main_media":{"default":"First media file or media link attribute that was created","description":"Attribute code that is used as the main media of the asset family.","type":"string","x-validation-rules":"It should be the code of an attribute that belongs to this family, and it must be a media file or a media link attribute type."},"code":{"description":"Asset family code","type":"string","x-immutable":true},"labels":{"default":{},"description":"Asset family labels for each locale","properties":{"localeCode":{"description":"Asset family label for the locale `localeCode`","type":"string"}},"type":"object","x-validation-rules":"The `localeCode` is the code of an existing and activated locale"},"naming_convention":{"default":{},"description":"The naming convention ran over the asset code or the main media filename upon each asset creation, in order to automatically set several values in asset attributes. To learn more and see the format of this property, take a look at <a href='/concepts/asset-manager.html#focus-on-the-naming-convention'>here</a>.","properties":{"abort_asset_creation_on_error":{"description":"Whether the asset should be created if the naming convention failed to apply. More details <a href='/concepts/asset-manager.html#abort-asset-creation-on-error'>here</a>.","type":"boolean"},"pattern":{"description":"The regular expression that should be applied on the source. More details <a href='/concepts/asset-manager.html#pattern'>here</a>.","type":"string"},"source":{"description":"The string on which the naming convention should be applied. More details <a href='/concepts/asset-manager.html#source'>here</a>.","type":"object"}},"type":"object","x-validation-rules":"To know more about the validation of this property, take a look at our naming convention format."},"product_link_rules":{"default":[],"description":"The rules that will be run after the asset creation, in order to automatically link the assets of this family to a set of products. To understand the format of this property, see <a href='/concepts/asset-manager.html#focus-on-the-product-link-rule'>here</a>.","items":{"properties":{"assign_assets_to":{"description":"The product value in which your assets will be assigned. More details <a href='/concepts/asset-manager.html#product-value-assignment'>here</a>.","items":{"properties":{"attribute":{"type":"string"},"channel":{"type":"string"},"locale":{"type":"string"},"mode":{"type":"string"}},"required":["attribute","mode"],"type":"object"},"type":"array"},"product_selections":{"description":"The product selection to which the assets of the asset family to be automatically linked. More details <a href='/concepts/asset-manager.html#product-selection'>here</a>.","items":{"properties":{"channel":{"type":"string"},"field":{"type":"string"},"locale":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"}},"required":["field","operator","value"],"type":"object"},"type":"array"}},"type":"object"},"type":"array","x-validation-rules":"To know more about the validation of this property, take a look at our product link rule format."},"transformations":{"default":[],"description":"The transformations to perform on source files in order to generate new files into your asset attributes (only available since v4.0). To understand the format of this property, see <a href='/concepts/asset-manager.html#focus-on-the-transformations'>here</a>.","items":{"properties":{"filename_prefix":{"description":"The prefix that will be prepended to the source filename to generate the target filename. More details <a href='/concepts/asset-manager.html#target-filename'>here</a>.","type":"string"},"filename_suffix":{"description":"The suffix that will be appended to the source filename to generate the target filename. More details <a href='/concepts/asset-manager.html#target-filename'>here</a>.","type":"string"},"label":{"description":"The name of the transformation","type":"string"},"operations":{"description":"The transformations that should be applied to your source file to generate the target file. More details <a href='/concepts/asset-manager.html#transformation-operations'>here</a>.","properties":{"parameters":{"properties":{"colorspace":{"type":"string"},"height":{"type":"integer"},"quality":{"type":"integer"},"ratio":{"type":"integer"},"resolution-unit":{"type":"string"},"resolution-x":{"type":"integer"},"resolution-y":{"type":"integer"},"width":{"type":"integer"}},"type":"object"},"type":{"type":"string"}},"type":"object","x-validation-rules":"Should contain at least one operation"},"source":{"description":"The attribute value in which is stored the media file you want to use as the source file for your transformation. More details <a href='/concepts/asset-manager.html#source-file'>here</a>.","properties":{"attribute":{"type":"string"},"channel":{"type":"string"},"locale":{"type":"string"}},"required":["attribute","channel","locale"],"type":"object"},"target":{"description":"The attribute value in which the PIM will generate the new transformed file, aka the target file. More details <a href='/concepts/asset-manager.html#target-file'>here</a>.","properties":{"attribute":{"type":"string"},"channel":{"type":"string"},"locale":{"type":"string"}},"required":["attribute","channel","locale"],"type":"object"}},"required":["label","target","source","operations"],"type":"object"},"type":"array","x-from-version":"4.0","x-validation-rules":"To know more about the validation of this property, take a look at our transformation format."}},"required":["code"],"type":"object"}],"type":"object"},"type":"array"}},"type":"object"}}}],"title":"Asset families","type":"object"}},"_embedded":{"examples":{"response":{"value":{"_items":[{"_links":{"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families/packshots"}},"code":"packshots","labels":{"en_US":"Packshots","fr_FR":"Plans produit"},"product_link_rules":[{"assign_assets_to":[{"attribute":"{{my_product_attribute}}","mode":"add"}],"product_selections":[{"field":"sku","operator":"=","value":"{{product_ref}}"}]}],"transformations":[{"filename_suffix":"_thumbnailBW","label":"My transformation","operations":[{"parameters":{"height":150,"width":150},"type":"thumbnail"},{"parameters":{"colorspace":"grey"},"type":"colorspace"}],"source":{"attribute":"main_image","channel":null,"locale":null},"target":{"attribute":"thumbnail","channel":null,"locale":null}}],"“naming_convention”":{"abort_asset_creation_on_error":true,"pattern":"/(?P<product_ref>.*)\\.jpg/","source":{"channel":null,"locale":null,"property":"code"}}},{"_links":{"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families/videos"}},"code":"videos","labels":{"en_US":"Videos","fr_FR":"Vidéos"},"product_link_rules":[{"assign_assets_to":[{"attribute":"presentation_video","locale":"{{locale}}","mode":"replace"}],"product_selections":[{"field":"categories","operator":"IN","value":["{{category}}"]}]}]},{"_links":{"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families/user_guides"}},"code":"user_guides","labels":{"en_US":"User guides","fr_FR":"Guides utilisateur"},"product_link_rules":[{"assign_assets_to":[{"attribute":"user_instructions","locale":"{{locale}}","mode":"replace"}],"product_selections":[{"field":"sku","operator":"=","value":"{{product_ref}}"}]}]}]}}}},"_links":{"examples":{"response":{"value":{"first":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families"},"next":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families?search_after=2x055w%3D%3D"},"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families"}}}}}}},"401":{"description":"Authentication required","x-details":"Can be caused by a missing or expired token","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":401}}},"message":{"examples":{"response":{"value":"Authentication is required"}}}}},"406":{"description":"Not Acceptable","x-details":"The `Accept` header is not `application/json` but it should","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":406}}},"message":{"examples":{"response":{"value":"‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."}}}}}},"summary":"Get list of asset families","tags":["Asset family"],"x-ee":true,"x-versions":["3.2","4.0","5.0","6.0","7.0","SaaS"]}},"/api/rest/v1/asset-families/{asset_family_code}/assets":{"get":{"description":"This endpoint allows you to get a list of assets of a given asset family. Assets are paginated. This endpoint is case sensitive on the asset family code.","operationId":"get_assets","parameters":[{"description":"Filter assets, for more details see the <a href=\"/documentation/filter.html#filter-assets\">Asset filters</a> section","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Filter asset values to return scopable asset attributes for the given channel as well as the non localizable/non scopable asset attributes, for more details see the <a href=\"/documentation/filter.html#asset-values-by-channel\">Filter asset values by channel</a> section","in":"query","name":"channel","required":false,"schema":{"type":"string"}},{"description":"Filter asset values to return localizable attributes for the given locales as well as the non localizable/non scopable asset attributes, for more details see the <a href=\"/documentation/filter.html#asset-values-by-locale\">Filter asset values by locale</a> section","in":"query","name":"locales","required":false,"schema":{"type":"string"}},{"description":"Code of the asset family","in":"path","name":"asset_family_code","required":true,"schema":{"type":"string"}},{"description":"Cursor when using the `search_after` pagination method type. <strong>Should never be set manually</strong>, see <a href=\"/documentation/pagination.html\">Pagination</a> section","in":"query","name":"search_after","required":false,"schema":{"type":"string","default":"cursor to the first page"}}],"responses":{"200":{"description":"Return the assets of the given asset family paginated","content":{"application/json":{"schema":{"allOf":[{"properties":{"_links":{"properties":{"first":{"properties":{"href":{"description":"URI of the first page of resources","type":"string"}},"type":"object"},"next":{"properties":{"href":{"description":"URI of the next page of resources","type":"string"}},"type":"object"},"self":{"properties":{"href":{"description":"URI of the current page of resources","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},{"properties":{"_embedded":{"properties":{"_items":{"items":{"allOf":[{"properties":{"_links":{"properties":{"self":{"properties":{"href":{"description":"URI of the resource","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},{"example":{"code":"sku_54628_picture1","created":"2025-06-15T13:49:18.089Z","updated":"2025-06-15T13:49:18.090Z","values":{"end_of_use_date":[{"channel":null,"data":"02/03/2021","locale":null}],"main_colors":[{"channel":null,"data":["red","purple"],"locale":null}],"media_preview":[{"channel":null,"data":"sku_54628_picture1.jpg","locale":null}],"model_wears_size":[{"channel":null,"data":"s","locale":null}],"photographer":[{"channel":null,"data":"ben_levy","locale":null}]}},"properties":{"code":{"description":"Code of the asset","type":"string","x-immutable":true},"created":{"description":"Date of creation","format":"dateTime","type":"string","x-from-version":"6.0","x-immutable":true,"x-read-only":true},"updated":{"description":"Date of the last update","format":"dateTime","type":"string","x-from-version":"6.0","x-read-only":true},"values":{"description":"Asset attributes values, see the <a href='/concepts/asset-manager.html#focus-on-the-asset-values'>Focus on the asset values</a> section for more details.","properties":{"attributeCode":{"items":{"properties":{"channel":{"description":"Channel code of the asset attribute value","type":"string"},"data":{"description":"Asset attribute value. See <a href='/concepts/asset-manager.html#the-data-format'>the `data` format</a> section for more details.","type":"object"},"locale":{"description":"Locale code of the asset attribute value","type":"string"}},"type":"object"},"type":"array"}},"type":"object","x-validation-rules":"Validation rules detailed in Asset attribute values section"}},"required":["code"],"type":"object"}],"type":"object"},"type":"array"}},"type":"object"}}}],"title":"Asset","type":"object"}},"_embedded":{"examples":{"response":{"value":{"_items":[{"_links":{"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families/model_pictures/assets/allie_jean_model_picture"}},"code":"allie_jean_model_picture","created":"2025-06-15T13:49:18.089Z","updated":"2025-06-15T13:49:18.089Z","values":{"media_link":[{"channel":null,"data":"allie_jean_model_picture.png","locale":null}],"model_is_wearing_size":[{"channel":null,"data":"size_27","locale":null}],"warning_mention":[{"channel":null,"data":"Photo not retouched","locale":"en_US"},{"channel":null,"data":"Photo non retouchée","locale":"fr_FR"}]}},{"_links":{"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families/model_pictures/assets/amy_socks_model_picture"}},"code":"amy_socks_model_picture","created":"2025-06-15T13:49:18.089Z","updated":"2025-06-15T13:49:18.089Z","values":{"media_link":[{"channel":null,"data":"amy_socks_model_picture.png","locale":null}],"model_is_wearing_size":[{"channel":null,"data":"unique_size","locale":null}],"warning_mention":[{"channel":null,"data":"Photo not retouched","locale":"en_US"},{"channel":null,"data":"Photo non retouchée","locale":"fr_FR"}]}},{"_links":{"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families/model_pictures/assets/alice_blouse_model_picture"}},"code":"alice_blouse_model_picture","created":"2025-06-15T13:49:18.089Z","updated":"2025-06-15T13:49:18.089Z","values":{"media_link":[{"channel":null,"data":"alice_blouse_model_picture.png","locale":null}],"model_is_wearing_size":[{"channel":null,"data":"small","locale":null}],"warning_mention":[{"channel":null,"data":"Photo retouched","locale":"en_US"},{"channel":null,"data":"Photo non retouchée","locale":"fr_FR"}]}}]}}}},"_links":{"examples":{"response":{"value":{"first":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families/model_pictures/assets"},"next":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families/model_pictures/assets?search_after=2x088w%3D%3D"},"self":{"href":"https://demo.akeneo.com/api/rest/v1/asset-families/model_pictures/assets"}}}}}}},"401":{"description":"Authentication required","x-details":"Can be caused by a missing or expired token","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":401}}},"message":{"examples":{"response":{"value":"Authentication is required"}}}}},"406":{"description":"Not Acceptable","x-details":"The `Accept` header is not `application/json` but it should","content":{"application/json":{"schema":{"properties":{"code":{"description":"HTTP status code","type":"integer"},"message":{"description":"Message explaining the error","type":"string"}},"type":"object"}},"code":{"examples":{"response":{"value":406}}},"message":{"examples":{"response":{"value":"‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."}}}}}},"summary":"Get the list of the assets of a given asset family","tags":["Asset"],"x-ee":true,"x-versions":["3.2","4.0","5.0","6.0","7.0","SaaS"]},"patch":{"description":"This endpoint allows you to update and/or create several assets of one given asset family at once. Learn more about the <a href=\"/documentation/update.html#patch-asset-attribute-values\">Update behavior</a>. Note that if the asset does not already exist for the given asset family, it creates it. This endpoint is case sensitive on the asset family code.","operationId":"patch_assets","parameters":[{"description":"Code of the asset family","in":"path","name":"asset_family_code","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"example":[{"code":"sku_54628_picture1","created":"2025-06-15T13:49:18.090Z","updated":"2025-06-15T13:49:18.090Z","values":{"end_of_use_date":[{"channel":null,"data":"02/03/2021","locale":null}],"main_colors":[{"channel":null,"data":["red","purple"],"locale":null}],"media_preview":[{"channel":null,"data":"sku_54628_picture1.jpg","locale":null}],"model_wears_size":[{"channel":null,"data":"s","locale":null}],"photographer":[{"channel":null,"data":"ben_levy","locale":null}]}},{"code":"sku_54628_picture2","created":"2025-06-15T13:49:18.090Z","updated":"2025-06-15T13:49:18.090Z","values":{"end_of_use_date":[{"channel":null,"data":"02/03/2021","locale":null}],"main_colors":[{"channel":null,"data":["blue","white"],"locale":null}],"media_preview":[{"channel":null,"data":"sku_54628_picture2.jpg","locale":null}],"model_wears_size":[{"channel":null,"data":"s","locale":null}],"photographer":[{"channel":null,"data":"ben_levy","locale":null}]}},{"code":"sku_54628_picture3","created":"2025-06-15T13:49:18.090Z","updated":"2025-06-15T13:49:18.090Z","values":{"end_of_use_date":[{"channel":null,"data":"02/03/2021","locale":null}],"main_colors":[{"channel":null,"data":["purple"],"locale":null}],"media_preview":[{"channel":null,"data":"sku_54628_picture3.jpg","locale":null}],"model_wears_size":[{"channel":null,"data":"s","locale":null}],"photographer":[{"channel":null,"data":"ben_levy","locale":null}]}}],"items":{"example":{"code":"sku_54628_picture1","created":"2025-06-15T13:49:18.090Z","updated":"2025-06-15T13:49:18.090Z","values":{"end_of_use_date":[{"channel":null,"data":"02/03/2021","locale":null}],"main_colors":[{"channel":null,"data":["red","purple"],"locale":null}],"media_preview":[{"channel":null,"data":"sku_54628_picture1.jpg","locale":null}],"model_wears_size":[{"channel":null,"data":"s","locale":null}],"photographer":[{"channel":null,"data":"ben_levy","locale":null}]}},"properties":{"code":{"description":"Code of the asset","type":"string","x-immutable":true},"created":{"description":"Date of creation","format":"dateTime","type":"string","x-from-version":"6.0","x-immutable":true,"x-read-only":true},"updated":{"description":"Date of the last update","format":"dateTime","type":"string","x-from-version":"6.0","x-read-only":true},"values":{"description":"Asset attributes values, see the <a href='/concepts/asset-manager.html#focus-on-the-asset-values'>Focus on the asset values</a> section for more details.","properties":{"attributeCode":{"items":{"properties":{"channel":{"description":"Channel code of the asset attribute value","type":"string"},"data":{"description":"Asset attribute value. See <a href='/concepts/asset-manager.html#the-data-format'>the `data` format</a> section for more details.","type":"object"},"locale":{"description":"Locale code of the asset attribute value","type":"string"}},"type":"object"},"type":"array"}},"type":"object","x-validation-rules":"Validation rules detailed in Asset attribute values section"}},"required":["code"],"type":"object"},"type":"array"}}},"required":true},"responses":{"200":{"description":"OK","x-details":"Returns an JSON array in which each obj