# getTeammateGoalPlan

A teammate's plan (`userId`, ADMIN; the key owner must be an org admin who sees the team directory): getGoalPlan for them.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "getTeammateGoalPlan", "variables": {...} }`
- Scope: `ADMIN`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `userId`: `ID!` (required)
- `periodStartDate`: `Date!` (required)

## Response (data, an example)

```json
{
  "agentGoalsQuery": {
    "getAgentGoalPlan": {
      "draftPlan": {
        "id": "<ID>",
        "userId": "<ID>",
        "periodStartDate": "…",
        "periodEndDate": "…",
        "status": "DRAFT",
        "publishedAt": "2026-01-01T00:00:00.000Z",
        "commissionGoals": [
          {
            "id": "<ID>",
            "pipelineId": "<ID>",
            "pipelineName": "…",
            "metric": "EARNED",
            "targetCents": "…"
          }
        ],
        "personalGoals": [
          {
            "id": "<ID>",
            "title": "…",
            "description": "…",
            "status": "ACTIVE",
            "displayOrder": 0
          }
        ]
      },
      "activePlan": {
        "id": "<ID>",
        "userId": "<ID>",
        "periodStartDate": "…",
        "periodEndDate": "…",
        "status": "DRAFT",
        "publishedAt": "2026-01-01T00:00:00.000Z",
        "commissionGoals": [
          {
            "id": "<ID>",
            "pipelineId": "<ID>",
            "pipelineName": "…",
            "metric": "EARNED",
            "targetCents": "…"
          }
        ],
        "personalGoals": [
          {
            "id": "<ID>",
            "title": "…",
            "description": "…",
            "status": "ACTIVE",
            "displayOrder": 0
          }
        ]
      }
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "getTeammateGoalPlan",
    "variables": {
      "userId": "<userId>",
      "periodStartDate": "2026-01-01"
    }
  }'
```
