# Item fee management

## Retrieve all itemFees

> Retrieve all itemFees.<br>

```json
{"openapi":"3.0.0","info":{"title":"Fee Service","version":"v1"},"tags":[{"name":"Item fee management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"fee.fee_create":"Needed to create a fee.","fee.fee_update":"Needed to update a fee.","fee.fee_delete":"Needed to delete a fee.","fee.item_create":"Needed to create an item fee.","fee.item_update":"Needed to update an item fee.","fee.item_delete":"Needed to delete an item fee."}}}}},"responses":{"trait_paged_itemfee_200":{"description":"Request was successful.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemFees"}}}},"trait_paged_400":{"description":"Request was syntactically incorrect. Details of the error are included in the response payload.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}},"trait_unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired.\n\nDetails will be provided in the response payload.","content":{"application/json":{"schema":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Access token does not contain necessary scopes or tenant in path does not match tenant from token.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}},"trait_yaasAware_500":{"description":"Some server-side error occurred. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"ItemFees":{"type":"array","items":{"$ref":"#/components/schemas/ItemFee"}},"ItemFee":{"type":"object","properties":{"id":{"description":"Unique identifier of the item fee.","type":"string"},"siteCode":{"description":"The SiteCode this fee belongs to.","type":"string"},"itemYrn":{"description":"YRN of the item to assign fees to.","type":"string"},"feeIds":{"description":"List of unique identifiers of fees to assign to the item.","type":"array","items":{"type":"string"}}},"required":["itemYrn","feeIds","siteCode"]},"ErrorMessage":{"title":"Error Message","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\n\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}}},"parameters":{"trait_localizedRetrieval_Accept-Language":{"description":"The value of the locale identifier of the language in which the attribute should be returned.\nProvide several values separated by comma, in order to specify fallback languages.\n","in":"header","name":"Accept-Language","schema":{"type":"string","default":"*","minimum":1}},"SiteCode":{"description":"A list of site codes.","in":"query","name":"siteCode","schema":{"default":"main","type":"string"}},"FieldsIds":{"description":"A list of feeIds.","in":"query","name":"feeIds","schema":{"type":"string"}},"ProductsIds":{"description":"A list of product Ids.","in":"query","name":"productIds","schema":{"type":"string"}},"Expand":{"description":"Whether only the fee-id is in the response or the full fees.","in":"query","name":"expand","schema":{"type":"boolean","default":false}},"pageNumber":{"description":"The page number to be retrieved where the size of the pages must be specified by the pageSize parameter.\nThe number of the first page is 1.\n","in":"query","name":"pageNumber","schema":{"default":1,"minimum":1,"type":"integer"}},"pageSize":{"description":"The number of documents being retrieved on one page.\n","in":"query","name":"pageSize","schema":{"default":16,"minimum":1,"type":"integer"}},"siteFallback":{"in":"query","name":"siteFallback","schema":{"default":false,"type":"boolean"}}}},"paths":{"/fee/{tenant}/itemFees":{"get":{"description":"Retrieve all itemFees.\n","tags":["Item fee management"],"summary":"Retrieve all itemFees","operationId":"GET-fee-list-item-fees","responses":{"200":{"$ref":"#/components/responses/trait_paged_itemfee_200"},"400":{"$ref":"#/components/responses/trait_paged_400"},"401":{"$ref":"#/components/responses/trait_unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"},"500":{"$ref":"#/components/responses/trait_yaasAware_500"}},"parameters":[{"$ref":"#/components/parameters/trait_localizedRetrieval_Accept-Language"},{"$ref":"#/components/parameters/SiteCode"},{"$ref":"#/components/parameters/FieldsIds"},{"$ref":"#/components/parameters/ProductsIds"},{"$ref":"#/components/parameters/Expand"},{"$ref":"#/components/parameters/pageNumber"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/siteFallback"}]}}}}
```

## Creating an itemFee

> Creates a new itemFee. This endpoint allows you to assign one or more predefined fees to a specific item within a tenant. By associating fees with items, you can manage charges such as packaging, handling, or other service fees directly at the item level.<br>

