API Documentation
Deal Cost Rates ¶
Deal Cost Rates ¶
For an overview of deal cost rates please refer to the help article.
Besides having default cost rates for the team, a custom cost rate for specific deal or budget can be set, which will override the default value. Only one per person, per deal can be created.
Following depicts the Deal cost rate entity relationship diagram:
Supported filter params
-
deal_id (array)
-
person_id (array)
Supported sort params
- rate_cents
Filter operations are supported on this endpoint.
GET /api/v2/deal_cost_rates
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
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "1",
"type": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": "5000.0"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "303"
}
},
"deal": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/deal_cost_rates?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/deal_cost_rates?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 deal cost ratesGET/api/v2/deal_cost_rates
GET /api/v2/deal_cost_rates/2
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
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "2",
"type": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": "5000.0"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "304"
}
},
"deal": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Gets a deal cost rateGET/api/v2/deal_cost_rates/{id}
- id
number
(required) Example: 1deal cost rate id
POST /api/v2/deal_cost_rates
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": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": 30
},
"relationships": {
"person": {
"data": {
"type": "people",
"id": "961"
}
},
"deal": {
"data": {
"type": "deals",
"id": "156"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "4",
"type": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": "30.0"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "305"
}
},
"deal": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/deal_cost_rates
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": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": 30
},
"relationships": {
"person": {
"data": {
"type": "people",
"id": "966"
}
},
"deal": {
"data": {
"type": "deals",
"id": "158"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "6",
"type": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": "30.0"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "306"
}
},
"deal": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/deal_cost_rates
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": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": 30
},
"relationships": {
"person": {
"data": {
"type": "people",
"id": "971"
}
},
"deal": {
"data": {
"type": "deals",
"id": "160"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "8",
"type": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": "30.0"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "307"
}
},
"deal": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/deal_cost_rates
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": "deal_cost_rates",
"attributes": {
"currency": ""
}
}
}
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/deal"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/person"
}
},
{
"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"
}
}
]
}
Create a deal cost ratePOST/api/v2/deal_cost_rates
- currency
currency
(required) Example: EURcurrency
- rate_cents
decimal
(optional) Example: 20.0rate cents
- deal_id: `1` (number, required) - deal_id
string
(required)- person_id: `1` (number, required) - person_id
string
(required)
PATCH /api/v2/deal_cost_rates/10
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "deal_cost_rates",
"attributes": {
"currency": "USD",
"rate_cents": 2
},
"relationships": {
"person": {
"data": {
"type": "people",
"id": "979"
}
},
"deal": {
"data": {
"type": "deals",
"id": "163"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "10",
"type": "deal_cost_rates",
"attributes": {
"currency": "USD",
"rate_cents": "2.0"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "309"
}
},
"deal": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
PATCH /api/v2/deal_cost_rates/11
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "deal_cost_rates",
"attributes": {
"currency": ""
}
}
}
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/currency"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "is not an valid currency",
"source": {
"pointer": "data/attributes/currency"
}
}
]
}
PATCH /api/v2/deal_cost_rates/13
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": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": 2
},
"relationships": {
"person": {
"data": {
"type": "people",
"id": "985"
}
},
"deal": {
"data": {
"type": "deals",
"id": "166"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "13",
"type": "deal_cost_rates",
"attributes": {
"currency": "EUR",
"rate_cents": "2.0"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "311"
}
},
"deal": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Update a deal cost ratePATCH/api/v2/deal_cost_rates/{id}
- id
number
(required) Example: 1deal cost rate id
DELETE /api/v2/deal_cost_rates/14
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
DELETE /api/v2/deal_cost_rates/16
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
DELETE /api/v2/deal_cost_rates/18
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
Deletes a deal cost rateDELETE/api/v2/deal_cost_rates/{id}
- id
number
(required) Example: 1deal cost rate id
Generated by aglio on 02 Aug 2025