> 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

# QueryResolvedSteps

# Package: onlinePrograms

# Namespace: ResolvedStepsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/online-programs/resolved-steps/query-resolved-steps.md

## Permission Scopes:
Manage Online Programs: SCOPE.CHALLENGES.MANAGE

## Introduction

Retrieves a list of up to 100 resolved steps, given the provided paging, filtering, and sorting.

Query Resolved Steps runs with a default `cursorPaging.limit` of `50`, which you can override.

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) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md).

---

## REST API

### Schema

```
 Method: queryResolvedSteps
 Description: Retrieves a list of up to 100 resolved steps, given the provided paging, filtering, and sorting.  Query Resolved Steps runs with a default `cursorPaging.limit` of `50`, which you can override.  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) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md).
 URL: https://www.wixapis.com/online-programs/participants/v3/resolved-steps/query
 Method: POST
 Method parameters:
   param name: query | type: CursorQuery    
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass 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.  Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#filters).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#sorting).  | validation: maxItems 5
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: participantId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: programStepId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: none | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: earnedScore | operators: none | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryResolvedStepsResponse
  - name: resolvedSteps | type: array<ResolvedStep> | description: Resolved steps that match the query.  
     - name: id | type: string | description: Resolved step GUID.  | read-only: true | validation: format GUID
     - name: participantId | type: string | description: Participant GUID.  | validation: format GUID, immutable
     - name: programStepId | type: string | description: Program step GUID.  | validation: format GUID, immutable
     - name: quizSubmissionId | type: string | description: Quiz submission GUID.  Required for quiz steps. Omit for non-quiz steps.  | validation: format GUID
     - name: earnedScore | type: integer | description: Score earned by the participant. Returned only for quiz steps.  | read-only: true | validation: minimum 0, maximum 100, format int32
     - name: passingGrade | type: integer | description: Minimum score required to pass the quiz. Returned only for quiz steps.  | read-only: true | validation: minimum 0, maximum 100, format int32
     - name: status | type: Status | description: Completion status. For quiz steps, the status depends on whether `earnedScore` meets `passingGrade`. For non-quiz steps, the status is `COMPLETED`.  | read-only: true 
         - enum:
         -     COMPLETED: The participant completed the step. For quiz steps, `earnedScore` meets or exceeds `passingGrade`.
         -     FAILED: The participant failed the quiz step because `earnedScore` is below `passingGrade`.
     - name: createdDate | type: string | description: Date and time the resolved step was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the resolved step was updated.  | read-only: true | validation: format date-time
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the resolved step. [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
  - name: pagingMetadata | type: CursorPagingMetadata | description: Cursor paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### Query a participant's resolved steps
Retrieves the first 2 resolved steps for a participant, ordered by creation date

```curl
curl -X POST \
'https://www.wixapis.com/online-programs/participants/v3/resolved-steps/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "query": {
    "filter": {
      "participantId": "242bb87d-b619-4bf1-92dd-2970a574c97c"
    },
    "sort": [
      {
        "fieldName": "createdDate",
        "order": "ASC"
      }
    ],
    "cursorPaging": {
      "limit": 2
    }
  }
}'
```

### Query a failed quiz step
Retrieves a participant's failed resolved step, including the earned score and passing grade

```curl
curl -X POST \
'https://www.wixapis.com/online-programs/participants/v3/resolved-steps/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "query": {
    "filter": {
      "participantId": "9d0927dd-d946-4223-b395-ccbc10f5dbde",
      "programStepId": "3c79741a-54bb-4c1b-a79f-a5e5e91a9cf5"
    },
    "cursorPaging": {
      "limit": 1
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.resolvedSteps.queryResolvedSteps(query)
 Description: Retrieves a list of up to 100 resolved steps, given the provided paging, filtering, and sorting.  Query Resolved Steps runs with a default `cursorPaging.limit` of `50`, which you can override.  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) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.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: ResolvedStepQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass 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.  Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#filters).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#sorting).  | validation: maxItems 5
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: _id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: none | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: earnedScore | operators: none | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryResolvedStepsResponse>
  - name: resolvedSteps | type: array<ResolvedStep> | description: Resolved steps that match the query.  
     - name: _id | type: string | description: Resolved step GUID.  | read-only: true | validation: format GUID
     - name: participantId | type: string | description: Participant GUID.  | validation: format GUID, immutable
     - name: programStepId | type: string | description: Program step GUID.  | validation: format GUID, immutable
     - name: quizSubmissionId | type: string | description: Quiz submission GUID.  Required for quiz steps. Omit for non-quiz steps.  | validation: format GUID
     - name: earnedScore | type: integer | description: Score earned by the participant. Returned only for quiz steps.  | read-only: true | validation: minimum 0, maximum 100, format int32
     - name: passingGrade | type: integer | description: Minimum score required to pass the quiz. Returned only for quiz steps.  | read-only: true | validation: minimum 0, maximum 100, format int32
     - name: status | type: Status | description: Completion status. For quiz steps, the status depends on whether `earnedScore` meets `passingGrade`. For non-quiz steps, the status is `COMPLETED`.  | read-only: true 
         - enum:
         -     COMPLETED: The participant completed the step. For quiz steps, `earnedScore` meets or exceeds `passingGrade`.
         -     FAILED: The participant failed the quiz step because `earnedScore` is below `passingGrade`.
     - name: _createdDate | type: Date | description: Date and time the resolved step was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the resolved step was updated.  | read-only: true 
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the resolved step. [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
  - name: pagingMetadata | type: CursorPagingMetadata | description: Cursor paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### Query a failed quiz step
```javascript
import { resolvedSteps } from "@wix/online-programs";

async function queryQuizResolvedStep() {
  const response = await resolvedSteps
    .queryResolvedSteps()
    .eq("participantId", "9d0927dd-d946-4223-b395-ccbc10f5dbde")
    .eq("programStepId", "3c79741a-54bb-4c1b-a79f-a5e5e91a9cf5")
    .limit(1)
    .find();
}

/* Promise resolves to:
 * {
 *   "items": [
 *     {
 *       "_id": "2853ffcb-da06-4d0d-a65d-7e6aaf7ec290",
 *       "participantId": "9d0927dd-d946-4223-b395-ccbc10f5dbde",
 *       "programStepId": "3c79741a-54bb-4c1b-a79f-a5e5e91a9cf5",
 *       "quizSubmissionId": "196effdc-3cd8-40e4-ac23-87ed930bcd2e",
 *       "earnedScore": 28,
 *       "passingGrade": 60,
 *       "status": "FAILED",
 *       "_createdDate": "2026-09-15T15:23:05.485Z",
 *       "_updatedDate": "2026-09-15T15:23:05.938Z"
 *     }
 *   ],
 *   "length": 1,
 *   "pageSize": 1
 * }
 */

```

### Query a participant's resolved steps
```javascript
import { resolvedSteps } from "@wix/online-programs";

async function queryResolvedSteps() {
  const response = await resolvedSteps
    .queryResolvedSteps()
    .eq("participantId", "242bb87d-b619-4bf1-92dd-2970a574c97c")
    .ascending("_createdDate")
    .limit(2)
    .find();
}

/* Promise resolves to:
 * {
 *   "items": [
 *     {
 *       "_id": "23be8938-b4fb-45b5-89bd-8855251596c1",
 *       "participantId": "242bb87d-b619-4bf1-92dd-2970a574c97c",
 *       "programStepId": "309db0ff-e0b4-4dba-9f84-fe96c36df529",
 *       "status": "COMPLETED",
 *       "_createdDate": "2026-09-09T13:22:46.969Z",
 *       "_updatedDate": "2026-09-09T13:22:46.969Z"
 *     },
 *     {
 *       "_id": "eb8ba1a7-05fc-47e3-8aeb-6bca9535f4f3",
 *       "participantId": "242bb87d-b619-4bf1-92dd-2970a574c97c",
 *       "programStepId": "37ad1d57-bfb8-4fd1-8f7e-0cf92fe4ecb8",
 *       "status": "COMPLETED",
 *       "_createdDate": "2026-09-09T13:22:48.223Z",
 *       "_updatedDate": "2026-09-09T13:22:48.223Z"
 *     }
 *   ],
 *   "length": 2,
 *   "pageSize": 2
 * }
 */

```

### queryResolvedSteps (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 { resolvedSteps } from '@wix/online-programs';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function queryResolvedSteps(query) {
  const response = await myWixClient.resolvedSteps.queryResolvedSteps(query);
};
```

---