> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# QueryAccountCertifications

# Package: certifications

# Namespace: AccountCertifications

# Method link: https://dev.wix.com/docs/api-reference/account-level/studio-workspace/certifications/account-certification-v1/query-account-certifications.md

## Permission Scopes:
SCOPE.ACADEMY.ACCOUNT_CERTIFICATION_READ: SCOPE.ACADEMY.ACCOUNT_CERTIFICATION_READ

## Introduction

Retrieves a list of up to 1,000 account certifications, given the provided paging, filtering, and sorting.

Query Account Certifications returns the full account certification records, including the underlying `userCertificationIds`, for the caller's own account only. To retrieve any account's certifications as a public, visitor-safe projection, call [List Account Certifications](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/certifications/account-certification-v1/list-account-certifications.md) instead.

Query Account Certifications runs with these defaults, which you can override:

- `createdDate` is sorted in `DESC` order
- `cursorPaging.limit` is `50`

You can filter and sort by `id` and `certificationType`.

To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).

---

## REST API

### Schema

```
 Method: queryAccountCertifications
 Description: Retrieves a list of up to 1,000 account certifications, given the provided paging, filtering, and sorting.  Query Account Certifications returns the full account certification records, including the underlying `userCertificationIds`, for the caller's own account only. To retrieve any account's certifications as a public, visitor-safe projection, call [List Account Certifications](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/certifications/account-certification-v1/list-account-certifications.md) instead.  Query Account Certifications runs with these defaults, which you can override:  - `createdDate` is sorted in `DESC` order - `cursorPaging.limit` is `50`  You can filter and sort by `id` and `certificationType`.  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 URL: https://www.wixapis.com/academy/certifications/v1/account-certifications/query
 Method: POST
 Method parameters:
   param name: query | type: CursorQuery    
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  | validation: maxItems 4
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 50
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: id | operators: $eq, $ne, $exists, $in, $hasSome, $startsWith, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: certificationType | operators: $eq, $ne, $exists, $in, $hasSome | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryAccountCertificationsResponse
  - name: accountCertifications | type: array<AccountCertification> | description: List of account certifications.  
     - name: id | type: string | description: Account certification GUID.  | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the account certification is updated. To prevent conflicting changes, the current revision must be passed when updating the account certification.  Ignored when creating an account certification.  | validation: format int64
     - name: createdDate | type: string | description: Date and time the account certification was created.  | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the account certification was last updated.  | validation: format date-time
     - name: userCertificationIds | type: array<string> | description: IDs of the user certification records, held by the account's team members, that qualify the account for its `certificationType`. Up to 100. The list contains no duplicates, and its order isn't guaranteed.  | validation: maxItems 100, format GUID
     - name: certificationType | type: CertificationType | description: Type of certification the account holds. Set when the certification is created and can't be changed afterward.  | validation: immutable
         - enum:
         -     VELO: Velo certification: proficiency in building with Velo, Wix's full-stack development platform.
         -     WEB_DESIGNER: Web Designer certification: proficiency in designing and building Wix websites.
         -     ACCESSIBILITY: Accessibility certification: proficiency in building accessible Wix websites.
         -     STUDIO_DEVELOPER: Wix Studio Developer certification: proficiency in developing with Wix Studio.
         -     STUDIO_DESIGN_LEAGUE: Wix Studio Design League certification, awarded through the Wix Studio Design League program.
         -     STUDIO_DEV_WEBSITES_LEAGUE: Wix Studio Developer Websites League certification, awarded through the Wix Studio Developer Websites League program.
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Offset that was requested.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  


```

### Examples

### Query Account Certifications
Retrieves the certifications held by your own account, filtered by certification type

```curl
curl -X POST \
'https://www.wixapis.com/academy/certifications/v1/account-certifications/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "query": {
    "filter": {
      "certificationType": "VELO"
    },
    "cursorPaging": {
      "limit": 10
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.accountCertifications.accountCertifications.queryAccountCertifications(query)
 Description: Retrieves a list of up to 1,000 account certifications, given the provided paging, filtering, and sorting.  Query Account Certifications returns the full account certification records, including the underlying `userCertificationIds`, for the caller's own account only. To retrieve any account's certifications as a public, visitor-safe projection, call [List Account Certifications](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/certifications/account-certification-v1/list-account-certifications.md) instead.  Query Account Certifications runs with these defaults, which you can override:  - `createdDate` is sorted in `DESC` order - `cursorPaging.limit` is `50`  You can filter and sort by `id` and `certificationType`.  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: AccountCertificationQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  | validation: maxItems 4
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 50
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: _id | operators: $eq, $ne, $exists, $in, $hasSome, $startsWith, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: certificationType | operators: $eq, $ne, $exists, $in, $hasSome | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryAccountCertificationsResponse>
  - name: accountCertifications | type: array<AccountCertification> | description: List of account certifications.  
     - name: _id | type: string | description: Account certification GUID.  | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the account certification is updated. To prevent conflicting changes, the current revision must be passed when updating the account certification.  Ignored when creating an account certification.  | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the account certification was created.  
     - name: _updatedDate | type: Date | description: Date and time the account certification was last updated.  
     - name: userCertificationIds | type: array<string> | description: IDs of the user certification records, held by the account's team members, that qualify the account for its `certificationType`. Up to 100. The list contains no duplicates, and its order isn't guaranteed.  | validation: maxItems 100, format GUID
     - name: certificationType | type: CertificationType | description: Type of certification the account holds. Set when the certification is created and can't be changed afterward.  | validation: immutable
         - enum:
         -     VELO: Velo certification: proficiency in building with Velo, Wix's full-stack development platform.
         -     WEB_DESIGNER: Web Designer certification: proficiency in designing and building Wix websites.
         -     ACCESSIBILITY: Accessibility certification: proficiency in building accessible Wix websites.
         -     STUDIO_DEVELOPER: Wix Studio Developer certification: proficiency in developing with Wix Studio.
         -     STUDIO_DESIGN_LEAGUE: Wix Studio Design League certification, awarded through the Wix Studio Design League program.
         -     STUDIO_DEV_WEBSITES_LEAGUE: Wix Studio Developer Websites League certification, awarded through the Wix Studio Developer Websites League program.
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Offset that was requested.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  


```

### Examples

### Query account certifications
```javascript
import { accountCertifications } from "@wix/account-certifications";

const query = {
  filter: { certificationType: "VELO" },
  cursorPaging: { limit: 10 },
};

async function queryAccountCertifications() {
  const result = await accountCertifications.queryAccountCertifications(query);

  return result;
}

/* Promise resolves to:
 * {
 *   "accountCertifications": [
 *     {
 *       "_id": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
 *       "revision": "3",
 *       "_createdDate": "2024-01-15T10:30:00.000Z",
 *       "_updatedDate": "2024-03-02T09:12:45.000Z",
 *       "userCertificationIds": [
 *         "d7a341c4-196b-46e7-813c-2b0fc1847ec6",
 *         "9f8e7d6c-5b4a-4938-8271-6c5d4e3f2a1b"
 *       ],
 *       "certificationType": "VELO"
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 1,
 *     "cursors": { "next": "eyJvZmZzZXQiOjEwfQ==" },
 *     "hasNext": false
 *   }
 * }
 */

```

### queryAccountCertifications (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { accountCertifications } from '@wix/account-certifications';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { accountCertifications },
  // Include the auth strategy and host as relevant
});


async function queryAccountCertifications(query) {
  const response = await myWixClient.accountCertifications.queryAccountCertifications(query);
};
```

---