API Documentation
Contracts ¶
Contracts ¶
GET /api/v2/contracts
Requests
GET /api/v2/contracts
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
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "1",
"type": "contracts",
"attributes": {
"ends_on": null,
"next_occurrence_on": "2017-02-01",
"interval_id": 1
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
},
"template": {
"data": {
"type": "deals",
"id": "8"
}
}
}
},
{
"id": "2",
"type": "contracts",
"attributes": {
"ends_on": null,
"next_occurrence_on": "2017-02-01",
"interval_id": 1
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
},
"template": {
"data": {
"type": "deals",
"id": "9"
}
}
}
},
{
"id": "3",
"type": "contracts",
"attributes": {
"ends_on": null,
"next_occurrence_on": "2017-02-01",
"interval_id": 1
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
},
"template": {
"data": {
"type": "deals",
"id": "10"
}
}
}
}
],
"included": [
{
"id": "8",
"type": "deals",
"attributes": {
"name": "test name",
"date": "2021-01-24",
"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": "2c6bda61322fa5aa9a919ae589f767ee",
"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": "2021-01-24T00:03:45.073+01:00",
"note": null,
"sales_closed_at": null,
"exchange_rate": "1.25",
"exchange_date": "2017-01-01",
"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": 162
}
},
"creator": {
"data": {
"type": "people",
"id": "383"
}
},
"company": {
"data": {
"type": "companies",
"id": "510"
}
},
"document_type": {
"data": null
},
"responsible": {
"data": {
"type": "people",
"id": "384"
}
},
"deal_status": {
"data": {
"type": "deal_statuses",
"id": "818"
}
},
"project": {
"data": null
},
"lost_reason": {
"data": null
},
"contract": {
"data": null
},
"contact": {
"meta": {
"included": false
}
}
}
},
{
"id": "9",
"type": "deals",
"attributes": {
"name": "test name",
"date": "2017-01-01",
"end_date": null,
"number": 2,
"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": "b251c5c48b5cbb676b56764a3a56e82f",
"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": "2017-01-01T15:00:00.000+01:00",
"note": null,
"sales_closed_at": null,
"exchange_rate": "1.25",
"exchange_date": "2017-01-01",
"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": 162
}
},
"creator": {
"data": {
"type": "people",
"id": "383"
}
},
"company": {
"data": {
"type": "companies",
"id": "512"
}
},
"document_type": {
"data": null
},
"responsible": {
"data": {
"type": "people",
"id": "385"
}
},
"deal_status": {
"data": {
"type": "deal_statuses",
"id": "819"
}
},
"project": {
"data": null
},
"lost_reason": {
"data": null
},
"contract": {
"data": null
},
"contact": {
"meta": {
"included": false
}
}
}
},
{
"id": "10",
"type": "deals",
"attributes": {
"name": "test name",
"date": "2017-01-01",
"end_date": null,
"number": 3,
"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": "a3c01c8405fa5d7a41f7e2206df984e7",
"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": "2017-01-01T15:00:00.000+01:00",
"note": null,
"sales_closed_at": null,
"exchange_rate": "1.25",
"exchange_date": "2017-01-01",
"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": 162
}
},
"creator": {
"data": {
"type": "people",
"id": "383"
}
},
"company": {
"data": {
"type": "companies",
"id": "514"
}
},
"document_type": {
"data": null
},
"responsible": {
"data": {
"type": "people",
"id": "386"
}
},
"deal_status": {
"data": {
"type": "deal_statuses",
"id": "820"
}
},
"project": {
"data": null
},
"lost_reason": {
"data": null
},
"contract": {
"data": null
},
"contact": {
"meta": {
"included": false
}
}
}
},
{
"id": "383",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user384@email.com",
"title": null,
"joined_at": "2017-01-01T15:00:00.000+01:00",
"last_seen_at": "2017-01-01T15:00:00.000+01: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": "2021-01-24T00:03:44.997+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
},
"company": {
"data": {
"type": "companies",
"id": "509"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "510",
"type": "companies",
"attributes": {
"name": "Client347",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2021-01-24T00:03:45.033+01: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": 162
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "384",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user385@email.com",
"title": null,
"joined_at": null,
"last_seen_at": null,
"deactivated_at": null,
"archived_at": null,
"role_id": 3,
"invited_at": "2021-01-24T00:03:45.000+01:00",
"is_user": true,
"tag_list": [],
"avatar_url": null,
"virtual": false,
"custom_fields": null,
"autotracking": false,
"created_at": "2021-01-24T00:03:45.043+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
},
"company": {
"data": {
"type": "companies",
"id": "511"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "818",
"type": "deal_statuses",
"attributes": {
"name": "prospective",
"position": 6,
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
}
}
},
{
"id": "512",
"type": "companies",
"attributes": {
"name": "Client349",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2017-01-01T15:00:00.000+01: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": 162
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "385",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user386@email.com",
"title": null,
"joined_at": null,
"last_seen_at": null,
"deactivated_at": null,
"archived_at": null,
"role_id": 3,
"invited_at": "2017-01-01T15:00:00.000+01:00",
"is_user": true,
"tag_list": [],
"avatar_url": null,
"virtual": false,
"custom_fields": null,
"autotracking": false,
"created_at": "2017-01-01T15:00:00.000+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
},
"company": {
"data": {
"type": "companies",
"id": "513"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "819",
"type": "deal_statuses",
"attributes": {
"name": "prospective",
"position": 7,
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
}
}
},
{
"id": "514",
"type": "companies",
"attributes": {
"name": "Client351",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2017-01-01T15:00:00.000+01: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": 162
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "386",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user387@email.com",
"title": null,
"joined_at": null,
"last_seen_at": null,
"deactivated_at": null,
"archived_at": null,
"role_id": 3,
"invited_at": "2017-01-01T15:00:00.000+01:00",
"is_user": true,
"tag_list": [],
"avatar_url": null,
"virtual": false,
"custom_fields": null,
"autotracking": false,
"created_at": "2017-01-01T15:00:00.000+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
},
"company": {
"data": {
"type": "companies",
"id": "515"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "820",
"type": "deal_statuses",
"attributes": {
"name": "prospective",
"position": 8,
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 162
}
}
}
},
{
"id": "509",
"type": "companies",
"attributes": {
"name": "Organization162",
"billing_name": null,
"vat": null,
"default_currency": "USD",
"created_at": "2021-01-24T00:03:44.996+01: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": 162
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "511",
"type": "companies",
"attributes": {
"name": "Client348",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2021-01-24T00:03:45.040+01: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": 162
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "513",
"type": "companies",
"attributes": {
"name": "Client350",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2017-01-01T15:00:00.000+01: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": 162
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "515",
"type": "companies",
"attributes": {
"name": "Client352",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2017-01-01T15:00:00.000+01: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": 162
}
},
"bill_to": {
"data": null
}
}
}
],
"links": {
"first": "http://www.example.com/api/v2/contracts?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://www.example.com/api/v2/contracts?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 3,
"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": 100,
"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
},
"subtasks": {
"type": "switch",
"available": true
},
"time_calendar_layout": {
"type": "switch",
"available": true
},
"theming": {
"type": "switch",
"available": true
},
"remove_branding": {
"type": "switch",
"available": true
},
"custom_invoicing_email": {
"type": "switch",
"available": true
},
"google_calendar_layout": {
"type": "switch",
"available": true
}
},
"settings": {}
}
}
Get contractsGET/api/v2/contracts
GET /api/v2/contracts/1
Requests
GET /api/v2/contracts/4
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
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "4",
"type": "contracts",
"attributes": {
"ends_on": null,
"next_occurrence_on": "2017-02-01",
"interval_id": 1
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 163
}
},
"template": {
"data": {
"type": "deals",
"id": "11"
}
}
}
},
"included": [
{
"id": "11",
"type": "deals",
"attributes": {
"name": "test name",
"date": "2021-01-24",
"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": "a8a0aba9c1ebde658c97c6d98991cb71",
"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": "2021-01-24T00:03:45.474+01:00",
"note": null,
"sales_closed_at": null,
"exchange_rate": "1.25",
"exchange_date": "2017-01-01",
"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": 163
}
},
"creator": {
"data": {
"type": "people",
"id": "387"
}
},
"company": {
"data": {
"type": "companies",
"id": "517"
}
},
"document_type": {
"data": null
},
"responsible": {
"data": {
"type": "people",
"id": "388"
}
},
"deal_status": {
"data": {
"type": "deal_statuses",
"id": "826"
}
},
"project": {
"data": null
},
"lost_reason": {
"data": null
},
"contract": {
"data": null
},
"contact": {
"meta": {
"included": false
}
}
}
},
{
"id": "387",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user388@email.com",
"title": null,
"joined_at": "2017-01-01T15:00:00.000+01:00",
"last_seen_at": "2017-01-01T15:00:00.000+01: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": "2021-01-24T00:03:45.408+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 163
}
},
"company": {
"data": {
"type": "companies",
"id": "516"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "517",
"type": "companies",
"attributes": {
"name": "Client353",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2021-01-24T00:03:45.429+01: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": 163
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "388",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user389@email.com",
"title": null,
"joined_at": null,
"last_seen_at": null,
"deactivated_at": null,
"archived_at": null,
"role_id": 3,
"invited_at": "2021-01-24T00:03:45.000+01:00",
"is_user": true,
"tag_list": [],
"avatar_url": null,
"virtual": false,
"custom_fields": null,
"autotracking": false,
"created_at": "2021-01-24T00:03:45.439+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 163
}
},
"company": {
"data": {
"type": "companies",
"id": "518"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "826",
"type": "deal_statuses",
"attributes": {
"name": "prospective",
"position": 6,
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 163
}
}
}
},
{
"id": "516",
"type": "companies",
"attributes": {
"name": "Organization163",
"billing_name": null,
"vat": null,
"default_currency": "USD",
"created_at": "2021-01-24T00:03:45.407+01: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": 163
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "518",
"type": "companies",
"attributes": {
"name": "Client354",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2021-01-24T00:03:45.435+01: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": 163
}
},
"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": 100,
"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
},
"subtasks": {
"type": "switch",
"available": true
},
"time_calendar_layout": {
"type": "switch",
"available": true
},
"theming": {
"type": "switch",
"available": true
},
"remove_branding": {
"type": "switch",
"available": true
},
"custom_invoicing_email": {
"type": "switch",
"available": true
},
"google_calendar_layout": {
"type": "switch",
"available": true
}
},
"settings": {}
}
}
POST /api/v2/contracts
Requests
POST /api/v2/contracts
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": "contracts",
"attributes": {
"interval_id": 1,
"next_occurrence_on": "01.02.2017"
},
"relationships": {
"template": {
"data": {
"type": "deals",
"id": "13"
}
}
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "6",
"type": "contracts",
"attributes": {
"ends_on": null,
"next_occurrence_on": "2017-02-01",
"interval_id": 1
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 164
}
},
"template": {
"data": {
"type": "deals",
"id": "13"
}
}
}
},
"included": [
{
"id": "13",
"type": "deals",
"attributes": {
"name": "test name",
"date": "2017-01-01",
"end_date": "2017-01-31",
"number": 2,
"suffix": "2017/01",
"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": "113f821e2de45c3fd03b521c479955bf",
"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": "2017-01-01T15:00:00.000+01:00",
"note": null,
"sales_closed_at": null,
"exchange_rate": "1.25",
"exchange_date": "2017-01-01",
"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": 164
}
},
"creator": {
"data": {
"type": "people",
"id": "389"
}
},
"company": {
"data": {
"type": "companies",
"id": "522"
}
},
"document_type": {
"data": null
},
"responsible": {
"data": {
"type": "people",
"id": "391"
}
},
"deal_status": {
"data": null
},
"project": {
"data": {
"type": "projects",
"id": "72"
}
},
"lost_reason": {
"data": null
},
"contract": {
"data": {
"type": "contracts",
"id": "6"
}
},
"contact": {
"meta": {
"included": false
}
}
}
},
{
"id": "389",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user390@email.com",
"title": null,
"joined_at": "2017-01-01T15:00:00.000+01:00",
"last_seen_at": "2017-01-01T15:00:00.000+01: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": "2021-01-24T00:03:45.591+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 164
}
},
"company": {
"data": {
"type": "companies",
"id": "519"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "522",
"type": "companies",
"attributes": {
"name": "Client357",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2017-01-01T15:00:00.000+01: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": 164
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "391",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user392@email.com",
"title": null,
"joined_at": null,
"last_seen_at": null,
"deactivated_at": null,
"archived_at": null,
"role_id": 3,
"invited_at": "2017-01-01T15:00:00.000+01:00",
"is_user": true,
"tag_list": [],
"avatar_url": null,
"virtual": false,
"custom_fields": null,
"autotracking": false,
"created_at": "2017-01-01T15:00:00.000+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 164
}
},
"company": {
"data": {
"type": "companies",
"id": "523"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "72",
"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,
"created_at": "2017-01-01T15:00:00.000+01:00",
"board_count": 0,
"budget_count": 1,
"worked_time": 0,
"estimated_time": 0,
"profit_margin": 0,
"budget_closing_date": "2017-01-31",
"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": 164
}
},
"company": {
"data": {
"type": "companies",
"id": "525"
}
},
"project_manager": {
"data": {
"type": "people",
"id": "392"
}
},
"last_actor": {
"data": null
}
}
},
{
"id": "519",
"type": "companies",
"attributes": {
"name": "Organization164",
"billing_name": null,
"vat": null,
"default_currency": "USD",
"created_at": "2021-01-24T00:03:45.589+01: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": 164
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "523",
"type": "companies",
"attributes": {
"name": "Client358",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2017-01-01T15:00:00.000+01: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": 164
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "525",
"type": "companies",
"attributes": {
"name": "Client360",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2017-01-01T15:00:00.000+01: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": 164
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "392",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user393@email.com",
"title": null,
"joined_at": null,
"last_seen_at": null,
"deactivated_at": null,
"archived_at": null,
"role_id": 3,
"invited_at": "2017-01-01T15:00:00.000+01:00",
"is_user": true,
"tag_list": [],
"avatar_url": null,
"virtual": false,
"custom_fields": null,
"autotracking": false,
"created_at": "2017-01-01T15:00:00.000+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 164
}
},
"company": {
"data": {
"type": "companies",
"id": "524"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "524",
"type": "companies",
"attributes": {
"name": "Client359",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2017-01-01T15:00:00.000+01: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": 164
}
},
"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": 100,
"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
},
"subtasks": {
"type": "switch",
"available": true
},
"time_calendar_layout": {
"type": "switch",
"available": true
},
"theming": {
"type": "switch",
"available": true
},
"remove_branding": {
"type": "switch",
"available": true
},
"custom_invoicing_email": {
"type": "switch",
"available": true
},
"google_calendar_layout": {
"type": "switch",
"available": true
}
},
"settings": {}
}
}
POST /api/v2/contracts
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": "contracts",
"attributes": {
"interval_id": 1,
"next_occurrence_on": "2017-02-01"
},
"relationships": {
"template": {
"data": {
"type": "deals",
"id": "0"
}
}
}
}
}
Responses
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/template"
}
}
]
}
Create a contractPOST/api/v2/contracts
PATCH /api/v2/contracts/1
Requests
PATCH /api/v2/contracts/10
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": "contracts",
"attributes": {
"ends_on": "31.12.2017"
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "10",
"type": "contracts",
"attributes": {
"ends_on": "2017-12-31",
"next_occurrence_on": "2017-02-01",
"interval_id": 1
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 168
}
},
"template": {
"data": {
"type": "deals",
"id": "18"
}
}
}
},
"included": [
{
"id": "18",
"type": "deals",
"attributes": {
"name": "test name",
"date": "2021-01-24",
"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": "ffb2f7a703fe88e756485fba2e739785",
"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": "2021-01-24T00:03:46.457+01:00",
"note": null,
"sales_closed_at": null,
"exchange_rate": "1.25",
"exchange_date": "2017-01-01",
"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": 168
}
},
"creator": {
"data": {
"type": "people",
"id": "400"
}
},
"company": {
"data": {
"type": "companies",
"id": "538"
}
},
"document_type": {
"data": null
},
"responsible": {
"data": {
"type": "people",
"id": "401"
}
},
"deal_status": {
"data": {
"type": "deal_statuses",
"id": "857"
}
},
"project": {
"data": null
},
"lost_reason": {
"data": null
},
"contract": {
"data": null
},
"contact": {
"meta": {
"included": false
}
}
}
},
{
"id": "400",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user401@email.com",
"title": null,
"joined_at": "2017-01-01T15:00:00.000+01:00",
"last_seen_at": "2017-01-01T15:00:00.000+01: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": "2021-01-24T00:03:46.396+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 168
}
},
"company": {
"data": {
"type": "companies",
"id": "537"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "538",
"type": "companies",
"attributes": {
"name": "Client369",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2021-01-24T00:03:46.417+01: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": 168
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "401",
"type": "people",
"attributes": {
"first_name": "test first name",
"last_name": "test last name",
"email": "user402@email.com",
"title": null,
"joined_at": null,
"last_seen_at": null,
"deactivated_at": null,
"archived_at": null,
"role_id": 3,
"invited_at": "2021-01-24T00:03:46.000+01:00",
"is_user": true,
"tag_list": [],
"avatar_url": null,
"virtual": false,
"custom_fields": null,
"autotracking": false,
"created_at": "2021-01-24T00:03:46.426+01:00",
"placeholder": false,
"color_id": null,
"private_custom_reports_used": 0,
"contact": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 168
}
},
"company": {
"data": {
"type": "companies",
"id": "539"
}
},
"subsidiary": {
"data": null
}
}
},
{
"id": "857",
"type": "deal_statuses",
"attributes": {
"name": "prospective",
"position": 6,
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": 168
}
}
}
},
{
"id": "537",
"type": "companies",
"attributes": {
"name": "Organization168",
"billing_name": null,
"vat": null,
"default_currency": "USD",
"created_at": "2021-01-24T00:03:46.394+01: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": 168
}
},
"bill_to": {
"data": null
}
}
},
{
"id": "539",
"type": "companies",
"attributes": {
"name": "Client370",
"billing_name": null,
"vat": null,
"default_currency": null,
"created_at": "2021-01-24T00:03:46.423+01: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": 168
}
},
"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": 100,
"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
},
"subtasks": {
"type": "switch",
"available": true
},
"time_calendar_layout": {
"type": "switch",
"available": true
},
"theming": {
"type": "switch",
"available": true
},
"remove_branding": {
"type": "switch",
"available": true
},
"custom_invoicing_email": {
"type": "switch",
"available": true
},
"google_calendar_layout": {
"type": "switch",
"available": true
}
},
"settings": {}
}
}
PATCH /api/v2/contracts/11
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": "contracts",
"attributes": {
"next_occurrence_on": "2016-12-29"
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "must be after today",
"source": {
"pointer": "data/attributes/next_occurrence_on"
}
}
]
}
Generated by aglio on 23 Jan 2021