Skip to main content
PATCH
/
coa
/
api
/
budgets
/
{id}
Partial Update Budget
curl --request PATCH \
  --url https://api.meetcampfire.com/coa/api/budgets/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "cadence": "<string>",
  "start_date": "2023-12-25",
  "end_date": "2023-12-25",
  "periods": 16383,
  "tag_ids": [
    0
  ],
  "tag_group_ids": [
    0
  ],
  "currency": "<string>",
  "entity": 123,
  "department": 123
}
'
import requests

url = "https://api.meetcampfire.com/coa/api/budgets/{id}"

payload = {
"name": "<string>",
"description": "<string>",
"cadence": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"periods": 16383,
"tag_ids": [0],
"tag_group_ids": [0],
"currency": "<string>",
"entity": 123,
"department": 123
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
cadence: '<string>',
start_date: '2023-12-25',
end_date: '2023-12-25',
periods: 16383,
tag_ids: [0],
tag_group_ids: [0],
currency: '<string>',
entity: 123,
department: 123
})
};

fetch('https://api.meetcampfire.com/coa/api/budgets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.meetcampfire.com/coa/api/budgets/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'cadence' => '<string>',
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'periods' => 16383,
'tag_ids' => [
0
],
'tag_group_ids' => [
0
],
'currency' => '<string>',
'entity' => 123,
'department' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.meetcampfire.com/coa/api/budgets/{id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cadence\": \"<string>\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"periods\": 16383,\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"currency\": \"<string>\",\n \"entity\": 123,\n \"department\": 123\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.meetcampfire.com/coa/api/budgets/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cadence\": \"<string>\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"periods\": 16383,\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"currency\": \"<string>\",\n \"entity\": 123,\n \"department\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.meetcampfire.com/coa/api/budgets/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cadence\": \"<string>\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"periods\": 16383,\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"currency\": \"<string>\",\n \"entity\": 123,\n \"department\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "entity_name": "<string>",
  "prior_start_date": "<string>",
  "prior_end_date": "<string>",
  "department_name": "<string>",
  "tags": [
    {}
  ],
  "is_deleted": false,
  "deleted_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "start_date": "2023-12-25",
  "created_at": "2023-11-07T05:31:56Z",
  "last_modified_at": "2023-11-07T05:31:56Z",
  "customer": 123,
  "description": "<string>",
  "cadence": "<string>",
  "end_date": "2023-12-25",
  "periods": 16383,
  "tag_ids": [
    0
  ],
  "tag_group_ids": [
    0
  ],
  "currency": "<string>",
  "entity": 123,
  "department": 123
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Path Parameters

id
integer
required

Body

name
string
description
string | null
cadence
string | null
start_date
string<date>
end_date
string<date> | null
periods
integer
Required range: 0 <= x <= 32767
breakdown_type
enum<string>
  • standard - Standard (Account-based)
  • department_row - Department (Row)
Available options:
standard,
department_row
tag_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
tag_group_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
currency
string
Maximum string length: 3
entity
integer | null
department
integer | null

Response

200 - application/json
id
integer
required
read-only
entity_name
string
required
read-only
prior_start_date
string
required
read-only
prior_end_date
string
required
read-only
department_name
string
required
read-only
tags
object[]
required
read-only
is_deleted
boolean
default:false
required
read-only
deleted_at
string<date-time> | null
required
read-only
name
string
required
start_date
string<date>
required
created_at
string<date-time>
required
read-only
last_modified_at
string<date-time>
required
read-only
customer
integer
required
read-only
description
string | null
cadence
string | null
end_date
string<date> | null
periods
integer
Required range: 0 <= x <= 32767
breakdown_type
enum<string>
  • standard - Standard (Account-based)
  • department_row - Department (Row)
Available options:
standard,
department_row
tag_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
tag_group_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
currency
string
Maximum string length: 3
entity
integer | null
department
integer | null