Get counterparty field options

Returns the enum option sets and country list needed to build a counterparty form.

GET/v1/counterparties/metadataRun in dashboard

Requires an API key with the counterparties.read action.

Headers

  • x-project-id · string · min length 1 · example prj_example

    Required for dashboard sessions. API keys use their assigned project.

Responses

  • 200 Counterparty field options

    • data · object · required

      Field option sets for building a counterparty form: closed enums plus the country list.

      • fields · object · required

        • entityTypes · string[] · required · each one of individual, business

        • countries · object[] · required

          • code · string · required · example US

            ISO 3166-1 alpha-2 code.

          • name · string · required · example United States

            English display name.

    • meta · object · required

      Response metadata.

      • requestId · string · required · min length 1 · example req_example

        Request identifier for tracing.

      • timestamp · string · required · format date-time · example 2025-01-01T00:00:00.000Z

        ISO 8601 timestamp.

  • 401 Unauthorized

    • error · object · required

      Standard error payload.

      • code · string · required

        Machine-readable error code.

      • message · string · required

        Human-readable error message.

      • details · object

        Optional error details for debugging.

        • * · any
    • meta · object

      • requestId · string · min length 1 · example req_example

        Request identifier for tracing.

  • 403 Forbidden. Requires the counterparties.read action: an API key must hold it (a module's manage or execute also covers its read), and a signed-in member's organization role must include it. Without it the error is INSUFFICIENT_PERMISSIONS and error.details.action names the action. Any other 403 names its own reason.

    Same fields as 401.

  • 500 Internal Server Error

    Same fields as 401.

Example request

curl 'https://api-beta.solana.com/v1/counterparties/metadata' \
  -H "Authorization: Bearer $SDP_API_KEY"
const res = await fetch("https://api-beta.solana.com/v1/counterparties/metadata", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.SDP_API_KEY}`
  }
});
import os, requests

r = requests.get("https://api-beta.solana.com/v1/counterparties/metadata",
  headers={"Authorization": f"Bearer {os.environ['SDP_API_KEY']}"})

Example responses

JSON
{
  "data": {
    "fields": {
      "entityTypes": [
        "individual"
      ],
      "countries": [
        {
          "code": "US",
          "name": "United States"
        }
      ]
    }
  },
  "meta": {
    "requestId": "req_example",
    "timestamp": "2025-01-01T00:00:00.000Z"
  }
}
JSON
{
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "Missing action: counterparties.read",
    "details": {
      "action": "counterparties.read"
    }
  },
  "meta": {
    "requestId": "req_example"
  }
}

Error responses use the standard error shape.