Retrieve
Overview
Retrieve an account based on the specified criteriaSyntax
Retrieve(1)
| Ordinal | Type | Description | |
|---|---|---|---|
| 1 | string | Required | Criteria used to search for the account. Use a filter expression or a JSON object containing filter and additional search parameters. |
Examples
This sample code retrieves an account based on the specified filter criteria:
var getAcct = Account.Retrieve({Property:"CustomerKey",SimpleOperator:"equals",Value:"MyAccount"});
This sample code queries across all applicable accounts and retrieves an account based on the filter criteria:
var query = {};
query.Filter = '{Property:"CustomerKey",SimpleOperator:"equals",Value:"MyAccount"}';
query.QueryAllAccounts = true;
var getAcct = Account.Retrieve(query);