API Documentation

API Endpoint

Deals

Deals

Supported filter params

  • id

  • responsible_id (array)

  • company_id (array)

  • status_id (array)

  • sales_status_id (array) (1: open, 2: won, 3: lost)

  • contract_id (array)

  • recurring

  • project_id (array)

  • tags

  • query

  • after

  • before

  • won_after

  • won_before

  • lost_after

  • lost_before

  • closed_after

  • closed_before

  • needs_invoicing

  • type (1: deal, 2: budget)

  • project_type (1: internal project, 2: client project)

  • budget_status (1: open, 2: closed)

  • date_after

  • date_before

  • subsidiary_id (array)

Supported sort params

  • name

  • date

  • end_date

  • number

  • suffix

  • time_approval

  • client_access

  • purchase_order_number

  • budget_warning

  • closed_at

  • created_at

  • last_activity_at

  • probability

  • billable_time

  • estimated_time

  • budgeted_time

  • total_budgeted_time

  • worked_time

  • revenue

  • services_revenue

  • cost

  • work_cost

  • profit

  • profit_margin

  • invoiced

  • pending_invoicing

  • paid

  • expense

  • expense_billable

  • expense_paid

  • budget_total

  • budget_used

  • company.name

  • project.name

  • responsible.name

  • actual_rate

  • estimated_remaining_time

Supported aggregates params

  • total_revenue

  • total_expense_billable

  • total_services_revenue

  • total_work_cost

  • total_expense

  • total_cost

  • total_profit

  • total_budget_total

  • total_budget_used

  • total_invoiced

  • total_pending_invoicing

  • average_actual_rate

  • total_worked_time

  • total_billable_time

  • total_estimated_time

  • total_budgeted_time

  • average_time_to_close

  • total_estimated_remaining_time

  • average_rate

Supported Enumerations

Deal type:

  • internal (deal_type_id: 1)

  • client (deal_type_id: 2)

Filter operations are supported on this endpoint.

GET /api/v2/deals
Requestsreturns deals

