REST API Budgets

Getting Project BillingDetail

GET /projects/<project_id>/billing_details/<billing_details_id>.json?key=<your_api_key>
GET /projects/<project_id>/billing_details/<billing_details_id>.xml?key=<your_api_key>

Example:

GET demo.redmineup.com/projects/11/billing_details/2.json?key=9a13f31770b80767a518eb1370

Getting Issue BillingDetail

GET /issues/<issue_id>/billing_details/<billing_details_id>.json
GET /issues/<issue_id>/billing_details/<billing_details_id>.xml

Creating Project BillingDetail

POST /projects/<project_id>/billing_details.json
POST /projects/<project_id>/billing_details.xml
  { "billing_settings": {
    "billing_type": "not_billable" 
        }
}

POST /projects/<project_id>/billing_details.json
  { "billing_settings": {
      "billing_type": "time_and_materials",
      "project_cost": '',
      "bill_rate_type": "by_user",
      "bill_rate": '',
      "budget_type": "project_fee",
      "budget": "2500.0",
      "monthly_budget": "1" 
    }
}

where
"billing_type" include ["not_billable", "time_and_materials", "project_flat_rate" <PRO version>, "issue_flat_rate" <PRO version>]
"bill_rate_type" include ["by_user", "by_project" <PRO version>, "by_issue" <PRO version>, "by_company" <PRO version>]
"budget_type" include ["no_budget", "project_fee", "issues_fee", "project_time", "issues_time"]

Creating Issue BillingDetail

POST /issues/<issue_id>/billing_details.xml
POST /issues/<issue_id>/billing_details.json

Updating Project BillingDetail

PUT /projects/:project_id/billing_details.json
  { "billing_settings": {
      "project_cost": '100',
    }
}

Deleting Project BillingDetail

DELETE /projects/<project_id>/billing_details/<billing_details_id>.json?key=<your_api_key>
DELETE /projects/<project_id>/billing_details/<billing_details_id>.xml?key=<your_api_key>

Deleting Issue BillingDetail

DELETE /issues/<issue_id>/billing_details/<billing_details_id>.json?key=<your_api_key>
DELETE /issues/<issue_id>/billing_details/<billing_details_id>.xml?key=<your_api_key>

Getting UserRates

GET /users/<user_id>/rates.json
GET /users/<user_id>/rates.xml

Example:

GET demo.redmineup.com/users/4/rates.json

Getting UserRate

GET /users/<user_id>/rates/<rate_id>.json
GET /users/<user_id>/rates/<rate_id>.xml

Example:

GET demo.redmineup.com/users/4/rates/1.json

Creating UserRates

POST /users/<user_id/rates.json?key=<your_api_key>
  {
    "user_rate": {
      "rate_type": "cost_rate",
      "rate": "100",
      "from_date": "2020-02-01 00:00:00",
      "project_id": "1",
      "user_id": "4" 
    }
}

Updating UserRates

PUT /users/<user_id>/rates/<rate_id>.json?key=<your_api_key>
  {
    "user_rate": {
      "rate": "200" 
    }
}

Deleting UserRates

DELETE /users/<user_id>/rates/<rate_id>.json?key=<your_api_key>
Was this article helpful? Yes  No
79 from 110 found this helpful