# listDealCustomFields

List a deal pipeline's custom-field DEFINITIONS (by pipelineId from listPipelines): id, name, type (TEXT/NUMBER/DOLLAR/DATE/LINK/DROPDOWN), dropdown options, allowMultiple, defaultValue. Deal custom fields are per-pipeline. DEFINITIONS ONLY: no deal's recorded value appears here: read those from getDeal's `customFieldValues`, which lists only the fields a given deal has been given a value for. Use each id as the customFieldId in the deal's customFieldValues input on createDeal / updateDeal to write values.

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

## Variables

- `pipelineId`: `ID!` (required)

## Response (data, an example)

```json
{
  "dealCustomFieldQuery": {
    "getPipelineCustomFields": [
      {
        "id": "<ID>",
        "name": "…",
        "type": "DROPDOWN",
        "options": [
          {
            "id": "<ID>",
            "label": "…"
          }
        ],
        "displayOrder": 0,
        "allowMultiple": true,
        "defaultValue": "…"
      }
    ]
  }
}
```

## Example

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