---
title: "Put Opportunities Data"
method: POST
path: "/opportunities/"
tags: ["OPPORTUNITIES"]
---

# Put Opportunities Data

`POST /opportunities/`

## Request

- Base URL: `https://api.myaltimate.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myaltimate.com/opportunities/`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Update opportunities data in both PostgreSQL and ClickHouse databases and OS(TODO: to be removed).

Args:
    db: Database session for PostgreSQL access
    auth: Authentication token containing user info
    tenant: Tenant identifier
    tenant_alias: Alias for the tenant
    opportunities_data_request: Request containing opportunity changes
    client: OpenSearch client for legacy updates (TODO: to be removed)
    clickhouse_client: ClickHouse client for updating global_opportunities_aggregated table
    is_operation_allowed: Flag indicating if operation is allowed for tenant

Returns:
    StandardResponse with status and optional message

## Headers

- `x-tenant` string, required

## Request body

- PutOpportunitiesDataRequest
  - `changes` Changes[], required
    - `opportunity_id` string, required
    - `status` string, nullable
    - `owner` union
      - integer
      - string
    - `implementation_date` string, date-time, nullable
    - `target_state` string, nullable
  - `user_id` integer, nullable
  - `start_date` string, date-time, nullable
  - `end_date` string, date-time, nullable

## Response `200`

Successful Response

- StandardResponse
  - `ok` boolean, required

## Other responses

- `400`: Not supported for public user
- `403`: Not supported for public user
- `422`: Validation Error

## Changes

- **2026-09-15** `8a08bdb37cfa`: 1 info
  - added the new optional request property `changes/items/implementation_date`
- **2026-09-11** `70e0a3e5cb0d`: 1 info
  - added the new optional request property `changes/items/target_state`

[Operation history](https://skmtc.dev/myaltimate/apis/myaltimate-api/changes/opportunities/post.md)

---

[API](https://skmtc.dev/myaltimate/apis/myaltimate-api.md) - [All operations](https://skmtc.dev/myaltimate/apis/myaltimate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myaltimate/apis/myaltimate-api/revisions/727657ce54e9?raw)
