API Documentation

API Endpoint

Contracts

Contracts

GET /api/v2/contracts
Requestsreturns contracts

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
Responses200
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": 158
          }
        },
        "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": 158
          }
        },
        "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": 158
          }
        },
        "template": {
          "data": {
            "type": "deals",
            "id": "10"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "8",
      "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": "61a95551c3f809961a97ec3236072900",
        "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:05.582+02: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": 158
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "370"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "497"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "371"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "798"
          }
        },
        "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": "011b7c8543bb94658c68086e8d107f3b",
        "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": 158
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "370"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "499"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "372"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "799"
          }
        },
        "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": "ad80a8b5935842cf903baaccd6528912",
        "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": 158
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "370"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "501"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "373"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "800"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        },
        "contact": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "370",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user371@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": "2020-10-21T01:04:05.471+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 158
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "496"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "497",
      "type": "companies",
      "attributes": {
        "name": "Client338",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:05.525+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": 158
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "371",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user372@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:05.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:05.544+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 158
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "498"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "798",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 158
          }
        }
      }
    },
    {
      "id": "499",
      "type": "companies",
      "attributes": {
        "name": "Client340",
        "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": 158
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "372",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user373@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
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 158
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "500"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "799",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 7,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 158
          }
        }
      }
    },
    {
      "id": "501",
      "type": "companies",
      "attributes": {
        "name": "Client342",
        "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": 158
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "373",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user374@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "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
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 158
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "502"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "800",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 8,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 158
          }
        }
      }
    },
    {
      "id": "496",
      "type": "companies",
      "attributes": {
        "name": "Organization158",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:05.469+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": 158
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "498",
      "type": "companies",
      "attributes": {
        "name": "Client339",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:05.536+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": 158
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "500",
      "type": "companies",
      "attributes": {
        "name": "Client341",
        "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": 158
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "502",
      "type": "companies",
      "attributes": {
        "name": "Client343",
        "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": 158
          }
        },
        "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": 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 contracts
GET/api/v2/contracts


GET /api/v2/contracts/1
Requestsreturns contract

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
Responses200
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": 159
        }
      },
      "template": {
        "data": {
          "type": "deals",
          "id": "11"
        }
      }
    }
  },
  "included": [
    {
      "id": "11",
      "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": "805105de4b43a263682dd9e671bde130",
        "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:06.073+02: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": 159
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "374"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "504"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "375"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "806"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        },
        "contact": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "374",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user375@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": "2020-10-21T01:04:06.004+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 159
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "503"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "504",
      "type": "companies",
      "attributes": {
        "name": "Client344",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:06.023+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": 159
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "375",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user376@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:06.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:06.036+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 159
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "505"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "806",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 159
          }
        }
      }
    },
    {
      "id": "503",
      "type": "companies",
      "attributes": {
        "name": "Organization159",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:06.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": 159
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "505",
      "type": "companies",
      "attributes": {
        "name": "Client345",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:06.032+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": 159
          }
        },
        "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 contract
GET/api/v2/contracts/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contract id


POST /api/v2/contracts
Requestscreates contract and starts recurringreturns error

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"
        }
      }
    }
  }
}
Responses201
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": 160
        }
      },
      "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": "3c984a6d3cfb7efbc6921881501a3c7a",
        "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": 160
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "376"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "509"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "378"
          }
        },
        "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": "376",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user377@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": "2020-10-21T01:04:06.230+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 160
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "506"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "509",
      "type": "companies",
      "attributes": {
        "name": "Client348",
        "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": 160
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "378",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user379@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
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 160
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "510"
          }
        },
        "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,
        "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": 160
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "512"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "379"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "506",
      "type": "companies",
      "attributes": {
        "name": "Organization160",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:06.228+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": 160
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "510",
      "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": 160
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "512",
      "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": 160
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "379",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user380@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
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 160
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "511"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "511",
      "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": 160
          }
        },
        "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/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"
        }
      }
    }
  }
}
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/template"
      }
    }
  ]
}

Create a contract
POST/api/v2/contracts


PATCH /api/v2/contracts/1
Requestsupdates contractreturns error

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"
    }
  }
}
Responses200
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": 164
        }
      },
      "template": {
        "data": {
          "type": "deals",
          "id": "18"
        }
      }
    }
  },
  "included": [
    {
      "id": "18",
      "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": "7874ad276ca712ad48677e81db9e8c0e",
        "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:07.331+02: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": "387"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "525"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "388"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "837"
          }
        },
        "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": "2020-10-21T01:04:07.255+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 164
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "524"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "525",
      "type": "companies",
      "attributes": {
        "name": "Client360",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:07.279+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": 164
          }
        },
        "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": "2020-10-21T01:04:07.000+02:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-10-21T01:04:07.292+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 164
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "526"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "837",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 164
          }
        }
      }
    },
    {
      "id": "524",
      "type": "companies",
      "attributes": {
        "name": "Organization164",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2020-10-21T01:04:07.253+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": 164
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "526",
      "type": "companies",
      "attributes": {
        "name": "Client361",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2020-10-21T01:04:07.287+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": 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": 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/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"
    }
  }
}
Responses422
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"
      }
    }
  ]
}

Update a contract
PATCH/api/v2/contracts/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contract id


Generated by aglio on 20 Oct 2020