# Item fee search

## Searching itemFees by product ID

> Search itemFees by product ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"Fee Service","version":"v1"},"tags":[{"name":"Item fee search"}],"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":{"SearchItemFee":{"type":"object","description":"Search ItemFee request body.","properties":{"productId":{"type":"string"},"siteCodes":{"type":"array","items":{"type":"string"}},"pageNumber":{"type":"integer","default":1},"pageSize":{"type":"integer","default":16}},"required":["productId","siteCodes"]},"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"]}},"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":{"tenant":{"description":"the tenant to work on.","in":"path","name":"tenant","required":true,"schema":{"type":"string"}}}},"paths":{"/fee/{tenant}/itemFees/searchByProductId":{"post":{"description":"Search itemFees by product ID.\n","tags":["Item fee search"],"summary":"Searching itemFees by product ID","operationId":"POST-fee-search-item-fee-by-ProductId","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchItemFee"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemFees"}}}},"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/tenant"}]}}}}
```

## Searching itemFees by product IDs

> Search itemFees by multiple product IDs.<br>

```json
{"openapi":"3.0.0","info":{"title":"Fee Service","version":"v1"},"tags":[{"name":"Item fee search"}],"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":{"SearchItemsFee":{"type":"object","description":"Search ItemsFee request body.","properties":{"productIds":{"type":"string"},"siteCode":{"type":"string"},"pageNumber":{"type":"integer","default":1},"pageSize":{"type":"integer","default":16}},"required":["productIds","siteCode"]},"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"]}},"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":{"siteFallback":{"in":"query","name":"siteFallback","schema":{"default":false,"type":"boolean"}},"tenant":{"description":"the tenant to work on.","in":"path","name":"tenant","required":true,"schema":{"type":"string"}}}},"paths":{"/fee/{tenant}/itemFees/searchByProductIds":{"post":{"description":"Search itemFees by multiple product IDs.\n","tags":["Item fee search"],"summary":"Searching itemFees by product IDs","operationId":"POST-fee-search-multiple-item-fees-by-productIds","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchItemsFee"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemFees"}}}},"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/siteFallback"},{"$ref":"#/components/parameters/tenant"}]}}}}
```

## Checking if a fee has been applied

> Checks if the itemYrns in the request have a fee applied to. Responds with the itemYRN and the corresponding fees.<br>

```json
{"openapi":"3.0.0","info":{"title":"Fee Service","version":"v1"},"tags":[{"name":"Item fee search"}],"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":{"ItemYRNs":{"description":"the itemYrns this fee is applied to","type":"object","properties":{"itemYrns":{"type":"array","items":{"type":"string"}},"siteCode":{"type":"string"}},"required":["itemYrns","siteCode"]},"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"]}},"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":{"SiteCode":{"description":"A list of site codes.","in":"query","name":"siteCode","schema":{"default":"main","type":"string"}},"tenant":{"description":"the tenant to work on.","in":"path","name":"tenant","required":true,"schema":{"type":"string"}}}},"paths":{"/fee/{tenant}/itemFees/search":{"post":{"description":"Checks if the itemYrns in the request have a fee applied to. Responds with the itemYRN and the corresponding fees.\n","tags":["Item fee search"],"summary":"Checking if a fee has been applied","operationId":"POST-fee-check-item-fee","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemYRNs"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemFees"}}}},"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/SiteCode"},{"$ref":"#/components/parameters/tenant"}]}}}}
```


---

# 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-search.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.
