API Documentation

API Endpoint

Deals

Deals

Supported filter params

  • id

  • number

  • responsible_id (array)

  • creator_id (array)

  • company_id (array)

  • status_id (array)

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

  • stage_status_id (array) (1: open, 2: won, 3: lost, 4: delivered)

  • contract_id (array)

  • recurring

  • project_id (array)

  • tags

  • query

  • after

  • before

  • won_date

  • lost_date

  • closed_after

  • closed_before

  • needs_invoicing

  • type (1: deal, 2: budget)

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

  • budget_status (1: open, 2: closed)

  • date_after

  • date_before

  • subsidiary_id (array)

  • pipeline_id (array)

  • custom_fields[id] (where id is the identifier of your custom field; for dropdown and multiselect custom fields, use array filter)

Supported sort params

  • billable_time

  • budget_total

  • budget_used

  • budget_warning

  • budgeted_time

  • client_access

  • closed_at

  • company.name

  • cost

  • created_at

  • date

  • deal_status

  • end_date

  • estimated_time

  • expense

  • invoiced

  • last_activity_at

  • name

  • number

  • pending_invoicing

  • probability

  • profit

  • profit_margin

  • project.name

  • purchase_order_number

  • responsible.name

  • creator.name

  • revenue

  • sales_status_id

  • stage_status

  • services_revenue

  • suffix

  • time_approval

  • total_budgeted_time

  • worked_time

Filter operations are supported on this endpoint.

GET /api/v2/deals
Requestsreturns deals

GET  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "176",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2024-04-20",
        "end_date": null,
        "number": "1",
        "deal_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,
        "email_key": "10d4b308f49cd6b5614f28cbf98510d2",
        "purchase_order_number": null,
        "custom_fields": null,
        "position": 1,
        "service_type_restricted_tracking": false,
        "tracking_type_id": 1,
        "editor_config": {},
        "discount": null,
        "man_day_minutes": null,
        "rounding_interval_id": null,
        "rounding_method_id": null,
        "billable_time": 0,
        "budget_warning": null,
        "unapproved_entries_count": 0,
        "rejected_entries_count": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "probability": 50,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "note": null,
        "lost_comment": null,
        "closed_at": null,
        "delivered_on": null,
        "last_activity_at": "2024-04-20T06:04:01.000+02:00",
        "deleted_at": null,
        "created_at": "2024-04-20T06:04:01.101+02:00",
        "sales_closed_at": null,
        "exchange_rate": "1.25",
        "exchange_date": "2024-04-20",
        "sales_closed_on": null,
        "sample_data": false,
        "external_id": null,
        "external_sync": false,
        "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,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "projected_revenue": 0,
        "projected_revenue_default": 0,
        "projected_revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "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,
        "draft_invoiced": 0,
        "draft_invoiced_default": 0,
        "draft_invoiced_normalized": 0,
        "amount_credited": 0,
        "amount_credited_default": 0,
        "amount_credited_normalized": 0,
        "expense": 0,
        "expense_default": 0,
        "expense_normalized": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "317"
          }
        },
        "creator": {
          "meta": {
            "included": false
          }
        },
        "company": {
          "meta": {
            "included": false
          }
        },
        "document_type": {
          "meta": {
            "included": false
          }
        },
        "responsible": {
          "meta": {
            "included": false
          }
        },
        "deal_status": {
          "meta": {
            "included": false
          }
        },
        "project": {
          "meta": {
            "included": false
          }
        },
        "lost_reason": {
          "meta": {
            "included": false
          }
        },
        "contract": {
          "meta": {
            "included": false
          }
        },
        "contact": {
          "meta": {
            "included": false
          }
        },
        "subsidiary": {
          "meta": {
            "included": false
          }
        },
        "template": {
          "meta": {
            "included": false
          }
        },
        "tax_rate": {
          "meta": {
            "included": false
          }
        },
        "custom_field_people": {
          "meta": {
            "included": false
          }
        },
        "memberships": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://api-test.productive.io/api/v2/deals?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://api-test.productive.io/api/v2/deals?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get deals
GET/api/v2/deals


GET /api/v2/deals/1
Requestsreturns deal

GET  /api/v2/deals/177

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": "177",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "1",
      "deal_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,
      "email_key": "7bfdd79e379c6eb8c197f9ccdf0d4d8b",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:01.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:01.311+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "318"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

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

URI Parameters
HideShow
id
number (required) Example: 1

deal id