GET  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "28",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2020-08-11",
        "end_date": null,
        "number": 1,
        "suffix": null,
        "time_approval": true,
        "expense_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": false,
        "sales_status_id": 1,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "cede717416948fa2b1f2b3dc0803b2ff",
        "purchase_order_number": null,
        "custom_fields": null,
        "forecasted_billable_time": 0,
        "forecasted_margin": 0,
        "forecasted_budget_usage": 0,
        "forecasted_time_usage": 0,
        "budget_usage": 0,
        "future_booked_time": 0,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "rejected_entries_count": 0,
        "estimated_remaining_time": 0,
        "unapproved_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "delivered_on": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2020-08-11T01:04:13.290+02:00",
        "note": null,
        "sales_closed_at": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "expense": 0,
        "expense_default": 0,
        "expense_normalized": 0,
        "expense_billable": 0,
        "expense_billable_default": 0,
        "expense_billable_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0,
        "budget_remaining": 0,
        "budget_remaining_default": 0,
        "budget_remaining_normalized": 0,
        "projected_revenue": 0,
        "projected_revenue_default": 0,
        "projected_revenue_normalized": 0,
        "future_revenue": 0,
        "future_revenue_default": 0,
        "future_revenue_normalized": 0,
        "future_budget_used": 0,
        "future_budget_used_default": 0,
        "future_budget_used_normalized": 0,
        "future_cost": 0,
        "future_cost_default": 0,
        "future_cost_normalized": 0,
        "forecasted_revenue": 0,
        "forecasted_revenue_default": 0,
        "forecasted_revenue_normalized": 0,
        "forecasted_cost": 0,
        "forecasted_cost_default": 0,
        "forecasted_cost_normalized": 0,
        "forecasted_profit": 0,
        "forecasted_profit_default": 0,
        "forecasted_profit_normalized": 0,
        "forecasted_budget_used": 0,
        "forecasted_budget_used_default": 0,
        "forecasted_budget_used_normalized": 0,
        "invoiced_rate": 0,
        "invoiced_rate_default": 0,
        "invoiced_rate_normalized": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 188
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "342"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "458"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "343"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "976"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        },
        "contact": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "342",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user344@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:13.000+02:00",
        "last_seen_at": "2020-08-11T01:04:13.311+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:13.233+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 188
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "457"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "458",
      "type": "companies",
      "attributes": {
        "name": "Client269",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:13.251+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 188
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "343",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user345@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:13.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:13.262+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 188
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "459"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "976",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 188
          }
        }
      }
    },
    {
      "id": "457",
      "type": "companies",
      "attributes": {
        "name": "Organization188",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:13.232+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 188
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "459",
      "type": "companies",
      "attributes": {
        "name": "Client270",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:13.258+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 188
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://www.example.com/api/v2/deals?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://www.example.com/api/v2/deals?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200,
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Get deals
GET/api/v2/deals


GET /api/v2/deals/1
Requestsreturns deal

GET  /api/v2/deals/29

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "29",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-08-11",
      "end_date": null,
      "number": 1,
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 1,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "182bbf44a567a40c321403d0e962fcfe",
      "purchase_order_number": null,
      "custom_fields": null,
      "forecasted_billable_time": 0,
      "forecasted_margin": 0,
      "forecasted_budget_usage": 0,
      "forecasted_time_usage": 0,
      "budget_usage": 0,
      "future_booked_time": 0,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_remaining_time": 0,
      "unapproved_time": 0,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-08-11T01:04:13.468+02:00",
      "note": null,
      "sales_closed_at": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_billable": 0,
      "expense_billable_default": 0,
      "expense_billable_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0,
      "budget_remaining": 0,
      "budget_remaining_default": 0,
      "budget_remaining_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "future_revenue": 0,
      "future_revenue_default": 0,
      "future_revenue_normalized": 0,
      "future_budget_used": 0,
      "future_budget_used_default": 0,
      "future_budget_used_normalized": 0,
      "future_cost": 0,
      "future_cost_default": 0,
      "future_cost_normalized": 0,
      "forecasted_revenue": 0,
      "forecasted_revenue_default": 0,
      "forecasted_revenue_normalized": 0,
      "forecasted_cost": 0,
      "forecasted_cost_default": 0,
      "forecasted_cost_normalized": 0,
      "forecasted_profit": 0,
      "forecasted_profit_default": 0,
      "forecasted_profit_normalized": 0,
      "forecasted_budget_used": 0,
      "forecasted_budget_used_default": 0,
      "forecasted_budget_used_normalized": 0,
      "invoiced_rate": 0,
      "invoiced_rate_default": 0,
      "invoiced_rate_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 189
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "344"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "461"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "345"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "982"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "344",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user346@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:13.000+02:00",
        "last_seen_at": "2020-08-11T01:04:13.486+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:13.414+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 189
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "460"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "461",
      "type": "companies",
      "attributes": {
        "name": "Client271",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:13.430+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 189
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "345",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user347@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:13.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:13.442+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 189
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "462"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "982",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 189
          }
        }
      }
    },
    {
      "id": "460",
      "type": "companies",
      "attributes": {
        "name": "Organization189",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:13.413+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 189
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "462",
      "type": "companies",
      "attributes": {
        "name": "Client272",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:13.438+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 189
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Gets a deal
GET/api/v2/deals/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal id


POST /api/v2/deals
Requestscreates dealreturns error

POST  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-08-11",
      "deal_type_id": 2,
      "deal_status_id": 1000,
      "sales_status_id": 1,
      "probability": 50,
      "currency": "EUR"
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "472"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "354"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "33",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-08-11",
      "end_date": null,
      "number": 2,
      "suffix": null,
      "time_approval": false,
      "expense_approval": false,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 1,
      "sales_status_updated_at": "2020-08-11T01:04:14.000+02:00",
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "a3bf46f0d393fbcec1b8ac2ae06879c4",
      "purchase_order_number": null,
      "custom_fields": null,
      "forecasted_billable_time": 0,
      "forecasted_margin": 0,
      "forecasted_budget_usage": 0,
      "forecasted_time_usage": 0,
      "budget_usage": 0,
      "future_booked_time": 0,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_remaining_time": 0,
      "unapproved_time": 0,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-08-11T01:04:14.151+02:00",
      "note": null,
      "sales_closed_at": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_billable": 0,
      "expense_billable_default": 0,
      "expense_billable_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0,
      "budget_remaining": 0,
      "budget_remaining_default": 0,
      "budget_remaining_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "future_revenue": 0,
      "future_revenue_default": 0,
      "future_revenue_normalized": 0,
      "future_budget_used": 0,
      "future_budget_used_default": 0,
      "future_budget_used_normalized": 0,
      "future_cost": 0,
      "future_cost_default": 0,
      "future_cost_normalized": 0,
      "forecasted_revenue": 0,
      "forecasted_revenue_default": 0,
      "forecasted_revenue_normalized": 0,
      "forecasted_cost": 0,
      "forecasted_cost_default": 0,
      "forecasted_cost_normalized": 0,
      "forecasted_profit": 0,
      "forecasted_profit_default": 0,
      "forecasted_profit_normalized": 0,
      "forecasted_budget_used": 0,
      "forecasted_budget_used_default": 0,
      "forecasted_budget_used_normalized": 0,
      "invoiced_rate": 0,
      "invoiced_rate_default": 0,
      "invoiced_rate_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 192
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "352"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "472"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "354"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "1000"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "352",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user354@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:14.000+02:00",
        "last_seen_at": "2020-08-11T01:04:14.117+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:13.966+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 192
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "471"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "472",
      "type": "companies",
      "attributes": {
        "name": "Client279",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:13.986+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 192
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "354",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user356@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 2,
        "invited_at": "2020-08-11T01:04:14.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:14.080+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 192
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "474"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1000",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 192
          }
        }
      }
    },
    {
      "id": "471",
      "type": "companies",
      "attributes": {
        "name": "Organization192",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:13.964+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 192
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "474",
      "type": "companies",
      "attributes": {
        "name": "Client281",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:14.074+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 192
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

POST  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "attribute is invalid",
      "source": {
        "pointer": "data/attributes/company"
      }
    }
  ]
}