```json
{"openapi":"3.0.0","info":{"title":"Fee Service","version":"v1"},"tags":[{"name":"Item fee management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["fee.item_create"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"fee.fee_create":"Needed to create a fee.","fee.fee_update":"Needed to update a fee.","fee.fee_delete":"Needed to delete a fee.","fee.item_create":"Needed to create an item fee.","fee.item_update":"Needed to update an item fee.","fee.item_delete":"Needed to delete an item fee."}}}}},"schemas":{"ItemFee":{"type":"object","properties":{"id":{"description":"Unique identifier of the item fee.","type":"string"},"siteCode":{"description":"The SiteCode this fee belongs to.","type":"string"},"itemYrn":{"description":"YRN of the item to assign fees to.","type":"string"},"feeIds":{"description":"List of unique identifiers of fees to assign to the item.","type":"array","items":{"type":"string"}}},"required":["itemYrn","feeIds","siteCode"]},"ItemFeeCreationResponse":{"type":"object","properties":{"id":{"description":"unique identifier of the created resource","type":"string"},"yrn":{"description":"YRN of the created resource","type":"string"}},"required":["id"]},"ErrorMessage":{"title":"Error Message","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\n\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}}},"responses":{"trait_feeId_not_found_400":{"description":"Request was syntactically incorrect. Details of the error are included in the response payload.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}},"trait_unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired.\n\nDetails will be provided in the response payload.","content":{"application/json":{"schema":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Access token does not contain necessary scopes or tenant in path does not match tenant from token.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}},"trait_yaasAware_409":{"description":"Creation failed because there was a conflict with another resource. Details of the error are included in the response payload.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}},"trait_yaasAware_500":{"description":"Some server-side error occurred. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"parameters":{"trait_localizedModification_Content-Language":{"description":"The locale identifier of the language of the updated attribute.\n","in":"header","name":"Content-Language","schema":{"type":"string"}}}},"paths":{"/fee/{tenant}/itemFees":{"post":{"description":"Creates a new itemFee. This endpoint allows you to assign one or more predefined fees to a specific item within a tenant. By associating fees with items, you can manage charges such as packaging, handling, or other service fees directly at the item level.\n","tags":["Item fee management"],"summary":"Creating an itemFee","operationId":"POST-fee-create-item-fee","requestBody":{"content":{"application:json":{"schema":{"$ref":"#/components/schemas/ItemFee"}}}},"responses":{"201":{"description":"The resource has been successfully created.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemFeeCreationResponse"}}}},"400":{"$ref":"#/components/responses/trait_feeId_not_found_400"},"401":{"$ref":"#/components/responses/trait_unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"},"409":{"$ref":"#/components/responses/trait_yaasAware_409"},"500":{"$ref":"#/components/responses/trait_yaasAware_500"}},"parameters":[{"$ref":"#/components/parameters/trait_localizedModification_Content-Language"}]}}}}
```

## Retrieving all item fees

> Retrieves all item fees for specified itemYRN.<br>

