API Documentation

API Endpoint

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:

Deal cost rate 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
Requestsreturns deal cost rates

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
Responses200
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 rates
GET/api/v2/deal_cost_rates


GET /api/v2/deal_cost_rates/1
Requestsreturns deal cost rate

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
Responses200
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 rate
GET/api/v2/deal_cost_rates/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal cost rate id


POST /api/v2/deal_cost_rates
Requestscreates deal cost ratesets use_deal_cost_rate to TRUEsets use_deal_cost_rate to TRUEreturns error

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"
        }
      }
    }
  }
}
Responses201
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": {}
}

Create a deal cost rate
POST/api/v2/deal_cost_rates

URI Parameters
HideShow
currency
currency (required) Example: EUR

currency

rate_cents
decimal (optional) Example: 20.0

rate 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/1
Requestsupdates deal cost ratereturns errorsets TE's & booking's use_deal_cost_rate to FALSE for previous DCR owner & sets to TRUE for new one

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"
        }
      }
    }
  }
}
Responses200
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": {}
}

Update a deal cost rate
PATCH/api/v2/deal_cost_rates/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal cost rate id


DELETE /api/v2/deal_cost_rates/1
Requestsarchives deal cost ratesets use_deal_cost_rate to FALSEsets use_deal_cost_rate to FALSE

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
Responses204
This response has no content.

Deletes a deal cost rate
DELETE/api/v2/deal_cost_rates/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal cost rate id


Generated by aglio on 12 Jul 2025