# bulkUpdateDeals

One updateDeal `input` for many deals (stage, close date, owners, contacts); every id must be a deal your org owns or shares, or the whole call is refused. Each deal runs a full updateDeal, so a stage move wakes workflows: confirm as updateDeal says. Large sets run as a background task (`bulkTaskId`, getBulkTask).

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "bulkUpdateDeals", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `dealIds`: `[ID!]!` (required)
- `input`: `PipelineItemMutationInput!` (required)
  - `title`: `String`
  - `stageId`: `ID`
  - `description`: `String`
  - `priceCents`: `BigInt`
  - `commissionAmountCents`: `BigInt`
  - `commissionPercentBps`: `Int`
  - `teamSplitAmountCents`: `BigInt`
  - `teamSplitPercentBps`: `Int`
  - `participantSplits`: `[PipelineItemParticipantSplitInput!]`
    - `userId`: `ID!` (required)
    - `splitAmountCents`: `BigInt`
    - `splitPercentBps`: `Int`
  - `closeDate`: `DateTime`
  - `propertyIds`: `[ID!]`
  - `propertyStrings`: `[String!]`
  - `contactIds`: `[ID!]`
  - `userIds`: `[ID!]`
  - `fileIds`: `[ID!]`
  - `order`: `Int`
  - `customFieldValues`: `[PipelineItemCustomFieldValueInput!]`
    - `customFieldId`: `ID!` (required)
    - `textValue`: `String`
    - `dateValue`: `DateTime`
    - `numberValue`: `Float`
    - `dropdownSelectedValues`: `[String!]`

## Response (data, an example)

```json
{
  "dealMutation": {
    "bulkUpdateDeals": {
      "mode": "SYNC",
      "updatedDealCount": 0,
      "bulkTaskId": "…"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "bulkUpdateDeals",
    "variables": {
      "dealIds": [
        "<dealIds>"
      ],
      "input": {}
    }
  }'
```
