> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SKUServiceImpl

> Calling public service methods through the REST API: sKUServiceImpl

<ResponseField name="beanId" type="string">
  The Spring bean identifier containing the service being called.

  SKUServiceImpl
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Bean scope. Use PROTOTYPE for service calls.
</ResponseField>

<ResponseField name="functionName" type="string">
  The public service method name shown in the signature below.
</ResponseField>

<ResponseField name="args" type="object[]">
  The method argument array. Each argument is passed as an object with index 0, 1, and so on; the value must match the Java parameter type.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: en
Site-Context: my-site
Authorization: Bearer <token>
```

Send `Lang-Context` and `Site-Context` with every request. For protected methods, send the JWT in the `Authorization` header as `Bearer <token>`.

**Access:** ADMIN. **Bearer Token:** conditional for USER/ADMIN.

* GUEST — unauthenticated users; only whitelist services are available.
* USER — authentication is required; methods with USER checks are available.
* ADMIN — full access to public methods of all services.
* If a method checks a role internally, GUEST may receive null.

## Methods

<ResponseField name="getRepository" type="SKURepository">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getRepository

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getRepository",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="getPaginationFilter" type="Deque<Map<String, Object>>">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `requestJson` | `String` | Passed through `args[0].0`. |

  ### getPaginationFilter

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getPaginationFilter",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="searchSKUs" type="SearchResponse">
  | Argument      | Type                            | Description                 |
  | ------------- | ------------------------------- | --------------------------- |
  | `requestJson` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### searchSKUs

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "searchSKUs",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="searchSkusLightweight" type="SearchResponse">
  | Argument      | Type                            | Description                 |
  | ------------- | ------------------------------- | --------------------------- |
  | `requestJson` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### searchSkusLightweight

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "searchSkusLightweight",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="searchSKUs" type="LinkedHashSet<SkuDTO>">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `requestJson` | `String` | Passed through `args[0].0`. |

  ### searchSKUs

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "searchSKUs",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="searchSkusPaged" type="Page<SKU>">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `requestJson` | `String` | Passed through `args[0].0`. |

  ### searchSkusPaged

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "searchSkusPaged",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="findById" type="SKU">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `skuId`  | `String` | Passed through `args[0].0`. |

  ### findById

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "findById",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="searchSKUs" type="List<SkuDTO>">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `query`  | `String` | Passed through `args[0].0`. |
  | `offset` | `String` | Passed through `args[1].1`. |
  | `limit`  | `String` | Passed through `args[2].2`. |

  ### searchSKUs

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "searchSKUs",
    "args": [
      {
        "0": null,
        "1": null,
        "2": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="searchWithProductFilter" type="List<SkuDTO>">
  | Argument    | Type     | Description                 |
  | ----------- | -------- | --------------------------- |
  | `query`     | `String` | Passed through `args[0].0`. |
  | `productId` | `String` | Passed through `args[1].1`. |
  | `offset`    | `String` | Passed through `args[2].2`. |
  | `limit`     | `String` | Passed through `args[3].3`. |

  ### searchWithProductFilter

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "searchWithProductFilter",
    "args": [
      {
        "0": null,
        "1": null,
        "2": null,
        "3": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="findSKUs" type="List<SKU>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### findSKUs

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "findSKUs",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="getCategoriesBySkuId" type="List<Category>">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `skuId`  | `String` | Passed through `args[0].0`. |

  ### getCategoriesBySkuId

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getCategoriesBySkuId",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="createSKU" type="Optional<SKU>">
  | Argument   | Type                            | Description                 |
  | ---------- | ------------------------------- | --------------------------- |
  | `skuAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### createSKU

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "createSKU",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="addSKUToProduct" type="SKU">
  | Argument    | Type                            | Description                 |
  | ----------- | ------------------------------- | --------------------------- |
  | `productId` | `String`                        | Passed through `args[0].0`. |
  | `skuAsMap`  | `LinkedHashMap<String, Object>` | Passed through `args[1].1`. |

  ### addSKUToProduct

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "addSKUToProduct",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="saveSKU" type="SKU">
  | Argument   | Type                            | Description                 |
  | ---------- | ------------------------------- | --------------------------- |
  | `skuAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### saveSKU

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "saveSKU",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSKUFromAttribute" type="void">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `skuId`       | `String` | Passed through `args[0].0`. |
  | `attributeId` | `String` | Passed through `args[1].1`. |

  ### removeSKUFromAttribute

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSKUFromAttribute",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSKUFromAttributes" type="void">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `skuId`  | `String` | Passed through `args[0].0`. |

  ### removeSKUFromAttributes

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSKUFromAttributes",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSKUFromSellerSKU" type="void">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `skuId`       | `String` | Passed through `args[0].0`. |
  | `sellerSkuId` | `String` | Passed through `args[1].1`. |

  ### removeSKUFromSellerSKU

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSKUFromSellerSKU",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSKUFromSellerSKUs" type="void">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `skuId`  | `String` | Passed through `args[0].0`. |

  ### removeSKUFromSellerSKUs

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSKUFromSellerSKUs",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSKUFromProduct" type="void">
  | Argument    | Type     | Description                 |
  | ----------- | -------- | --------------------------- |
  | `skuId`     | `String` | Passed through `args[0].0`. |
  | `productId` | `String` | Passed through `args[1].1`. |

  ### removeSKUFromProduct

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSKUFromProduct",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSKUFromProducts" type="void">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `skuId`  | `String` | Passed through `args[0].0`. |

  ### removeSKUFromProducts

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSKUFromProducts",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSKUFromTranslation" type="void">
  | Argument        | Type     | Description                 |
  | --------------- | -------- | --------------------------- |
  | `skuId`         | `String` | Passed through `args[0].0`. |
  | `translationId` | `String` | Passed through `args[1].1`. |

  ### removeSKUFromTranslation

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSKUFromTranslation",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSKUFromTranslations" type="void">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `skuId`  | `String` | Passed through `args[0].0`. |

  ### removeSKUFromTranslations

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSKUFromTranslations",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSKUAndClean" type="void">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `skuId`  | `String` | Passed through `args[0].0`. |

  ### removeSKUAndClean

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSKUAndClean",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeSkusByIds" type="void">
  | Argument  | Type                | Description                 |
  | --------- | ------------------- | --------------------------- |
  | `skusIds` | `ArrayList<String>` | Passed through `args[0].0`. |

  ### removeSkusByIds

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeSkusByIds",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="isSKUExists" type="boolean">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `name`   | `String` | Passed through `args[0].0`. |

  ### isSKUExists

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "isSKUExists",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getSortedProductSkus" type="List<Map<String, String>>">
  | Argument    | Type     | Description                 |
  | ----------- | -------- | --------------------------- |
  | `productId` | `String` | Passed through `args[0].0`. |

  ### getSortedProductSkus

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getSortedProductSkus",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getSkusByProductAndFirstLetter" type="List<Map<String, Object>>">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `productId`   | `String` | Passed through `args[0].0`. |
  | `firstLetter` | `String` | Passed through `args[1].1`. |

  ### getSkusByProductAndFirstLetter

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getSkusByProductAndFirstLetter",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="updateMetaInfo" type="SKU">
  | Argument   | Type                            | Description                 |
  | ---------- | ------------------------------- | --------------------------- |
  | `skuId`    | `String`                        | Passed through `args[0].0`. |
  | `metaInfo` | `LinkedHashMap<String, Object>` | Passed through `args[1].1`. |

  ### updateMetaInfo

  ```json theme={null}
  {
    "beanId": "SKUServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "updateMetaInfo",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>
