Skip to main content
POST
/
index.php
/
api
/
dakota
cURL
curl --request POST \
  --url https://marketplace-as-a-service.herokuapp.com/index.php/api/dakota \
  --header 'Content-Type: text/plain' \
  --header 'Oauth-Token: <api-key>' \
  --data '<JSON example>'

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 Metro Area Records

{
  "module": "metro_area__c",
  "count_only": "1"
}

List All Metro Areas

{
  "module": "metro_area__c"
}

List Metro Areas with Specific Fields

{
  "module": "metro_area__c",
  "filters": {
    "fields": ["name", "createddate", "country__c"],
    "order_by": "name:DESC",
    "max_num": "10"
  }
}

Filter By Country (OR Example)

{
  "module": "metro_area__c",
  "filters": {
    "filter": [
      {
        "$or": [
          {
            "country__c": {
              "$equals": "Afghanistan"
            }
          },
          {
            "country__c": {
              "$equals": "Aland Islands"
            }
          }
        ]
      }
    ]
  }
}

Filter By Created Date (Last 30 Days)

{
  "module": "metro_area__c",
  "filters": {
    "filter": [
      {
        "createddate": {
          "$dateRange": "last_30_days"
        }
      }
    ],
    "max_num": "10"
  }
}

Filter By Sort Order Range

{
  "module": "metro_area__c",
  "filters": {
    "filter": [
      {
        "$or": [
          {
            "sort_order__c": {
              "$gte": "1000"
            }
          },
          {
            "sort_order__c": {
              "$lte": "1500"
            }
          }
        ]
      }
    ]
  }
} 

Authorizations

Oauth-Token
string
header
required

Get the OAuth token by calling the /oauth2 authentication API. Use the access_token from the response to authorize your API requests.

Body

text/plain

Copy any of the JSON examples and paste it into the request body field.