> 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 # GetLatestAction # Package: actions # Namespace: ActionCatalogService # Method link: https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-latest-action.md ## Permission Scopes: Set Up Automations: SCOPE.CRM.SETUP-AUTOMATIONS ## Introduction Retrieves the latest version of an action, regardless of the site on which it's installed. When an app developer updates an action, the new version doesn't immediately become active on every site. This method retrieves the latest version of the action as defined in the [app dashboard](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard/about-the-app-dashboard.md). - To retrieve the version of the action that's active on the current site, call [Get Runtime Action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-runtime-action.md). --- ## REST API ### Schema ``` Method: getLatestAction Description: Retrieves the latest version of an action, regardless of the site on which it's installed. When an app developer updates an action, the new version doesn't immediately become active on every site. This method retrieves the latest version of the action as defined in the [app dashboard](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard/about-the-app-dashboard.md). - To retrieve the version of the action that's active on the current site, call [Get Runtime Action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-runtime-action.md). URL: https://www.wixapis.com/v1/actions/latest/apps/{appId}/keys/{actionKey=**} Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: appId, actionKey Method parameters: query param name: actionKey | type: actionKey | description: Action key. Learn about [adding an action to your app](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md). | required: true | validation: minLength 5, maxLength 50 param name: appId | type: none | required: true query param name: translate | type: translate | description: Whether to apply translations to the action. Default: `false`. Return type: GetLatestActionResponse - name: action | type: Action | description: The requested action. - name: id | type: string | description: Action GUID. | validation: format GUID - name: appId | type: string | description: GUID of the [app that created the action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md). | validation: format GUID - name: actionKey | type: string | description: Action key. Learn about [adding an action to your app](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md). | validation: minLength 5, maxLength 50 - name: inputSchema | type: object | description: Action [input schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-input-schema). - name: outputSchema | type: object | description: Action [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-output-schema). - name: displayName | type: string | description: Action display name. Users see this name when they [choose an action for an automation](https://support.wix.com/en/article/wix-automations-creating-an-automation-with-the-new-builder#step-4-choose-an-action). For example, "Send SMS" or "Create Coupon". | validation: minLength 1, maxLength 80 - name: description | type: string | description: Action description displayed in the site dashboard to Wix users. - name: implementedMethods | type: ImplementedMethods | description: Additional [service plugin methods](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md#implement-the-service-plugin-methods) implemented for this action. - name: validateConfiguration | type: boolean | description: Whether [Validate Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration.md) is implemented. Default: `false`. - name: getQuotaInfo | type: boolean | description: Whether [Get Quota Info](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/get-quota-info.md) is implemented. Default: `false`. - name: interfaceConfiguration | type: InterfaceConfiguration | description: Selected user interface for the action. The UI is displayed to the Wix user in the site dashboard when they configure the action. - ONE-OF: - name: genericOptions | type: GenericOptions | description: Details for the generic UI. - name: uiSchema | type: object | description: UI schema. - name: type | type: Type | description: Type of action configuration UI. - enum: - UNKNOWN_TYPE: Unknown action configuration UI. - GENERIC: The generic action configuration UI. This requires you to provide a [UI schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-ui-schema). - name: icon | type: Image | description: Action icon displayed in the [site dashboard](https://support.wix.com/en/article/about-your-wix-dashboard) to Wix users. - name: id | type: string | description: WixMedia image GUID. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. - name: width | type: integer | description: Original image width. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: createdDate | type: string | description: Date and time the action was created. | validation: format date-time - name: updatedDate | type: string | description: Date and time the action was last updated. | validation: format date-time - name: baseUri | type: string | description: Action base URI. Wix calls your action at this base address. Learn more about the [Action Provider service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md). | validation: maxLength 256 Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ACTION_SPI_NOT_FOUND | Description: The requested action does not have a matching service plugin implementer. ``` ### Examples ### Get latest action ```curl curl -X GET 'https://www.wixapis.com/v1/actions/latest/apps/e4c3e640-0b63-4bd9-8574-53f8c14e0236/keys/send-gift-card' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.actions.ActionCatalogService.getLatestAction(identifiers, options) Description: Retrieves the latest version of an action, regardless of the site on which it's installed. When an app developer updates an action, the new version doesn't immediately become active on every site. This method retrieves the latest version of the action as defined in the [app dashboard](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard/about-the-app-dashboard.md). - To retrieve the version of the action that's active on the current site, call [Get Runtime Action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-runtime-action.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: identifiers.appId, identifiers.actionKey, identifiers Method parameters: param name: identifiers | type: GetLatestActionIdentifiers none | required: true - name: appId | type: string | description: GUID of the app that defines the action. | required: true | validation: format GUID - name: actionKey | type: string | description: Action key. Learn about [adding an action to your app](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md). | required: true | validation: minLength 5, maxLength 50 param name: options | type: GetLatestActionOptions none - name: translate | type: boolean | description: Whether to apply translations to the action. Default: `false`. Return type: PROMISE - name: action | type: Action | description: The requested action. - name: _id | type: string | description: Action GUID. | validation: format GUID - name: appId | type: string | description: GUID of the [app that created the action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md). | validation: format GUID - name: actionKey | type: string | description: Action key. Learn about [adding an action to your app](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md). | validation: minLength 5, maxLength 50 - name: inputSchema | type: object | description: Action [input schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-input-schema). - name: outputSchema | type: object | description: Action [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-output-schema). - name: displayName | type: string | description: Action display name. Users see this name when they [choose an action for an automation](https://support.wix.com/en/article/wix-automations-creating-an-automation-with-the-new-builder#step-4-choose-an-action). For example, "Send SMS" or "Create Coupon". | validation: minLength 1, maxLength 80 - name: description | type: string | description: Action description displayed in the site dashboard to Wix users. - name: implementedMethods | type: ImplementedMethods | description: Additional [service plugin methods](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md#implement-the-service-plugin-methods) implemented for this action. - name: validateConfiguration | type: boolean | description: Whether [Validate Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration.md) is implemented. Default: `false`. - name: getQuotaInfo | type: boolean | description: Whether [Get Quota Info](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/get-quota-info.md) is implemented. Default: `false`. - name: interfaceConfiguration | type: InterfaceConfiguration | description: Selected user interface for the action. The UI is displayed to the Wix user in the site dashboard when they configure the action. - ONE-OF: - name: genericOptions | type: GenericOptions | description: Details for the generic UI. - name: uiSchema | type: object | description: UI schema. - name: type | type: Type | description: Type of action configuration UI. - enum: - UNKNOWN_TYPE: Unknown action configuration UI. - GENERIC: The generic action configuration UI. This requires you to provide a [UI schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-ui-schema). - name: icon | type: string | description: Action icon displayed in the [site dashboard](https://support.wix.com/en/article/about-your-wix-dashboard) to Wix users. - name: _createdDate | type: Date | description: Date and time the action was created. - name: _updatedDate | type: Date | description: Date and time the action was last updated. - name: baseUri | type: string | description: Action base URI. Wix calls your action at this base address. Learn more about the [Action Provider service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md). | validation: maxLength 256 Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ACTION_SPI_NOT_FOUND | Description: The requested action does not have a matching service plugin implementer. ``` ### Examples ### Get latest action Retrieves the latest version of an action by app ID and action key. ```javascript import { actionCatalog } from "@wix/automations"; async function getLatestAction() { const response = await actionCatalog.getLatestAction({ appId: "e4c3e640-0b63-4bd9-8574-53f8c14e0236", actionKey: "send-gift-card", }); return response; } /* Promise resolves to: * { * "action": { * "_id": "a3d2f8e1-7c4b-4a9e-b6d5-1e8f3c2a9b7d", * "appId": "e4c3e640-0b63-4bd9-8574-53f8c14e0236", * "actionKey": "send-gift-card", * "inputSchema": { ... }, * "displayName": "Send a gift card", * "description": "Send a gift card to a contact via email.", * "implementedMethods": { "validateConfiguration": false, "getQuotaInfo": false }, * "interfaceConfiguration": { "type": "GENERIC" }, * "_createdDate": "2024-11-15T10:30:00.000Z", * "_updatedDate": "2024-11-20T14:45:00.000Z" * } * } */ ``` ### getLatestAction (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 { actionCatalog } from '@wix/automations'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { actionCatalog }, // Include the auth strategy and host as relevant }); async function getLatestAction(identifiers,options) { const response = await myWixClient.actionCatalog.getLatestAction(identifiers,options); }; ``` ---