Deals

Closes several budgets

Changed on

Closes several budgets in one request. Requires the JSON:API bulk extension header (Content-Type: application/vnd.api+json; ext=bulk); the single-budget endpoint lives at /api/v2/deals/{id}/close. Close is a budget-only action, so a sales deal in the payload is rejected. Each item may carry its own delivered_on (defaults to today) and destroy_future_bookings. Authorization is all or nothing — when any budget is denied (403) or cannot be closed (409, e.g. it is already closed, has unapproved time entries or expenses, or a running timer), none of them close and every blocked row is reported with its meta.bulk_index. A delivered_on in a locked financial month also rejects the whole batch with a 409, without meta.bulk_index. A batch is limited to 100 budgets; a larger one is rejected with a 422 before any check runs.

patch/api/v2/deals/close

Request

  • Base URL
    https://developer.productive.io (the document declares no server; this is the origin it was published from)
  • URL
    https://developer.productive.io/api/v2/deals/close
  • Auth
    none declared

Request body

Response

Collection deal

Example response

{
  "data": [
    {
      "id": "89",
      "type": "deals",
      "attributes": {
        "name": "Website Redesign Project",
        "number": "DEAL-089",
        "status_id": 1,
        "date": "2026-01-15",
        "end_date": "2026-06-30",
        "closed_at": null,
        "lost_at": null,
        "created_at": "2026-01-15T10:00:00.000+00:00",
        "updated_at": "2026-03-01T09:00:00.000+00:00",
        "last_activity_at": "2026-03-01T09:00:00.000+00:00",
        "tag_list": [],
        "custom_fields": null,
        "description": "Redesigning the company website with new branding",
        "is_budget": false,
        "currency": "USD"
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "65111"
          }
        },
        "person": {
          "data": {
            "type": "people",
            "id": "12"
          }
        },
        "pipeline": {
          "data": {
            "type": "pipelines",
            "id": "1"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "5"
          }
        }
      }
    }
  ],
  "included": [],
  "meta": {
    "current_page": 1,
    "total_pages": 5,
    "total_count": 42,
    "page_size": 30,
    "max_page_size": 200
  }
}

Changes

    • warning

      added the new project_already_exported enum value to the // response property for the response status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status