```json
{"openapi":"3.0.0","info":{"title":"Fee Service","version":"v1"},"tags":[{"name":"Item fee management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"fee.fee_create":"Needed to create a fee.","fee.fee_update":"Needed to update a fee.","fee.fee_delete":"Needed to delete a fee.","fee.item_create":"Needed to create an item fee.","fee.item_update":"Needed to update an item fee.","fee.item_delete":"Needed to delete an item fee."}}}}},"schemas":{"Fees":{"type":"array","items":{"$ref":"#/components/schemas/Fee"}},"Fee":{"type":"object","properties":{"id":{"description":"Unique identifier of the fee.","type":"string"},"name":{"description":"The localized fee name.","$ref":"#/components/schemas/Localized"},"description":{"description":"The localized fee description.","$ref":"#/components/schemas/Localized"},"code":{"maxLength":100,"description":"The code-name, unique for the tenant.","type":"string"},"feeType":{"description":"'PERCENT' for relative values, 'ABSOLUTE' for float values or 'ABSOLUTE_MULTIPLY_ITEMQUANTITY' for float values to be multiplied by the quantity of the item.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"type":"string"},"feePercentage":{"minimum":0,"description":"The fee rate in percentage. Required if feeType is 'PERCENT'.","type":"number"},"feeAbsolute":{"description":"The fee as an absolute amount. Required if type is 'ABSOLUTE'.","$ref":"#/components/schemas/monetaryAmount"},"itemType":{"description":"The itemtype the fee can belong to. It could be a product or\npaymenttype. ","enum":["PRODUCT","PAYMENTTYPE"],"type":"string"},"siteCode":{"description":"The SiteCode the fee belongs to.","type":"string"},"active":{"description":"Flag indicating whether the fee is currently active or not.","type":"boolean"},"taxable":{"description":"Flag indicating whether the fee is taxable or not.","type":"boolean"},"taxCode":{"description":"The tax code. When 'taxable' is set to true, the taxCode is mandatory","type":"string"},"activeTimespan":{"$ref":"#/components/schemas/timespan"},"yrn":{"$ref":"#/components/schemas/YRN"}},"required":["name","code","feeType","active","siteCode"]},"Localized":{"description":"The localized value in the form of map (language, value) or string.","oneOf":[{"type":"string","description":"string in the specified language."},{"type":"object","description":"Map of translations in form of language:translation pairs.\nThe keys (languages) should be ISO language codes.\nThe values (in specific languages) should be strings in specified language.","additionalProperties":{"type":"string"}}]},"monetaryAmount":{"title":"Monetary Amount","description":"Schema defining monetary amount in given currency.","type":"object","properties":{"amount":{"description":"The amount in the specified currency","type":"number"},"currency":{"pattern":"^[a-zA-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF","type":"string"}},"required":["amount","currency"]},"timespan":{"description":"Restricts the active fees to be only applied in the specified\ntimespan.","title":"Timespan","type":"object","properties":{"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"}},"required":["startDate","endDate"]},"YRN":{"type":"string","title":"YRN","description":"A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.","minLength":1},"FeeIds":{"type":"array","items":{"type":"string"}}},"responses":{"trait_localizedRetrieval_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}},"trait_unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired.\n\nDetails will be provided in the response payload.","content":{"application/json":{"schema":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Access token does not contain necessary scopes or tenant in path does not match tenant from token.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}}},"parameters":{"trait_localizedRetrieval_Accept-Language":{"description":"The value of the locale identifier of the language in which the attribute should be returned.\nProvide several values separated by comma, in order to specify fallback languages.\n","in":"header","name":"Accept-Language","schema":{"type":"string","default":"*","minimum":1}},"SiteCode":{"description":"A list of site codes.","in":"query","name":"siteCode","schema":{"default":"main","type":"string"}},"Expand":{"description":"Whether only the fee-id is in the response or the full fees.","in":"query","name":"expand","schema":{"type":"boolean","default":false}}}},"paths":{"/fee/{tenant}/itemFees/{itemYRN}/fees":{"get":{"description":"Retrieves all item fees for specified itemYRN.\n","tags":["Item fee management"],"summary":"Retrieving all item fees","operationId":"GET-fee-list-item-fees-itemYRN","responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Fees"},{"$ref":"#/components/schemas/FeeIds"}]}}}},"400":{"$ref":"#/components/responses/trait_localizedRetrieval_400"},"401":{"$ref":"#/components/responses/trait_unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"}},"parameters":[{"$ref":"#/components/parameters/trait_localizedRetrieval_Accept-Language"},{"$ref":"#/components/parameters/SiteCode"},{"$ref":"#/components/parameters/Expand"}]}}}}
```

## Adding a list of fees to an item

> Adds a list of feeIds to the itemYRN.<br>