POST /api/v2/deals
Requestscreates dealreturns errorreturns errorcreates dealcreates dealcreates budget

POST  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "deal_type_id": 2,
      "deal_status_id": 1713,
      "sales_status_id": 1,
      "probability": 50,
      "currency": "EUR"
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "757"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "1048"
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "14"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "181",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": false,
      "expense_approval": false,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 1,
      "sales_status_updated_at": "2024-04-20T06:04:02.000+02:00",
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "097cb2bde5ca862aa49dc052c4f1ce4b",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:02.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:02.371+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "321"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/responsible"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/company"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/deal_type_id"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/deal_type_id"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/probability"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/currency"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not an valid currency",
      "source": {
        "pointer": "data/attributes/currency"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/deal_status"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/sales_status_id"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/sales_status_id"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/date"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not a date",
      "source": {
        "pointer": "data/attributes/date"
      }
    }
  ]
}

POST  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "",
      "deal_type_id": 2,
      "deal_status_id": 1737,
      "sales_status_id": 1,
      "probability": 50,
      "currency": "EUR"
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "765"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "1059"
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "18"
        }
      }
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/date"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not a date",
      "source": {
        "pointer": "data/attributes/date"
      }
    }
  ]
}

POST  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "deal_type_id": 2,
      "deal_status_id": 1749,
      "sales_status_id": 1,
      "probability": 50,
      "currency": "EUR",
      "custom_fields": {
        "19": "test"
      }
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "769"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "1062"
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "20"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "190",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": false,
      "expense_approval": false,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 1,
      "sales_status_updated_at": "2024-04-20T06:04:04.000+02:00",
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "5ebfc0c97e5ef6cb0d8225b48bb5e157",
      "purchase_order_number": null,
      "custom_fields": {
        "19": "test"
      },
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:04.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:04.259+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "327"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "deal_type_id": 2,
      "deal_status_id": 1755,
      "sales_status_id": 1,
      "probability": 50,
      "currency": "EUR",
      "custom_fields": {
        "20": "test"
      }
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "771"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "1064"
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "21"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "192",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": false,
      "expense_approval": false,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 1,
      "sales_status_updated_at": "2024-04-20T06:04:04.000+02:00",
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "f9bb5b38acf794dd97842bdf92ce72e6",
      "purchase_order_number": null,
      "custom_fields": {
        "20": "test"
      },
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:04.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:04.553+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "328"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "deal_type_id": 2,
      "currency": "EUR"
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "774"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "1068"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "210"
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "22"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "194",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": false,
      "expense_approval": false,
      "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,
      "email_key": "dd3a9382cd2859835b6ab78d173f5c01",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:05.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:05.114+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "329"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Create a deal
POST/api/v2/deals

URI Parameters
HideShow
name
string (required) Example: Name

name

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

date

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

deal type

probability
number (required) Example: 100

probability

currency
currency (required) Example: EUR

currency

deal_status
number (required) Example: 1

deal status

sales_status
number (required) Example: 1

sales status


PATCH /api/v2/deals/1
Requestsupdates dealupdates budgetreturns errorupdates budgetupdates dealsets stage_status_id value to sales_status_idupdates dealupdates deal

