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": "27",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2020-10-21",
        "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": "41039dd92f014b63bf039c6053a9ea37",
        "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-10-21T01:04:12.844+02:00",
        "note": null,
        "sales_closed_at": null,
        "exchange_rate": "1.25",
        "exchange_date": "2020-10-21",
        "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": 205
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "450"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "600"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "451"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "1059"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        },
        "contact": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "450",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user451@email.com",
        "title": null,
        "joined_at": "2020-10-21T01:04:12.000+02:00",
        "last_seen_at": "2020-10-21T01:04:12.864+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-10-21T01:04:12.784+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 205
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "599"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "600",
      "type": "companies",
      "attributes": {
        "name": "Client394",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:12.805+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 205
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "451",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user452@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:12.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:12.816+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 205
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "601"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1059",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 205
          }
        }
      }
    },
    {
      "id": "599",
      "type": "companies",
      "attributes": {
        "name": "Organization205",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:12.782+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 205
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "601",
      "type": "companies",
      "attributes": {
        "name": "Client395",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:12.812+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 205
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Get deals
GET/api/v2/deals


GET /api/v2/deals/1
Requestsreturns deal

GET  /api/v2/deals/28

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-10-21",
      "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": "e0614b644c5989a326a42fd90da250a6",
      "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-10-21T01:04:13.038+02:00",
      "note": null,
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2020-10-21",
      "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": 206
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "452"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "603"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "453"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "1065"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "452",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user453@email.com",
        "title": null,
        "joined_at": "2020-10-21T01:04:13.000+02:00",
        "last_seen_at": "2020-10-21T01:04:13.060+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-10-21T01:04:12.952+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 206
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "602"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "603",
      "type": "companies",
      "attributes": {
        "name": "Client396",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:12.972+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 206
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "453",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user454@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:12.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:12.993+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 206
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "604"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1065",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 206
          }
        }
      }
    },
    {
      "id": "602",
      "type": "companies",
      "attributes": {
        "name": "Organization206",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:12.951+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 206
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "604",
      "type": "companies",
      "attributes": {
        "name": "Client397",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:12.985+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 206
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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-10-21",
      "deal_type_id": 2,
      "deal_status_id": 1083,
      "sales_status_id": 1,
      "probability": 50,
      "currency": "EUR"
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "614"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "462"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "32",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-10-21",
      "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-10-21T01:04:13.000+02:00",
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "b86999132347c5afd35b7c95e7e6b70b",
      "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-10-21T01:04:13.741+02:00",
      "note": null,
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2020-10-21",
      "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": "460"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "614"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "462"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "1083"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "460",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user461@email.com",
        "title": null,
        "joined_at": "2020-10-21T01:04:13.000+02:00",
        "last_seen_at": "2020-10-21T01:04:13.713+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-10-21T01:04:13.586+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "613"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "614",
      "type": "companies",
      "attributes": {
        "name": "Client404",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:13.603+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "462",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user463@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 2,
        "invited_at": "2020-10-21T01:04:13.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:13.677+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "616"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1083",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        }
      }
    },
    {
      "id": "613",
      "type": "companies",
      "attributes": {
        "name": "Organization209",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:13.584+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 209
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "616",
      "type": "companies",
      "attributes": {
        "name": "Client406",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:13.671+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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/35

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": "469"
        }
      },
      "subscribers": {
        "data": [
          {
            "type": "people",
            "id": "470"
          },
          {
            "type": "people",
            "id": "471"
          }
        ]
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "35",
    "type": "deals",
    "attributes": {
      "name": "new name",
      "date": "2020-10-21",
      "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-10-21T01:04:14.000+02:00",
      "tag_list": [
        "invoiced",
        "paid"
      ],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "b601e9023fa8f99455a66ed02ef557e8",
      "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-10-21T01:04:14.230+02:00",
      "note": null,
      "sales_closed_at": "2020-10-21T01:04:14.000+02:00",
      "exchange_rate": "1.25",
      "exchange_date": "2020-10-21",
      "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": 212
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "467"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "624"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "469"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "1101"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "467",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user468@email.com",
        "title": null,
        "joined_at": "2020-10-21T01:04:14.000+02:00",
        "last_seen_at": "2020-10-21T01:04:14.351+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-10-21T01:04:14.164+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 212
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "623"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "624",
      "type": "companies",
      "attributes": {
        "name": "Client411",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:14.182+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 212
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "469",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user470@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 2,
        "invited_at": "2020-10-21T01:04:14.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:14.253+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 212
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "626"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1101",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 212
          }
        }
      }
    },
    {
      "id": "623",
      "type": "companies",
      "attributes": {
        "name": "Organization212",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:14.162+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 212
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "626",
      "type": "companies",
      "attributes": {
        "name": "Client413",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:14.248+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 212
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      }
    }
  }
}

