Update a milestone by ID
curl --request PATCH \
--url https://api.zivio.net/api/v3/milestones/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'zivio-tenant-id: <api-key>' \
--data '
{
"milestone": {
"title": "My New Milestone",
"rate_cents": "50",
"rate_ccy": "GBP",
"due_on": "2023-12-25",
"details": "Details about the milestone",
"notes": "Notes about the milestone",
"comments": "Commentss about the milestone"
}
}
'import requests
url = "https://api.zivio.net/api/v3/milestones/{id}"
payload = { "milestone": {
"title": "My New Milestone",
"rate_cents": "50",
"rate_ccy": "GBP",
"due_on": "2023-12-25",
"details": "Details about the milestone",
"notes": "Notes about the milestone",
"comments": "Commentss about the milestone"
} }
headers = {
"X-API-Key": "<api-key>",
"zivio-tenant-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-API-Key': '<api-key>',
'zivio-tenant-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
milestone: {
title: 'My New Milestone',
rate_cents: '50',
rate_ccy: 'GBP',
due_on: '2023-12-25',
details: 'Details about the milestone',
notes: 'Notes about the milestone',
comments: 'Commentss about the milestone'
}
})
};
fetch('https://api.zivio.net/api/v3/milestones/{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.zivio.net/api/v3/milestones/{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([
'milestone' => [
'title' => 'My New Milestone',
'rate_cents' => '50',
'rate_ccy' => 'GBP',
'due_on' => '2023-12-25',
'details' => 'Details about the milestone',
'notes' => 'Notes about the milestone',
'comments' => 'Commentss about the milestone'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"zivio-tenant-id: <api-key>"
],
]);
$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.zivio.net/api/v3/milestones/{id}"
payload := strings.NewReader("{\n \"milestone\": {\n \"title\": \"My New Milestone\",\n \"rate_cents\": \"50\",\n \"rate_ccy\": \"GBP\",\n \"due_on\": \"2023-12-25\",\n \"details\": \"Details about the milestone\",\n \"notes\": \"Notes about the milestone\",\n \"comments\": \"Commentss about the milestone\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("zivio-tenant-id", "<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.zivio.net/api/v3/milestones/{id}")
.header("X-API-Key", "<api-key>")
.header("zivio-tenant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"milestone\": {\n \"title\": \"My New Milestone\",\n \"rate_cents\": \"50\",\n \"rate_ccy\": \"GBP\",\n \"due_on\": \"2023-12-25\",\n \"details\": \"Details about the milestone\",\n \"notes\": \"Notes about the milestone\",\n \"comments\": \"Commentss about the milestone\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v3/milestones/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["zivio-tenant-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"milestone\": {\n \"title\": \"My New Milestone\",\n \"rate_cents\": \"50\",\n \"rate_ccy\": \"GBP\",\n \"due_on\": \"2023-12-25\",\n \"details\": \"Details about the milestone\",\n \"notes\": \"Notes about the milestone\",\n \"comments\": \"Commentss about the milestone\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "66",
"title": "Title of Milestone",
"details": "Details of Milestone",
"rate": "1500.00",
"ccy": "GBP",
"due_on": "2023-11-07T05:31:56Z",
"notes": "some notes relating to the milestone",
"comments": "some comments relating to the milestone",
"job_id": "2669",
"job_summary": "summary of miestone",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "open",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": {
"id": "7158",
"first_name": "Jack",
"last_name": "Jones",
"email": "jack_jones@example.com",
"org_name": "Organisation Ltd",
"org_id": "567",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"department": "Bridges",
"vetting_status": "PASSED",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"custom_fields": {
"key": "value"
},
"has_oversight": "<string>"
},
"level_1_approved_at": "2023-11-07T05:31:56Z",
"level_1_approved_by": {
"id": "258",
"first_name": "John",
"last_name": "Smith",
"email": "john_smith@example.com",
"org_name": "Smith Co Ltd",
"org_id": "200",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"department": "Bridges",
"vetting_status": "PASSED",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"custom_fields": {
"key": "value"
},
"has_oversight": "<string>"
},
"children": [
"124"
],
"parents": [
"14"
],
"custom_fields": {
"key": "value"
}
}Milestones
Update a milestone by ID
PATCH
/
milestones
/
{id}
Update a milestone by ID
curl --request PATCH \
--url https://api.zivio.net/api/v3/milestones/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'zivio-tenant-id: <api-key>' \
--data '
{
"milestone": {
"title": "My New Milestone",
"rate_cents": "50",
"rate_ccy": "GBP",
"due_on": "2023-12-25",
"details": "Details about the milestone",
"notes": "Notes about the milestone",
"comments": "Commentss about the milestone"
}
}
'import requests
url = "https://api.zivio.net/api/v3/milestones/{id}"
payload = { "milestone": {
"title": "My New Milestone",
"rate_cents": "50",
"rate_ccy": "GBP",
"due_on": "2023-12-25",
"details": "Details about the milestone",
"notes": "Notes about the milestone",
"comments": "Commentss about the milestone"
} }
headers = {
"X-API-Key": "<api-key>",
"zivio-tenant-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-API-Key': '<api-key>',
'zivio-tenant-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
milestone: {
title: 'My New Milestone',
rate_cents: '50',
rate_ccy: 'GBP',
due_on: '2023-12-25',
details: 'Details about the milestone',
notes: 'Notes about the milestone',
comments: 'Commentss about the milestone'
}
})
};
fetch('https://api.zivio.net/api/v3/milestones/{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.zivio.net/api/v3/milestones/{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([
'milestone' => [
'title' => 'My New Milestone',
'rate_cents' => '50',
'rate_ccy' => 'GBP',
'due_on' => '2023-12-25',
'details' => 'Details about the milestone',
'notes' => 'Notes about the milestone',
'comments' => 'Commentss about the milestone'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"zivio-tenant-id: <api-key>"
],
]);
$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.zivio.net/api/v3/milestones/{id}"
payload := strings.NewReader("{\n \"milestone\": {\n \"title\": \"My New Milestone\",\n \"rate_cents\": \"50\",\n \"rate_ccy\": \"GBP\",\n \"due_on\": \"2023-12-25\",\n \"details\": \"Details about the milestone\",\n \"notes\": \"Notes about the milestone\",\n \"comments\": \"Commentss about the milestone\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("zivio-tenant-id", "<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.zivio.net/api/v3/milestones/{id}")
.header("X-API-Key", "<api-key>")
.header("zivio-tenant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"milestone\": {\n \"title\": \"My New Milestone\",\n \"rate_cents\": \"50\",\n \"rate_ccy\": \"GBP\",\n \"due_on\": \"2023-12-25\",\n \"details\": \"Details about the milestone\",\n \"notes\": \"Notes about the milestone\",\n \"comments\": \"Commentss about the milestone\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v3/milestones/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["zivio-tenant-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"milestone\": {\n \"title\": \"My New Milestone\",\n \"rate_cents\": \"50\",\n \"rate_ccy\": \"GBP\",\n \"due_on\": \"2023-12-25\",\n \"details\": \"Details about the milestone\",\n \"notes\": \"Notes about the milestone\",\n \"comments\": \"Commentss about the milestone\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "66",
"title": "Title of Milestone",
"details": "Details of Milestone",
"rate": "1500.00",
"ccy": "GBP",
"due_on": "2023-11-07T05:31:56Z",
"notes": "some notes relating to the milestone",
"comments": "some comments relating to the milestone",
"job_id": "2669",
"job_summary": "summary of miestone",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "open",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": {
"id": "7158",
"first_name": "Jack",
"last_name": "Jones",
"email": "jack_jones@example.com",
"org_name": "Organisation Ltd",
"org_id": "567",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"department": "Bridges",
"vetting_status": "PASSED",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"custom_fields": {
"key": "value"
},
"has_oversight": "<string>"
},
"level_1_approved_at": "2023-11-07T05:31:56Z",
"level_1_approved_by": {
"id": "258",
"first_name": "John",
"last_name": "Smith",
"email": "john_smith@example.com",
"org_name": "Smith Co Ltd",
"org_id": "200",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"department": "Bridges",
"vetting_status": "PASSED",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"custom_fields": {
"key": "value"
},
"has_oversight": "<string>"
},
"children": [
"124"
],
"parents": [
"14"
],
"custom_fields": {
"key": "value"
}
}Path Parameters
Body
application/json
Show child attributes
Show child attributes
Response
ok
Example:
"66"
Example:
"Title of Milestone"
Example:
"Details of Milestone"
Example:
"1500.00"
Example:
"GBP"
Example:
"some notes relating to the milestone"
Example:
"some comments relating to the milestone"
Example:
"2669"
Example:
"summary of miestone"
Example:
"open"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