PATCH  /api/v2/deals/195

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "new name",
      "tag_list": [
        "invoiced",
        "paid"
      ],
      "sales_status_id": 2,
      "tracking_type_id": 3
    },
    "relationships": {
      "responsible": {
        "data": {
          "type": "people",
          "id": "1072"
        }
      },
      "subscribers": {
        "data": [
          {
            "type": "people",
            "id": "1073"
          },
          {
            "type": "people",
            "id": "1074"
          }
        ]
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "195",
    "type": "deals",
    "attributes": {
      "name": "new name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "1",
      "deal_number": "1",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 2,
      "sales_status_updated_at": "2024-04-20T06:04:05.000+02:00",
      "tag_list": [
        "invoiced",
        "paid"
      ],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "e3a26ca56e881d0810990078003869a3",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 3,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": 0,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:05.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:05.402+02:00",
      "sales_closed_at": "2024-04-20T06:04:05.000+02:00",
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": "2024-04-20",
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "330"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/deals/200

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "delivered_on": "2024-04-24"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "200",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "f59e2fdc8a7ed9a0e0b42e1ed509eb1a",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": "2024-04-20T06:04:07.000+02:00",
      "delivered_on": "2024-04-24",
      "last_activity_at": "2024-04-20T06:04:07.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:07.389+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "333"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/deals/201

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

PATCH  /api/v2/deals/203

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "delivered_on": "2024-04-24"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "203",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "50f71044378938fda046458a4d0f13bb",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:08.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:08.074+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "335"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/deals/204

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "deal_status_id": "1804"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "204",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "1",
      "deal_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,
      "email_key": "72aa61eeea750ebdd5c463225d37e2d6",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:08.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:08.387+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "336"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/deals/205

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "deal_status_id": "1811"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "205",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "1",
      "deal_number": "1",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 2,
      "sales_status_updated_at": "2024-04-20T06:04:08.000+02:00",
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "d3c0d888e8075b83259b6f5b0abd7b1a",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": 0,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:08.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:08.709+02:00",
      "sales_closed_at": "2024-04-20T06:04:08.000+02:00",
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "337"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/deals/206

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "probability": 90
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "206",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "1",
      "deal_number": "1",
      "suffix": null,
      "time_approval": true,
      "expense_approval": false,
      "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,
      "email_key": "098c99910d99297f3a932f97b935e565",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 90,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:09.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:09.092+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": "123",
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "338"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/deals/207

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "note": "Meh"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "207",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "1",
      "deal_number": "1",
      "suffix": null,
      "time_approval": true,
      "expense_approval": false,
      "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,
      "email_key": "2250e72c703704480626cfa02ef3601e",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": "Meh",
      "todo_count": 0,
      "todo_due_date": null,
      "note": "Meh",
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:09.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:09.889+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": "123",
      "external_sync": true,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "339"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

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

URI Parameters
HideShow
id
number (required) Example: 1

deal id


DELETE /api/v2/deals/1
Requestsdeletes deal

DELETE  /api/v2/deals/208

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

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

URI Parameters
HideShow
id
number (required) Example: 1

deal id


POST /api/v2/deals/create_from_origin
Requestscreates budget from origininvokes Automations::Budgets::Scheduler.schedulecreates budgetcreates budgetcreates budgetcreates budgetcreates budgetreturns errorreturns errorreturns errorcreates budget from origincreates budget from origin

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "213"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "215"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "215",
    "type": "deals",
    "attributes": {
      "name": "test from origin",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": 213,
      "profit_margin": "100.0",
      "email_key": "f81ee448252cfb6338bf7c16a7463535",
      "purchase_order_number": "abc",
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:11.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:11.898+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 200000,
      "revenue_default": 250000,
      "revenue_normalized": 200000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 200000,
      "budget_total_default": 250000,
      "budget_total_normalized": 200000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 200000,
      "profit_default": 250000,
      "profit_normalized": 200000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 200000,
      "pending_invoicing_default": 250000,
      "pending_invoicing_normalized": 200000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "343"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "217"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "216"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "219",
    "type": "deals",
    "attributes": {
      "name": "test from origin",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": 217,
      "profit_margin": "100.0",
      "email_key": "a79ca3a390d6b6ef102e376f882528c2",
      "purchase_order_number": "abc",
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:12.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:12.843+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 200000,
      "revenue_default": 250000,
      "revenue_normalized": 200000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 200000,
      "budget_total_default": 250000,
      "budget_total_normalized": 200000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 200000,
      "profit_default": 250000,
      "profit_normalized": 200000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 200000,
      "pending_invoicing_default": 250000,
      "pending_invoicing_normalized": 200000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "344"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "221"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "217"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "223",
    "type": "deals",
    "attributes": {
      "name": "test from origin",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": 221,
      "profit_margin": "100.0",
      "email_key": "a98efab618a0998a80ed923b2a856c8a",
      "purchase_order_number": "abc",
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:13.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:13.870+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 200000,
      "revenue_default": 250000,
      "revenue_normalized": 200000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 200000,
      "budget_total_default": 250000,
      "budget_total_normalized": 200000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 200000,
      "profit_default": 250000,
      "profit_normalized": 200000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 200000,
      "pending_invoicing_default": 250000,
      "pending_invoicing_normalized": 200000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "345"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "move_future_bookings": true,
      "confirm_tentative_bookings": true
    },
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "225"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "218"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "227",
    "type": "deals",
    "attributes": {
      "name": "test from origin",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": 225,
      "profit_margin": "100.0",
      "email_key": "1f414a41137246a64a3f3fc879d06386",
      "purchase_order_number": "abc",
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:14.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:14.898+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 200000,
      "revenue_default": 250000,
      "revenue_normalized": 200000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 200000,
      "budget_total_default": 250000,
      "budget_total_normalized": 200000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 200000,
      "profit_default": 250000,
      "profit_normalized": 200000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 200000,
      "pending_invoicing_default": 250000,
      "pending_invoicing_normalized": 200000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "346"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "move_future_bookings": true,
      "confirm_tentative_bookings": false
    },
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "229"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "219"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "231",
    "type": "deals",
    "attributes": {
      "name": "test from origin",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": 229,
      "profit_margin": "100.0",
      "email_key": "b14c45730b4547619a58f62a5d6fb318",
      "purchase_order_number": "abc",
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:16.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:16.239+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 200000,
      "revenue_default": 250000,
      "revenue_normalized": 200000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 200000,
      "budget_total_default": 250000,
      "budget_total_normalized": 200000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 200000,
      "profit_default": 250000,
      "profit_normalized": 200000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 200000,
      "pending_invoicing_default": 250000,
      "pending_invoicing_normalized": 200000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "347"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "move_time_entries": true
    },
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "233"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "220"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "235",
    "type": "deals",
    "attributes": {
      "name": "test from origin",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": 233,
      "profit_margin": "100.0",
      "email_key": "295bcb31563b5ddfffd7c32772932dbc",
      "purchase_order_number": "abc",
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 1,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:17.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:17.646+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 200000,
      "revenue_default": 250000,
      "revenue_normalized": 200000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 200000,
      "budget_total_default": 250000,
      "budget_total_normalized": 200000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 200000,
      "profit_default": 250000,
      "profit_normalized": 200000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 200000,
      "pending_invoicing_default": 250000,
      "pending_invoicing_normalized": 200000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "348"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "move_expenses": true
    },
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "237"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "221"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "239",
    "type": "deals",
    "attributes": {
      "name": "test from origin",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": 237,
      "profit_margin": "100.0",
      "email_key": "6a476921c32c4fc1e8e13f5c0457d02d",
      "purchase_order_number": "abc",
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:19.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:19.138+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 200000,
      "revenue_default": 250000,
      "revenue_normalized": 200000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 200000,
      "budget_total_default": 250000,
      "budget_total_normalized": 200000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 200000,
      "profit_default": 250000,
      "profit_normalized": 200000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 200000,
      "pending_invoicing_default": 250000,
      "pending_invoicing_normalized": 200000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "349"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/create_from_origin

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

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "0"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "222"
        }
      }
    }
  }
}
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/origin_deal"
      }
    }
  ]
}

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "243"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "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/project"
      }
    }
  ]
}

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "245"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "223"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "246",
    "type": "deals",
    "attributes": {
      "name": "test from origin",
      "date": "2024-04-20",
      "end_date": null,
      "number": "3",
      "deal_number": "3",
      "suffix": null,
      "time_approval": false,
      "expense_approval": false,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": 245,
      "profit_margin": 0,
      "email_key": "4f6ed1961aa8ca04e5059ced0278c33d",
      "purchase_order_number": "abc",
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:21.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:21.178+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "353"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/create_from_origin

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "Budget name override",
      "date": "01-01-2024",
      "end_date": "31-12-2024"
    },
    "relationships": {
      "origin_deal": {
        "data": {
          "type": "deals",
          "id": "248"
        }
      },
      "project": {
        "data": {
          "type": "projects",
          "id": "224"
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "33"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "1177"
        }
      },
      "document_type": {
        "data": {
          "type": "document_types",
          "id": "10"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "250",
    "type": "deals",
    "attributes": {
      "name": "Budget name override",
      "date": "2024-01-01",
      "end_date": "2024-12-31",
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": 248,
      "profit_margin": "100.0",
      "email_key": "e032bbf336717c367806eeeffe3a7197",
      "purchase_order_number": "abc",
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": null,
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 100,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:22.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:22.134+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-01-01",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 200000,
      "revenue_default": 250000,
      "revenue_normalized": 200000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 200000,
      "budget_total_default": 250000,
      "budget_total_normalized": 200000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 200000,
      "profit_default": 250000,
      "profit_normalized": 200000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 200000,
      "pending_invoicing_default": 250000,
      "pending_invoicing_normalized": 200000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "354"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Creates a budget from origin deal
POST/api/v2/deals/create_from_origin

URI Parameters
HideShow
id
number (required) Example: 1

deal id


POST /api/v2/deals/copy
Requestscopy from templatecopy from templatecopy from templatecopy from templatecopy from templatecopy from templatecopy from templatereturns errorreturns error

POST  /api/v2/deals/copy

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "template_id": 252
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "254",
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "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": "100.0",
      "email_key": "404673d9b8b4b8b072fe3cefd1afee76",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:22.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:23.144+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 100000,
      "revenue_default": 125000,
      "revenue_normalized": 100000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 100000,
      "budget_total_default": 125000,
      "budget_total_normalized": 100000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 50000,
      "projected_revenue_default": 62500,
      "projected_revenue_normalized": 50000,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 100000,
      "profit_default": 125000,
      "profit_normalized": 100000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 100000,
      "pending_invoicing_default": 125000,
      "pending_invoicing_normalized": 100000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "355"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/copy?include=contract

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "template_id": 260,
      "project_id": 227,
      "make_recurring": false
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "262",
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": "100.0",
      "email_key": "f6c0540eac9eceb2ebcdb5952e531f4a",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:24.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:25.186+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 100000,
      "revenue_default": 125000,
      "revenue_normalized": 100000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 100000,
      "budget_total_default": 125000,
      "budget_total_normalized": 100000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 100000,
      "profit_default": 125000,
      "profit_normalized": 100000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 100000,
      "pending_invoicing_default": 125000,
      "pending_invoicing_normalized": 100000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "357"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "data": null
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/copy?include=contract

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "copied recurring budget",
      "template_id": 271,
      "make_recurring": true
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "272",
    "type": "deals",
    "attributes": {
      "name": "copied recurring budget",
      "date": "2024-04-20",
      "end_date": null,
      "number": "6",
      "deal_number": "6",
      "suffix": "2024/04",
      "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,
      "email_key": "b8ce56b3ebeb557fe11a8d8cc12f203b",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:27.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:27.524+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "359"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "data": {
          "type": "contracts",
          "id": "22"
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "included": [
    {
      "id": "22",
      "type": "contracts",
      "attributes": {
        "ends_on": null,
        "starts_on": "2024-04-22",
        "next_occurrence_on": "2024-04-22",
        "interval_id": 1,
        "copy_purchase_order_number": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "359"
          }
        },
        "template": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "meta": {}
}

POST  /api/v2/deals/copy?include=contract

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "copied recurring budget",
      "template_id": 277,
      "make_recurring": false
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "278",
    "type": "deals",
    "attributes": {
      "name": "copied recurring budget",
      "date": "2024-04-20",
      "end_date": null,
      "number": "6",
      "deal_number": "6",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "7d322a1e80e5859c10d334cea7dcd36e",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:28.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:28.823+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "360"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "data": null
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/copy

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "template_id": 280,
      "project_id": 233,
      "responsible_id": 1226,
      "currency": "USD",
      "date": "2024-04-10",
      "end_date": "2024-04-22 04:04:29",
      "custom_fields": {
        "21": "test"
      },
      "editor_config": {
        "enabled": true
      }
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "891"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "1226"
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "34"
        }
      },
      "document_type": {
        "data": {
          "type": "document_types",
          "id": "11"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "282",
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "date": "2024-04-10",
      "end_date": "2024-04-22",
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": "100.0",
      "email_key": "d4592a231b38148843f449d067f4f7d8",
      "purchase_order_number": null,
      "custom_fields": {
        "21": "test"
      },
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {
        "enabled": true
      },
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:29.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:29.864+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.0",
      "exchange_date": "2024-04-10",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "USD",
      "currency_default": "USD",
      "currency_normalized": "USD",
      "revenue": 100000,
      "revenue_default": 100000,
      "revenue_normalized": 100000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 100000,
      "budget_total_default": 100000,
      "budget_total_normalized": 100000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 100000,
      "profit_default": 100000,
      "profit_normalized": 100000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 100000,
      "pending_invoicing_default": 100000,
      "pending_invoicing_normalized": 100000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "361"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/copy

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "template_id": 284,
      "project_id": null
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "286",
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": "100.0",
      "email_key": "d91a6241b26fe250e9ecf68d5b18740c",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:30.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:31.266+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 100000,
      "revenue_default": 125000,
      "revenue_normalized": 100000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 100000,
      "budget_total_default": 125000,
      "budget_total_normalized": 100000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 100000,
      "profit_default": 125000,
      "profit_normalized": 100000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 100000,
      "pending_invoicing_default": 125000,
      "pending_invoicing_normalized": 100000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "362"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/copy

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "template_id": 288
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "290",
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "date": "2024-04-20",
      "end_date": null,
      "number": "4",
      "deal_number": "4",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": "100.0",
      "email_key": "799f1cfcfc1d3e0c785c699435dde9c0",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": 80,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:31.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:32.198+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 100000,
      "revenue_default": 125000,
      "revenue_normalized": 100000,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "budget_total": 100000,
      "budget_total_default": 125000,
      "budget_total_normalized": 100000,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "profit": 100000,
      "profit_default": 125000,
      "profit_normalized": 100000,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 100000,
      "pending_invoicing_default": 125000,
      "pending_invoicing_normalized": 100000,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "363"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/deals/copy

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

POST  /api/v2/deals/copy

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "copied deal",
      "template_id": 0,
      "project_id": 236
    }
  }
}
Responses404
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "404",
      "code": "record_not_found",
      "title": "Record Not Found",
      "detail": "The requested record was not found",
      "source": {}
    }
  ]
}

Copies a deal
POST/api/v2/deals/copy

URI Parameters
HideShow
id
number (required) Example: 1

deal id


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

PATCH  /api/v2/deals/294/open

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "294",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "e7ee9144abb2d37144635e6526941a48",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:33.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:33.469+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "366"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

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

URI Parameters
HideShow
id
number (required) Example: 1

deal id


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

PATCH  /api/v2/deals/296/close

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "296",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "6fc0959bc92b9e823be46ca526434825",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": "2024-04-20T06:04:34.000+02:00",
      "delivered_on": "2024-04-20",
      "last_activity_at": "2024-04-20T06:04:33.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:33.992+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "367"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/deals/298/close

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "delivered_on": "2024-04-24"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "298",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "c81b0fcfac1add3c316f5d019cdc7724",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": "2024-04-20T06:04:34.000+02:00",
      "delivered_on": "2024-04-24",
      "last_activity_at": "2024-04-20T06:04:34.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:34.542+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "368"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

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

URI Parameters
HideShow
id
number (required) Example: 1

deal id


PATCH /api/v2/deals/1/convert_to_budget
Requestsconverts to budget

PATCH  /api/v2/deals/300/convert_to_budget

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "240"
        }
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "300",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2024-04-20",
      "end_date": null,
      "number": "2",
      "deal_number": "2",
      "suffix": null,
      "time_approval": true,
      "expense_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": 1,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "email_key": "85eeb059f42f6a8b2bc8f2d1a0646016",
      "purchase_order_number": null,
      "custom_fields": null,
      "position": 1,
      "service_type_restricted_tracking": false,
      "tracking_type_id": 1,
      "editor_config": {},
      "discount": null,
      "man_day_minutes": null,
      "rounding_interval_id": null,
      "rounding_method_id": null,
      "billable_time": 0,
      "budget_warning": null,
      "unapproved_entries_count": 0,
      "rejected_entries_count": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "probability": 50,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "note": null,
      "lost_comment": null,
      "closed_at": null,
      "delivered_on": null,
      "last_activity_at": "2024-04-20T06:04:34.000+02:00",
      "deleted_at": null,
      "created_at": "2024-04-20T06:04:34.939+02:00",
      "sales_closed_at": null,
      "exchange_rate": "1.25",
      "exchange_date": "2024-04-20",
      "sales_closed_on": null,
      "sample_data": false,
      "external_id": null,
      "external_sync": false,
      "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,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "projected_revenue": 0,
      "projected_revenue_default": 0,
      "projected_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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,
      "draft_invoiced": 0,
      "draft_invoiced_default": 0,
      "draft_invoiced_normalized": 0,
      "amount_credited": 0,
      "amount_credited_default": 0,
      "amount_credited_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "369"
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "document_type": {
        "meta": {
          "included": false
        }
      },
      "responsible": {
        "meta": {
          "included": false
        }
      },
      "deal_status": {
        "meta": {
          "included": false
        }
      },
      "project": {
        "meta": {
          "included": false
        }
      },
      "lost_reason": {
        "meta": {
          "included": false
        }
      },
      "contract": {
        "meta": {
          "included": false
        }
      },
      "contact": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "template": {
        "meta": {
          "included": false
        }
      },
      "tax_rate": {
        "meta": {
          "included": false
        }
      },
      "custom_field_people": {
        "meta": {
          "included": false
        }
      },
      "memberships": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Converts a deal to budget
PATCH/api/v2/deals/{id}/convert_to_budget

URI Parameters
HideShow
id
number (required) Example: 1

deal id


Generated by aglio on 20 Apr 2024