Create a deal
POST/api/v2/deals

URI Parameters
HideShow
name
string (required) Example: Name

name

date
date (required) Example: 2018-01-01

date

responsible_id: `1` (number, required) - responsible_id
string (required) 
company_id: `1` (number, required) - company_id
string (required) 
deal_type_id
number (required) Example: 1

deal type

probability
number (required) Example: 100

probability

currency
currency (required) Example: EUR

currency

deal_status
number (required) Example: 1

deal status

sales_status
number (required) Example: 1

sales status


PATCH /api/v2/deals/1
Requestsupdates dealupdates budgetreturns errorupdates budget

PATCH  /api/v2/deals/36

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "new name",
      "tag_list": [
        "invoiced",
        "paid"
      ],
      "sales_status_id": 2
    },
    "relationships": {
      "responsible": {
        "data": {
          "type": "people",
          "id": "361"
        }
      },
      "subscribers": {
        "data": [
          {
            "type": "people",
            "id": "362"
          },
          {
            "type": "people",
            "id": "363"
          }
        ]
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "36",
    "type": "deals",
    "attributes": {
      "name": "new name",
      "date": "2020-08-11",
      "end_date": null,
      "number": 1,
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 2,
      "sales_status_updated_at": "2020-08-11T01:04:14.000+02:00",
      "tag_list": [
        "invoiced",
        "paid"
      ],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "b7e61636a28c43daeb0328a6f5500e72",
      "purchase_order_number": null,
      "custom_fields": null,
      "forecasted_billable_time": 0,
      "forecasted_margin": 0,
      "forecasted_budget_usage": 0,
      "forecasted_time_usage": 0,
      "budget_usage": 0,
      "future_booked_time": 0,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": 0,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_remaining_time": 0,
      "unapproved_time": 0,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-08-11T01:04:14.761+02:00",
      "note": null,
      "sales_closed_at": "2020-08-11T01:04:14.000+02:00",
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_billable": 0,
      "expense_billable_default": 0,
      "expense_billable_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0,
      "budget_remaining": 0,
      "budget_remaining_default": 0,
      "budget_remaining_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "future_revenue": 0,
      "future_revenue_default": 0,
      "future_revenue_normalized": 0,
      "future_budget_used": 0,
      "future_budget_used_default": 0,
      "future_budget_used_normalized": 0,
      "future_cost": 0,
      "future_cost_default": 0,
      "future_cost_normalized": 0,
      "forecasted_revenue": 0,
      "forecasted_revenue_default": 0,
      "forecasted_revenue_normalized": 0,
      "forecasted_cost": 0,
      "forecasted_cost_default": 0,
      "forecasted_cost_normalized": 0,
      "forecasted_profit": 0,
      "forecasted_profit_default": 0,
      "forecasted_profit_normalized": 0,
      "forecasted_budget_used": 0,
      "forecasted_budget_used_default": 0,
      "forecasted_budget_used_normalized": 0,
      "invoiced_rate": 0,
      "invoiced_rate_default": 0,
      "invoiced_rate_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 195
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "359"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "482"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "361"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "1018"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "359",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user361@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:14.000+02:00",
        "last_seen_at": "2020-08-11T01:04:14.904+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:14.690+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 195
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "481"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "482",
      "type": "companies",
      "attributes": {
        "name": "Client286",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:14.712+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 195
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "361",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user363@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 2,
        "invited_at": "2020-08-11T01:04:14.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:14.786+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 195
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "484"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1018",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 195
          }
        }
      }
    },
    {
      "id": "481",
      "type": "companies",
      "attributes": {
        "name": "Organization195",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:14.688+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 195
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "484",
      "type": "companies",
      "attributes": {
        "name": "Client288",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:14.780+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 195
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

PATCH  /api/v2/deals/38

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "delivered_on": "2020-08-15"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "38",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-08-11",
      "end_date": null,
      "number": 2,
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "c7795a3fc9d4078640e83f7f23df4328",
      "purchase_order_number": null,
      "custom_fields": null,
      "forecasted_billable_time": 0,
      "forecasted_margin": 0,
      "forecasted_budget_usage": 0,
      "forecasted_time_usage": 0,
      "budget_usage": 0,
      "future_booked_time": 0,
      "probability": 100,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_remaining_time": 0,
      "unapproved_time": 0,
      "lost_comment": null,
      "closed_at": "2020-08-11T01:04:15.000+02:00",
      "delivered_on": "2020-08-15",
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-08-11T01:04:15.238+02:00",
      "note": null,
      "sales_closed_at": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_billable": 0,
      "expense_billable_default": 0,
      "expense_billable_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0,
      "budget_remaining": 0,
      "budget_remaining_default": 0,
      "budget_remaining_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "future_revenue": 0,
      "future_revenue_default": 0,
      "future_revenue_normalized": 0,
      "future_budget_used": 0,
      "future_budget_used_default": 0,
      "future_budget_used_normalized": 0,
      "future_cost": 0,
      "future_cost_default": 0,
      "future_cost_normalized": 0,
      "forecasted_revenue": 0,
      "forecasted_revenue_default": 0,
      "forecasted_revenue_normalized": 0,
      "forecasted_cost": 0,
      "forecasted_cost_default": 0,
      "forecasted_cost_normalized": 0,
      "forecasted_profit": 0,
      "forecasted_profit_default": 0,
      "forecasted_profit_normalized": 0,
      "forecasted_budget_used": 0,
      "forecasted_budget_used_default": 0,
      "forecasted_budget_used_normalized": 0,
      "invoiced_rate": 0,
      "invoiced_rate_default": 0,
      "invoiced_rate_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 196
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "364"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "490"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "366"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "47"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "364",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user366@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:15.000+02:00",
        "last_seen_at": "2020-08-11T01:04:15.259+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:15.086+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 196
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "487"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "490",
      "type": "companies",
      "attributes": {
        "name": "Client293",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:15.156+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 196
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "366",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user368@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:15.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:15.168+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 196
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "491"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "47",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "number": 1,
        "project_type_id": 2,
        "project_color_id": null,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 0,
        "budget_count": 0,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "invoice_payment_due": null,
        "custom_fields": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "needs_invoicing": 0,
        "needs_invoicing_default": 0,
        "needs_invoicing_normalized": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 196
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "493"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "367"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "487",
      "type": "companies",
      "attributes": {
        "name": "Organization196",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:15.085+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 196
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "491",
      "type": "companies",
      "attributes": {
        "name": "Client294",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:15.163+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 196
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "493",
      "type": "companies",
      "attributes": {
        "name": "Client296",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:15.214+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 196
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "367",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user369@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:15.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:15.196+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 196
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "492"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "492",
      "type": "companies",
      "attributes": {
        "name": "Client295",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:15.192+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 196
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

PATCH  /api/v2/deals/39

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

PATCH  /api/v2/deals/41

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "delivered_on": "2020-08-15"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "41",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-08-11",
      "end_date": null,
      "number": 2,
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "afad765f9ff216bf9b2c9cc72b44737d",
      "purchase_order_number": null,
      "custom_fields": null,
      "forecasted_billable_time": 0,
      "forecasted_margin": 0,
      "forecasted_budget_usage": 0,
      "forecasted_time_usage": 0,
      "budget_usage": 0,
      "future_booked_time": 0,
      "probability": 100,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_remaining_time": 0,
      "unapproved_time": 0,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-08-11T01:04:15.667+02:00",
      "note": null,
      "sales_closed_at": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_billable": 0,
      "expense_billable_default": 0,
      "expense_billable_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0,
      "budget_remaining": 0,
      "budget_remaining_default": 0,
      "budget_remaining_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "future_revenue": 0,
      "future_revenue_default": 0,
      "future_revenue_normalized": 0,
      "future_budget_used": 0,
      "future_budget_used_default": 0,
      "future_budget_used_normalized": 0,
      "future_cost": 0,
      "future_cost_default": 0,
      "future_cost_normalized": 0,
      "forecasted_revenue": 0,
      "forecasted_revenue_default": 0,
      "forecasted_revenue_normalized": 0,
      "forecasted_cost": 0,
      "forecasted_cost_default": 0,
      "forecasted_cost_normalized": 0,
      "forecasted_profit": 0,
      "forecasted_profit_default": 0,
      "forecasted_profit_normalized": 0,
      "forecasted_budget_used": 0,
      "forecasted_budget_used_default": 0,
      "forecasted_budget_used_normalized": 0,
      "invoiced_rate": 0,
      "invoiced_rate_default": 0,
      "invoiced_rate_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 198
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "370"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "500"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "372"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "48"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "370",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user372@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:15.000+02:00",
        "last_seen_at": "2020-08-11T01:04:15.693+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:15.513+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 198
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "497"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "500",
      "type": "companies",
      "attributes": {
        "name": "Client301",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:15.582+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 198
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "372",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user374@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:15.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:15.592+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 198
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "501"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "48",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "number": 1,
        "project_type_id": 2,
        "project_color_id": null,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 0,
        "budget_count": 1,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "invoice_payment_due": null,
        "custom_fields": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "needs_invoicing": 0,
        "needs_invoicing_default": 0,
        "needs_invoicing_normalized": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 198
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "503"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "373"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "497",
      "type": "companies",
      "attributes": {
        "name": "Organization198",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:15.512+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 198
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "501",
      "type": "companies",
      "attributes": {
        "name": "Client302",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:15.588+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 198
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "503",
      "type": "companies",
      "attributes": {
        "name": "Client304",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:15.640+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 198
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "373",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user375@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:15.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:15.620+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 198
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "502"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "502",
      "type": "companies",
      "attributes": {
        "name": "Client303",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:15.616+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 198
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Update a deal
PATCH/api/v2/deals/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal id


DELETE /api/v2/deals/1
Requestsarchives deal

DELETE  /api/v2/deals/42

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a deal
DELETE/api/v2/deals/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal id


PATCH /api/v2/deals/1/open
Requestsopens budget

PATCH  /api/v2/deals/62/open

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "62",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-08-11",
      "end_date": null,
      "number": 2,
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "f96e34e6dce9e165d7b5cafbcdb359ed",
      "purchase_order_number": null,
      "custom_fields": null,
      "forecasted_billable_time": 0,
      "forecasted_margin": 0,
      "forecasted_budget_usage": 0,
      "forecasted_time_usage": 0,
      "budget_usage": 0,
      "future_booked_time": 0,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_remaining_time": 0,
      "unapproved_time": 0,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-08-11T01:04:19.117+02:00",
      "note": null,
      "sales_closed_at": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_billable": 0,
      "expense_billable_default": 0,
      "expense_billable_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0,
      "budget_remaining": 0,
      "budget_remaining_default": 0,
      "budget_remaining_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "future_revenue": 0,
      "future_revenue_default": 0,
      "future_revenue_normalized": 0,
      "future_budget_used": 0,
      "future_budget_used_default": 0,
      "future_budget_used_normalized": 0,
      "future_cost": 0,
      "future_cost_default": 0,
      "future_cost_normalized": 0,
      "forecasted_revenue": 0,
      "forecasted_revenue_default": 0,
      "forecasted_revenue_normalized": 0,
      "forecasted_cost": 0,
      "forecasted_cost_default": 0,
      "forecasted_cost_normalized": 0,
      "forecasted_profit": 0,
      "forecasted_profit_default": 0,
      "forecasted_profit_normalized": 0,
      "forecasted_budget_used": 0,
      "forecasted_budget_used_default": 0,
      "forecasted_budget_used_normalized": 0,
      "invoiced_rate": 0,
      "invoiced_rate_default": 0,
      "invoiced_rate_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 209
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "407"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "559"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "409"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "55"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "407",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user409@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:19.000+02:00",
        "last_seen_at": "2020-08-11T01:04:19.145+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:18.874+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "556"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "559",
      "type": "companies",
      "attributes": {
        "name": "Client349",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:18.987+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "409",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user411@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:19.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:19.006+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "560"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "55",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "number": 1,
        "project_type_id": 2,
        "project_color_id": null,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 0,
        "budget_count": 1,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "invoice_payment_due": null,
        "custom_fields": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "needs_invoicing": 0,
        "needs_invoicing_default": 0,
        "needs_invoicing_normalized": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "562"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "410"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "556",
      "type": "companies",
      "attributes": {
        "name": "Organization209",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:18.871+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "560",
      "type": "companies",
      "attributes": {
        "name": "Client350",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:18.999+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "562",
      "type": "companies",
      "attributes": {
        "name": "Client352",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.084+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "410",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user412@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:19.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:19.054+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "561"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "561",
      "type": "companies",
      "attributes": {
        "name": "Client351",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.047+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Opens a deal
PATCH/api/v2/deals/{id}/open

URI Parameters
HideShow
id
number (required) Example: 1

deal id


PATCH /api/v2/deals/1/close
Requestscloses budgetcloses budget

PATCH  /api/v2/deals/64/close

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "64",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-08-11",
      "end_date": null,
      "number": 2,
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "9d739c91f7ad88b5afccf9232026624c",
      "purchase_order_number": null,
      "custom_fields": null,
      "forecasted_billable_time": 0,
      "forecasted_margin": 0,
      "forecasted_budget_usage": 0,
      "forecasted_time_usage": 0,
      "budget_usage": 0,
      "future_booked_time": 0,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_remaining_time": 0,
      "unapproved_time": 0,
      "lost_comment": null,
      "closed_at": "2020-08-11T01:04:19.000+02:00",
      "delivered_on": "2020-08-11",
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-08-11T01:04:19.488+02:00",
      "note": null,
      "sales_closed_at": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_billable": 0,
      "expense_billable_default": 0,
      "expense_billable_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0,
      "budget_remaining": 0,
      "budget_remaining_default": 0,
      "budget_remaining_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "future_revenue": 0,
      "future_revenue_default": 0,
      "future_revenue_normalized": 0,
      "future_budget_used": 0,
      "future_budget_used_default": 0,
      "future_budget_used_normalized": 0,
      "future_cost": 0,
      "future_cost_default": 0,
      "future_cost_normalized": 0,
      "forecasted_revenue": 0,
      "forecasted_revenue_default": 0,
      "forecasted_revenue_normalized": 0,
      "forecasted_cost": 0,
      "forecasted_cost_default": 0,
      "forecasted_cost_normalized": 0,
      "forecasted_profit": 0,
      "forecasted_profit_default": 0,
      "forecasted_profit_normalized": 0,
      "forecasted_budget_used": 0,
      "forecasted_budget_used_default": 0,
      "forecasted_budget_used_normalized": 0,
      "invoiced_rate": 0,
      "invoiced_rate_default": 0,
      "invoiced_rate_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 210
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "411"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "566"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "413"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "56"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "411",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user413@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:19.000+02:00",
        "last_seen_at": "2020-08-11T01:04:19.509+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:19.329+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 210
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "563"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "566",
      "type": "companies",
      "attributes": {
        "name": "Client355",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.397+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 210
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "413",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user415@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:19.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:19.408+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 210
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "567"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "56",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "number": 1,
        "project_type_id": 2,
        "project_color_id": null,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 0,
        "budget_count": 0,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "invoice_payment_due": null,
        "custom_fields": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "needs_invoicing": 0,
        "needs_invoicing_default": 0,
        "needs_invoicing_normalized": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 210
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "569"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "414"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "563",
      "type": "companies",
      "attributes": {
        "name": "Organization210",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:19.328+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 210
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "567",
      "type": "companies",
      "attributes": {
        "name": "Client356",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.404+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 210
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "569",
      "type": "companies",
      "attributes": {
        "name": "Client358",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.458+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 210
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "414",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user416@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:19.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:19.437+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 210
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "568"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "568",
      "type": "companies",
      "attributes": {
        "name": "Client357",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.433+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 210
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

PATCH  /api/v2/deals/66/close

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "delivered_on": "2020-08-15"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "66",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-08-11",
      "end_date": null,
      "number": 2,
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "83ced1fd14d328e11ca72d89463074af",
      "purchase_order_number": null,
      "custom_fields": null,
      "forecasted_billable_time": 0,
      "forecasted_margin": 0,
      "forecasted_budget_usage": 0,
      "forecasted_time_usage": 0,
      "budget_usage": 0,
      "future_booked_time": 0,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_remaining_time": 0,
      "unapproved_time": 0,
      "lost_comment": null,
      "closed_at": "2020-08-11T01:04:19.000+02:00",
      "delivered_on": "2020-08-15",
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-08-11T01:04:19.835+02:00",
      "note": null,
      "sales_closed_at": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_billable": 0,
      "expense_billable_default": 0,
      "expense_billable_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0,
      "budget_remaining": 0,
      "budget_remaining_default": 0,
      "budget_remaining_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "future_revenue": 0,
      "future_revenue_default": 0,
      "future_revenue_normalized": 0,
      "future_budget_used": 0,
      "future_budget_used_default": 0,
      "future_budget_used_normalized": 0,
      "future_cost": 0,
      "future_cost_default": 0,
      "future_cost_normalized": 0,
      "forecasted_revenue": 0,
      "forecasted_revenue_default": 0,
      "forecasted_revenue_normalized": 0,
      "forecasted_cost": 0,
      "forecasted_cost_default": 0,
      "forecasted_cost_normalized": 0,
      "forecasted_profit": 0,
      "forecasted_profit_default": 0,
      "forecasted_profit_normalized": 0,
      "forecasted_budget_used": 0,
      "forecasted_budget_used_default": 0,
      "forecasted_budget_used_normalized": 0,
      "invoiced_rate": 0,
      "invoiced_rate_default": 0,
      "invoiced_rate_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 211
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "415"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "573"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "417"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "57"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "415",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user417@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:19.000+02:00",
        "last_seen_at": "2020-08-11T01:04:19.857+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:19.655+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 211
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "570"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "573",
      "type": "companies",
      "attributes": {
        "name": "Client361",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.728+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 211
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "417",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user419@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:19.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:19.743+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 211
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "574"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "57",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "number": 1,
        "project_type_id": 2,
        "project_color_id": null,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 0,
        "budget_count": 0,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "invoice_payment_due": null,
        "custom_fields": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "needs_invoicing": 0,
        "needs_invoicing_default": 0,
        "needs_invoicing_normalized": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 211
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "576"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "418"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "570",
      "type": "companies",
      "attributes": {
        "name": "Organization211",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:19.653+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 211
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "574",
      "type": "companies",
      "attributes": {
        "name": "Client362",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.737+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 211
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "576",
      "type": "companies",
      "attributes": {
        "name": "Client364",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.808+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 211
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "418",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user420@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-08-11T01:04:19.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:19.781+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 211
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "575"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "575",
      "type": "companies",
      "attributes": {
        "name": "Client363",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:19.776+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 211
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Closes a deal
PATCH/api/v2/deals/{id}/close

URI Parameters
HideShow
id
number (required) Example: 1

deal id


Generated by aglio on 10 Aug 2020