PATCH  /api/v2/deals/37

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-10-25"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "37",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-10-21",
      "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": "c942418980e36fd0ccaa6b143a122aa4",
      "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-10-21T01:04:14.000+02:00",
      "delivered_on": "2020-10-25",
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-10-21T01:04:14.709+02:00",
      "note": null,
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2020-10-21",
      "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": 213
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "472"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "632"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "474"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "76"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "472",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user473@email.com",
        "title": null,
        "joined_at": "2020-10-21T01:04:14.000+02:00",
        "last_seen_at": "2020-10-21T01:04:14.730+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-10-21T01:04:14.520+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 213
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "629"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "632",
      "type": "companies",
      "attributes": {
        "name": "Client418",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:14.600+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 213
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "474",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user475@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:14.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:14.613+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 213
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "633"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "76",
      "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": 213
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "635"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "475"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "629",
      "type": "companies",
      "attributes": {
        "name": "Organization213",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:14.519+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 213
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "633",
      "type": "companies",
      "attributes": {
        "name": "Client419",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:14.608+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 213
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "635",
      "type": "companies",
      "attributes": {
        "name": "Client421",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:14.682+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 213
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "475",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user476@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:14.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:14.657+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 213
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "634"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "634",
      "type": "companies",
      "attributes": {
        "name": "Client420",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:14.652+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 213
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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": {
      "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/40

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-10-25"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "40",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-10-21",
      "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": "54c3d599452976029de0d8e43ba4bea3",
      "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-10-21T01:04:15.211+02:00",
      "note": null,
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2020-10-21",
      "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": 215
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "478"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "642"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "480"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "77"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "478",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user479@email.com",
        "title": null,
        "joined_at": "2020-10-21T01:04:15.000+02:00",
        "last_seen_at": "2020-10-21T01:04:15.235+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-10-21T01:04:15.040+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 215
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "639"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "642",
      "type": "companies",
      "attributes": {
        "name": "Client426",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:15.116+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 215
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "480",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user481@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:15.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:15.129+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 215
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "643"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "77",
      "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": 215
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "645"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "481"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "639",
      "type": "companies",
      "attributes": {
        "name": "Organization215",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:15.038+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 215
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "643",
      "type": "companies",
      "attributes": {
        "name": "Client427",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:15.124+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 215
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "645",
      "type": "companies",
      "attributes": {
        "name": "Client429",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:15.183+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 215
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "481",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user482@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:15.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:15.160+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 215
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "644"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "644",
      "type": "companies",
      "attributes": {
        "name": "Client428",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:15.156+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 215
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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/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
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/61/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": "61",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-10-21",
      "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": "9e207073ab9957fcebf5cc33c9b57414",
      "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-10-21T01:04:18.495+02:00",
      "note": null,
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2020-10-21",
      "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": 226
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "515"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "701"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "517"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "84"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "515",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user516@email.com",
        "title": null,
        "joined_at": "2020-10-21T01:04:18.000+02:00",
        "last_seen_at": "2020-10-21T01:04:18.512+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-10-21T01:04:18.357+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 226
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "698"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "701",
      "type": "companies",
      "attributes": {
        "name": "Client474",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:18.420+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 226
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "517",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user518@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:18.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:18.431+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 226
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "702"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "84",
      "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": 226
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "704"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "518"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "698",
      "type": "companies",
      "attributes": {
        "name": "Organization226",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:18.355+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 226
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "702",
      "type": "companies",
      "attributes": {
        "name": "Client475",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:18.427+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 226
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "704",
      "type": "companies",
      "attributes": {
        "name": "Client477",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:18.474+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 226
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "518",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user519@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:18.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:18.456+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 226
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "703"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "703",
      "type": "companies",
      "attributes": {
        "name": "Client476",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:18.452+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 226
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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/63/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": "63",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-10-21",
      "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": "ece32a3f20b42d651ed87ddae5b7ca7a",
      "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-10-21T01:04:18.000+02:00",
      "delivered_on": "2020-10-21",
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-10-21T01:04:18.757+02:00",
      "note": null,
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2020-10-21",
      "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": 227
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "519"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "708"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "521"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "85"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "519",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user520@email.com",
        "title": null,
        "joined_at": "2020-10-21T01:04:18.000+02:00",
        "last_seen_at": "2020-10-21T01:04:18.782+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-10-21T01:04:18.628+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 227
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "705"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "708",
      "type": "companies",
      "attributes": {
        "name": "Client480",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:18.685+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 227
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "521",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user522@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:18.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:18.695+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 227
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "709"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "85",
      "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": 227
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "711"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "522"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "705",
      "type": "companies",
      "attributes": {
        "name": "Organization227",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:18.627+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 227
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "709",
      "type": "companies",
      "attributes": {
        "name": "Client481",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:18.691+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 227
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "711",
      "type": "companies",
      "attributes": {
        "name": "Client483",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:18.736+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 227
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "522",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user523@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:18.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:18.719+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 227
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "710"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "710",
      "type": "companies",
      "attributes": {
        "name": "Client482",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:18.716+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 227
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      }
    }
  }
}

PATCH  /api/v2/deals/65/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-10-25"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "65",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2020-10-21",
      "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": "e5d627fe9131be2585c1c9a18c4d21d9",
      "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-10-21T01:04:19.000+02:00",
      "delivered_on": "2020-10-25",
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2020-10-21T01:04:19.089+02:00",
      "note": null,
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2020-10-21",
      "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": 228
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "523"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "715"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "525"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "86"
        }
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      },
      "contact": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "523",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user524@email.com",
        "title": null,
        "joined_at": "2020-10-21T01:04:19.000+02:00",
        "last_seen_at": "2020-10-21T01:04:19.111+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-10-21T01:04:18.935+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 228
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "712"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "715",
      "type": "companies",
      "attributes": {
        "name": "Client486",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:19.002+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 228
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "525",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user526@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:19.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:19.015+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 228
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "716"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "86",
      "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": 228
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "718"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "526"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "712",
      "type": "companies",
      "attributes": {
        "name": "Organization228",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:18.933+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 228
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "716",
      "type": "companies",
      "attributes": {
        "name": "Client487",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:19.010+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 228
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "718",
      "type": "companies",
      "attributes": {
        "name": "Client489",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:19.066+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 228
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "526",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user527@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2020-10-21T01:04:19.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:19.046+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 228
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "717"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "717",
      "type": "companies",
      "attributes": {
        "name": "Client488",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:19.041+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 228
          }
        },
        "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
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "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 20 Oct 2020