Search.../

getAccountDetails( )

Developer Preview

Retrieves email marketing account details.

Description

This function is not a universal function and runs only on the backend.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Authorization

Request

This endpoint does not take any parameters

Response Object

NAME
TYPE
DESCRIPTION
accountDetails
AccountDetails

Current account details.

Status/Error Codes

Was this helpful?

Get email marketing account details (dashboard page code)

Copy Code
1import { accountDetails } from "wix-email-marketing.v2";
2
3export async function myGetAccountDetailsFunction() {
4 try {
5 const results = await accountDetails.getAccountDetails();
6
7 console.log('Success! Retrieved results:', results);
8 return results;
9 } catch (error) {
10 console.error(error);
11 }
12}
13
14/* Promise resolves to:
15 * {
16 * "accountDetails": {
17 * "status": "ACTIVE",
18 * "package": {
19 * "_id": "EmailMarketing_Professional",
20 * "group": "EmailMarketing",
21 * "monthlyQuotaAllocation": {
22 * "campaigns": -1,
23 * "emails": 5000
24 * }
25 * },
26 * "quotaPeriod": {
27 * "dateFrom": "2023-08-10T15:57:10.000Z",
28 * "dateTo": "2023-09-10T15:57:10.000Z",
29 * "quotaUsage": {
30 * "campaigns": 4,
31 * "emails": 2
32 * }
33 * }
34 * }
35 * }
36 */
Get email marketing account details (export from backend code)

Copy Code
1import { Permissions, webMethod } from 'wix-web-module';
2import { accountDetails } from 'wix-email-marketing.v2';
3
4export const myGetAccountDetailsFunction = webMethod(Permissions.Anyone, async () => {
5 try {
6 const results = await accountDetails.getAccountDetails();
7
8 console.log('Success! Retrieved results:', results);
9 return results;
10 } catch (error) {
11 console.error(error);
12 }
13});
14
15/* Promise resolves to:
16 * {
17 * "accountDetails": {
18 * "status": "ACTIVE",
19 * "package": {
20 * "_id": "EmailMarketing_Professional",
21 * "group": "EmailMarketing",
22 * "monthlyQuotaAllocation": {
23 * "campaigns": -1,
24 * "emails": 5000
25 * }
26 * },
27 * "quotaPeriod": {
28 * "dateFrom": "2023-08-10T15:57:10.000Z",
29 * "dateTo": "2023-09-10T15:57:10.000Z",
30 * "quotaUsage": {
31 * "campaigns": 4,
32 * "emails": 2
33 * }
34 * }
35 * }
36 * }
37 */
38