```json
{"openapi":"3.0.0","info":{"title":"Fee Service","version":"v1"},"tags":[{"name":"Item fee management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["fee.item_update"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"fee.fee_create":"Needed to create a fee.","fee.fee_update":"Needed to update a fee.","fee.fee_delete":"Needed to delete a fee.","fee.item_create":"Needed to create an item fee.","fee.item_update":"Needed to update an item fee.","fee.item_delete":"Needed to delete an item fee."}}}}},"schemas":{"FeeIdsUpdate":{"type":"object","properties":{"feeIds":{"type":"array","items":{"type":"string"}}},"required":["feeIds"]}},"responses":{"trait_feeId_not_found_400":{"description":"Request was syntactically incorrect. Details of the error are included in the response payload.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}},"trait_unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired.\n\nDetails will be provided in the response payload.","content":{"application/json":{"schema":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Access token does not contain necessary scopes or tenant in path does not match tenant from token.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}}},"parameters":{"Partial":{"description":"Boolean parameter that defines the update type. By default, its value is false. For partial updates, the value is true.","in":"query","name":"partial","schema":{"type":"boolean","default":false}}}},"paths":{"/fee/{tenant}/itemFees/{itemYRN}/fees":{"put":{"description":"Adds a list of feeIds to the itemYRN.\n","tags":["Item fee management"],"summary":"Adding a list of fees to an item","operationId":"PUT-fee-add-item-fees-itemYRN","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeIdsUpdate"}}}},"responses":{"200":{"description":"FeeIds successfully added."},"400":{"$ref":"#/components/responses/trait_feeId_not_found_400"},"401":{"$ref":"#/components/responses/trait_unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"}},"parameters":[{"$ref":"#/components/parameters/Partial"}]}}}}
```

## Deleting an item fee with itemYRN

> Deletes item fee with the specified itemYRN.<br>

```json
{"openapi":"3.0.0","info":{"title":"Fee Service","version":"v1"},"tags":[{"name":"Item fee management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["fee.item_delete"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"fee.fee_create":"Needed to create a fee.","fee.fee_update":"Needed to update a fee.","fee.fee_delete":"Needed to delete a fee.","fee.item_create":"Needed to create an item fee.","fee.item_update":"Needed to update an item fee.","fee.item_delete":"Needed to delete an item fee."}}}}},"responses":{"trait_unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired.\n\nDetails will be provided in the response payload.","content":{"application/json":{"schema":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Access token does not contain necessary scopes or tenant in path does not match tenant from token.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}}}},"paths":{"/fee/{tenant}/itemFees/{itemYRN}/fees":{"delete":{"description":"Deletes item fee with the specified itemYRN.\n","tags":["Item fee management"],"summary":"Deleting an item fee with itemYRN","operationId":"DELETE-fee-remove-item-fee-with-itemYRN","responses":{"204":{"description":"Item fee successfully deleted"},"401":{"$ref":"#/components/responses/trait_unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"}}}}}}
```

## Deleting a fee from the itemYRN

> Deletes a fee for the specified itemYRN and optionally deletes item fee if does not contain any more fee ids.<br>

```json
{"openapi":"3.0.0","info":{"title":"Fee Service","version":"v1"},"tags":[{"name":"Item fee management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["fee.item_delete"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"fee.fee_create":"Needed to create a fee.","fee.fee_update":"Needed to update a fee.","fee.fee_delete":"Needed to delete a fee.","fee.item_create":"Needed to create an item fee.","fee.item_update":"Needed to update an item fee.","fee.item_delete":"Needed to delete an item fee."}}}}},"responses":{"trait_unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired.\n\nDetails will be provided in the response payload.","content":{"application/json":{"schema":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Access token does not contain necessary scopes or tenant in path does not match tenant from token.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}},"trait_yaasAware_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}},"required":["type"]}}},"required":["status","type"]}}}}},"parameters":{"ItemYRN":{"in":"path","name":"itemYRN","required":true,"schema":{"type":"string"}},"tenant":{"description":"the tenant to work on.","in":"path","name":"tenant","required":true,"schema":{"type":"string"}},"FeeId":{"in":"path","name":"feeId","required":true,"schema":{"type":"string"}}}},"paths":{"/fee/{tenant}/itemFees/{itemYRN}/fees/{feeId}":{"delete":{"description":"Deletes a fee for the specified itemYRN and optionally deletes item fee if does not contain any more fee ids.\n","tags":["Item fee management"],"summary":"Deleting a fee from the itemYRN","operationId":"DELETE-fee-remove-item-fee-from-itemYRN","responses":{"204":{"description":"Fee successfully deleted from itemYRN."},"401":{"$ref":"#/components/responses/trait_unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"},"404":{"$ref":"#/components/responses/trait_yaasAware_404"}},"parameters":[{"$ref":"#/components/parameters/ItemYRN"},{"$ref":"#/components/parameters/tenant"},{"$ref":"#/components/parameters/FeeId"}]}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references/api-guides/checkout/fee/api-reference/item-fee-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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