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

# CustomerServiceImpl

> Calling public service methods through the REST API: customerServiceImpl

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

  customerServiceImpl
</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:** GUEST. **Bearer Token:** not required.

* 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="SellerRepository">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getRepository

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

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

  ### getPaginationCustomers

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

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

  ### validateVerificationToken

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

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

  ### validatePasswordResetToken

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

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

  ### sendVerificationEmail

  Example JSON request object:

  ```json theme={null}
  {
      "id":  null,
      "username":  null,
      "password":  null,
      "savedPassword":  null,
      "fallIntoObjects":  null,
      "active":  false,
      "roles":  null,
      "permissions":  null
  }
  ```

  Request:

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

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

  ### searchCustomers

  Example JSON request object:

  ```json theme={null}
  {
      "type":  "SellerSKU",
      "searchTerm":  "",
      "query":  {
                    "isPublishedForSale":  true
                },
      "ignoreRegexWrap":  [
                              "id",
                              "name",
                              "embeddedSku",
                              "productsRef",
                              "isPublishedForSale"
                          ],
      "offset":  0,
      "limit":  10,
      "visiblePages":  10,
      "page":  1,
      "sortName":  "createdDate",
      "sortDirection":  "DESC"
  }
  ```

  Request:

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

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

  ### searchCustomersLightweight

  Example JSON request object:

  ```json theme={null}
  {
      "type":  "SellerSKU",
      "searchTerm":  "",
      "query":  {
                    "isPublishedForSale":  true
                },
      "ignoreRegexWrap":  [
                              "id",
                              "name",
                              "embeddedSku",
                              "productsRef",
                              "isPublishedForSale"
                          ],
      "offset":  0,
      "limit":  10,
      "visiblePages":  10,
      "page":  1,
      "sortName":  "createdDate",
      "sortDirection":  "DESC"
  }
  ```

  Request:

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

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

  ### getCustomersPaged

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

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

  ### registerCustomerFull

  Example JSON request object:

  ```json theme={null}
  {
      "id":  null,
      "stripeCustomerId":  null,
      "stripeConnectId":  null,
      "address":  null,
      "shippingAddresses":  null,
      "companyName":  null,
      "vatNumber":  null,
      "numberOfEmployees":  null,
      "sellerType":  null,
      "sellerTariff":  null,
      "subscription":  null,
      "companyEmailAddress":  null,
      "companyPhone":  null,
      "companyWebSite":  null,
      "imageURLs":  null,
      "documentURLs":  null,
      "description":  null,
      "profiles":  null,
      "certificates":  null,
      "sellerSKUs":  null,
      "ordersBuyer":  null,
      "ordersVendor":  null,
      "favoriteSellersIds":  null,
      "favoriteSellerSkuIds":  null,
      "sellerCategoriesIds":  null,
      "sellerProductsIds":  null,
      "emailNotifications":  false,
      "onlineActive":  false
  }
  ```

  Request:

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

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

  ### searchEmployees

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

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

  ### searchEmployeesPaged

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

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

  ### registerCustomerSimplified

  Example JSON request object:

  ```json theme={null}
  {
      "id":  null,
      "user":  null,
      "firstName":  null,
      "lastName":  null,
      "website":  null,
      "phone":  null,
      "mobilePhone":  null,
      "birthday":  null,
      "emailAddress":  null,
      "gender":  null,
      "salutation":  null,
      "embeddedParent":  null,
      "emailNotifications":  false,
      "imageURLs":  null
  }
  ```

  Request:

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

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

  ### updateCustomer

  Example JSON request object:

  ```json theme={null}
  {
      "id":  null,
      "stripeCustomerId":  null,
      "stripeConnectId":  null,
      "address":  null,
      "companyName":  null,
      "vatNumber":  null,
      "numberOfEmployees":  null,
      "sellerType":  null,
      "sellerTariff":  null,
      "subscription":  null,
      "companyEmailAddress":  null,
      "companyPhone":  null,
      "companyWebSite":  null,
      "description":  null,
      "imageURLs":  null,
      "shippingAddresses":  null,
      "documentURLs":  null,
      "profileIds":  null,
      "certificateIds":  null,
      "sellerSkuIds":  null,
      "ordersAsBuyerIds":  null,
      "ordersAsVendorIds":  null,
      "favoriteSellersIds":  null,
      "favoriteSellerSkuIds":  null,
      "sellerCategoriesIds":  null,
      "sellerProductsIds":  null,
      "emailNotifications":  false,
      "onlineActive":  false,
      "imageUrlRemove":  false,
      "metaInfo":  null,
      "createdBy":  null,
      "createdDate":  null,
      "lastModifiedBy":  null,
      "lastModifiedDate":  null,
      "alias":  null
  }
  ```

  Request:

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

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

  ### updateCustomerProfile

  Example JSON request object:

  ```json theme={null}
  {
      "id":  null,
      "user":  null,
      "firstName":  null,
      "lastName":  null,
      "website":  null,
      "phone":  null,
      "mobilePhone":  null,
      "birthday":  null,
      "emailAddress":  null,
      "gender":  null,
      "salutation":  null,
      "embeddedParent":  null,
      "emailNotifications":  false,
      "imageURLs":  null
  }
  ```

  Request:

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

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

  ### mapSellerToDto

  Example JSON request object:

  ```json theme={null}
  {
      "id":  null,
      "stripeCustomerId":  null,
      "stripeConnectId":  null,
      "address":  null,
      "shippingAddresses":  null,
      "companyName":  null,
      "vatNumber":  null,
      "numberOfEmployees":  null,
      "sellerType":  null,
      "sellerTariff":  null,
      "subscription":  null,
      "companyEmailAddress":  null,
      "companyPhone":  null,
      "companyWebSite":  null,
      "imageURLs":  null,
      "documentURLs":  null,
      "description":  null,
      "profiles":  null,
      "certificates":  null,
      "sellerSKUs":  null,
      "ordersBuyer":  null,
      "ordersVendor":  null,
      "favoriteSellersIds":  null,
      "favoriteSellerSkuIds":  null,
      "sellerCategoriesIds":  null,
      "sellerProductsIds":  null,
      "emailNotifications":  false,
      "onlineActive":  false
  }
  ```

  Request:

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