> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dakota.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accounts API

> This endpoint requires an Oauth-Token obtained from /oauth2

## How to Use

1. **Copy** any of the JSON examples below.
2. **Go to the API playground** by clicking on the **“Try it”** button.
3. **Paste** the JSON into the request body field.
4. **Click "Send"** button to execute the request.

## Examples

### Count Account Records

```json theme={null}
{
  "module": "account",
  "count_only": "1"
}
```

### List All Accounts

```json theme={null}
{
  "module": "account"
}
```

### List Accounts with Specific Fields

```json theme={null}
{
  "module": "account",
  "filters": {
    "fields": ["name", "createddate", "aum__c", "website"],
    "order_by": "name:DESC",
    "max_num": "10"
  }
}
```

### Get Parent Account Details

```json theme={null}
{
    "module": "account",
    "filters": {
        "fields": [
            "sfid",
            "name",
            "type",
            "account.parentid.name",
            "account.parentid.type"
        ]
    }
}
```

### Filter By Account ID

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "sfid": {
          "$equals": "0017600000cmqHcAAI"
        }
      }
    ]
  }
}
```

### Filter By Account Type (Bank)

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "type": {
          "$equals": "Bank"
        }
      }
    ]
  }
}
```

### Filter By Account Type (Not Consultant)

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "type": {
          "$not_equals": "Consultant"
        }
      }
    ]
  }
}
```

### Filter By Account Name (OR Example)

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "$or": [
          {
            "name": {
              "$contains": "Test"
            }
          },
          {
            "name": {
              "$equals": "Test2"
            }
          }
        ]
      }
    ]
  }
}
```

### Filter By Account Name and Type (AND Example)

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "$and": [
          {
            "name": {
              "$equals": "Dakota QA 2"
            }
          },
          {
            "type": {
              "$equals": "Endowment"
            }
          }
        ]
      }
    ]
  }
}
```

### Filter By AUM Range

```json theme={null}
{
  "module": "account",
  "filters": {
    "order_by": "name:DESC",
    "max_num": 50,
    "offset": 0,
    "filter": [
      {
        "aum__c": {
          "$between": [100, 500000]
        }
      }
    ],
    "fields": ["sfid", "name", "lastmodifieddate", "aum__c"]
  }
}
```

### Filter By Date Range

```json theme={null}
{
  "module": "account",
  "filters": {
    "order_by": "name:DESC",
    "max_num": 50,
    "offset": 0,
    "filter": [
      {
        "lastmodifieddate": {
          "$between": ["2025-01-01", "2025-01-20"]
        }
      }
    ],
    "fields": ["sfid", "name", "lastmodifieddate", "aum__c"]
  }
}
```

### Filter By AUM Greater Than

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "aum__c": {
          "$gt": "1200000"
        }
      }
    ]
  }
}
```

### Filter By AUM Greater Than or Equal

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "aum__c": {
          "$gte": "1000000"
        }
      }
    ]
  }
}
```

### Filter By AUM Less Than

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "aum__c": {
          "$lt": "1000000"
        }
      }
    ]
  }
}
```

### Filter By AUM Less Than or Equal

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "aum__c": {
          "$lte": "1000000"
        }
      }
    ]
  }
}
```

### Filter By Created Date Range (Last 30 Days)

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "createddate": {
          "$dateRange": "last_30_days"
        }
      }
    ]
  }
}
```

### Filter By Name with Special Characters

```json theme={null}
{
  "module": "account",
  "filters": {
    "filter": [
      {
        "name": {
          "$equals": "Malcolm \"Mac\" Mayer"
        }
      }
    ]
  }
}
```


## OpenAPI

````yaml POST /index.php/api/dakota
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://marketplace-as-a-service.herokuapp.com
security: []
paths:
  /index.php/api/dakota:
    post:
      description: This endpoint requires an Oauth-Token obtained from /oauth2
      requestBody:
        required: true
        content:
          text/plain:
            schema:
              type: string
              description: >-
                Copy any of the JSON examples and paste it into the request body
                field.
            example: <JSON example>
      security:
        - authToken: []
components:
  securitySchemes:
    authToken:
      type: apiKey
      in: header
      name: Oauth-Token
      description: >-
        Get the OAuth token by calling the /oauth2 authentication API. Use the
        access_token from the response to authorize your API requests.

````