Create a Milestone
curl --request POST \
--url https://api.zivio.net/api/v3/milestones \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'zivio-tenant-id: <api-key>' \
--data '
{
"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",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"org_name": "Organisation Ltd",
"org_id": "567",
"vetting_status": "PASSED",
"tax_number": "9876543234",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"level_1_approved_at": "2023-11-07T05:31:56Z",
"level_1_approved_by": {
"id": "7158",
"first_name": "Jack",
"last_name": "Jones",
"email": "jack_jones@example.com",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"org_name": "Organisation Ltd",
"org_id": "567",
"vetting_status": "PASSED",
"tax_number": "9876543234",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"children": [
"124"
],
"parents": [
"14"
],
"custom_fields": {
"key": "value"
}
}
'import requests
url = "https://api.zivio.net/api/v3/milestones"
payload = {
"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",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"org_name": "Organisation Ltd",
"org_id": "567",
"vetting_status": "PASSED",
"tax_number": "9876543234",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"level_1_approved_at": "2023-11-07T05:31:56Z",
"level_1_approved_by": {
"id": "7158",
"first_name": "Jack",
"last_name": "Jones",
"email": "jack_jones@example.com",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"org_name": "Organisation Ltd",
"org_id": "567",
"vetting_status": "PASSED",
"tax_number": "9876543234",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"children": ["124"],
"parents": ["14"],
"custom_fields": { "key": "value" }
}
headers = {
"X-API-Key": "<api-key>",
"zivio-tenant-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'zivio-tenant-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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',
business_unit: 'Public Private Partnerships',
division: 'Infastructure',
org_name: 'Organisation Ltd',
org_id: '567',
vetting_status: 'PASSED',
tax_number: '9876543234',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
},
level_1_approved_at: '2023-11-07T05:31:56Z',
level_1_approved_by: {
id: '7158',
first_name: 'Jack',
last_name: 'Jones',
email: 'jack_jones@example.com',
business_unit: 'Public Private Partnerships',
division: 'Infastructure',
org_name: 'Organisation Ltd',
org_id: '567',
vetting_status: 'PASSED',
tax_number: '9876543234',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
},
children: ['124'],
parents: ['14'],
custom_fields: {key: 'value'}
})
};
fetch('https://api.zivio.net/api/v3/milestones', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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',
'business_unit' => 'Public Private Partnerships',
'division' => 'Infastructure',
'org_name' => 'Organisation Ltd',
'org_id' => '567',
'vetting_status' => 'PASSED',
'tax_number' => '9876543234',
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z'
],
'level_1_approved_at' => '2023-11-07T05:31:56Z',
'level_1_approved_by' => [
'id' => '7158',
'first_name' => 'Jack',
'last_name' => 'Jones',
'email' => 'jack_jones@example.com',
'business_unit' => 'Public Private Partnerships',
'division' => 'Infastructure',
'org_name' => 'Organisation Ltd',
'org_id' => '567',
'vetting_status' => 'PASSED',
'tax_number' => '9876543234',
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z'
],
'children' => [
'124'
],
'parents' => [
'14'
],
'custom_fields' => [
'key' => 'value'
]
]),
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"
payload := strings.NewReader("{\n \"id\": \"66\",\n \"title\": \"Title of Milestone\",\n \"details\": \"Details of Milestone\",\n \"rate\": \"1500.00\",\n \"ccy\": \"GBP\",\n \"due_on\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"some notes relating to the milestone\",\n \"comments\": \"some comments relating to the milestone\",\n \"job_id\": \"2669\",\n \"job_summary\": \"summary of miestone\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"status\": \"open\",\n \"approved_at\": \"2023-11-07T05:31:56Z\",\n \"approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"level_1_approved_at\": \"2023-11-07T05:31:56Z\",\n \"level_1_approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"children\": [\n \"124\"\n ],\n \"parents\": [\n \"14\"\n ],\n \"custom_fields\": {\n \"key\": \"value\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.zivio.net/api/v3/milestones")
.header("X-API-Key", "<api-key>")
.header("zivio-tenant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"66\",\n \"title\": \"Title of Milestone\",\n \"details\": \"Details of Milestone\",\n \"rate\": \"1500.00\",\n \"ccy\": \"GBP\",\n \"due_on\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"some notes relating to the milestone\",\n \"comments\": \"some comments relating to the milestone\",\n \"job_id\": \"2669\",\n \"job_summary\": \"summary of miestone\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"status\": \"open\",\n \"approved_at\": \"2023-11-07T05:31:56Z\",\n \"approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"level_1_approved_at\": \"2023-11-07T05:31:56Z\",\n \"level_1_approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"children\": [\n \"124\"\n ],\n \"parents\": [\n \"14\"\n ],\n \"custom_fields\": {\n \"key\": \"value\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v3/milestones")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["zivio-tenant-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"66\",\n \"title\": \"Title of Milestone\",\n \"details\": \"Details of Milestone\",\n \"rate\": \"1500.00\",\n \"ccy\": \"GBP\",\n \"due_on\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"some notes relating to the milestone\",\n \"comments\": \"some comments relating to the milestone\",\n \"job_id\": \"2669\",\n \"job_summary\": \"summary of miestone\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"status\": \"open\",\n \"approved_at\": \"2023-11-07T05:31:56Z\",\n \"approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"level_1_approved_at\": \"2023-11-07T05:31:56Z\",\n \"level_1_approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"children\": [\n \"124\"\n ],\n \"parents\": [\n \"14\"\n ],\n \"custom_fields\": {\n \"key\": \"value\"\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
Create a Milestone
POST
/
milestones
Create a Milestone
curl --request POST \
--url https://api.zivio.net/api/v3/milestones \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'zivio-tenant-id: <api-key>' \
--data '
{
"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",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"org_name": "Organisation Ltd",
"org_id": "567",
"vetting_status": "PASSED",
"tax_number": "9876543234",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"level_1_approved_at": "2023-11-07T05:31:56Z",
"level_1_approved_by": {
"id": "7158",
"first_name": "Jack",
"last_name": "Jones",
"email": "jack_jones@example.com",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"org_name": "Organisation Ltd",
"org_id": "567",
"vetting_status": "PASSED",
"tax_number": "9876543234",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"children": [
"124"
],
"parents": [
"14"
],
"custom_fields": {
"key": "value"
}
}
'import requests
url = "https://api.zivio.net/api/v3/milestones"
payload = {
"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",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"org_name": "Organisation Ltd",
"org_id": "567",
"vetting_status": "PASSED",
"tax_number": "9876543234",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"level_1_approved_at": "2023-11-07T05:31:56Z",
"level_1_approved_by": {
"id": "7158",
"first_name": "Jack",
"last_name": "Jones",
"email": "jack_jones@example.com",
"business_unit": "Public Private Partnerships",
"division": "Infastructure",
"org_name": "Organisation Ltd",
"org_id": "567",
"vetting_status": "PASSED",
"tax_number": "9876543234",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"children": ["124"],
"parents": ["14"],
"custom_fields": { "key": "value" }
}
headers = {
"X-API-Key": "<api-key>",
"zivio-tenant-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'zivio-tenant-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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',
business_unit: 'Public Private Partnerships',
division: 'Infastructure',
org_name: 'Organisation Ltd',
org_id: '567',
vetting_status: 'PASSED',
tax_number: '9876543234',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
},
level_1_approved_at: '2023-11-07T05:31:56Z',
level_1_approved_by: {
id: '7158',
first_name: 'Jack',
last_name: 'Jones',
email: 'jack_jones@example.com',
business_unit: 'Public Private Partnerships',
division: 'Infastructure',
org_name: 'Organisation Ltd',
org_id: '567',
vetting_status: 'PASSED',
tax_number: '9876543234',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
},
children: ['124'],
parents: ['14'],
custom_fields: {key: 'value'}
})
};
fetch('https://api.zivio.net/api/v3/milestones', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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',
'business_unit' => 'Public Private Partnerships',
'division' => 'Infastructure',
'org_name' => 'Organisation Ltd',
'org_id' => '567',
'vetting_status' => 'PASSED',
'tax_number' => '9876543234',
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z'
],
'level_1_approved_at' => '2023-11-07T05:31:56Z',
'level_1_approved_by' => [
'id' => '7158',
'first_name' => 'Jack',
'last_name' => 'Jones',
'email' => 'jack_jones@example.com',
'business_unit' => 'Public Private Partnerships',
'division' => 'Infastructure',
'org_name' => 'Organisation Ltd',
'org_id' => '567',
'vetting_status' => 'PASSED',
'tax_number' => '9876543234',
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z'
],
'children' => [
'124'
],
'parents' => [
'14'
],
'custom_fields' => [
'key' => 'value'
]
]),
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"
payload := strings.NewReader("{\n \"id\": \"66\",\n \"title\": \"Title of Milestone\",\n \"details\": \"Details of Milestone\",\n \"rate\": \"1500.00\",\n \"ccy\": \"GBP\",\n \"due_on\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"some notes relating to the milestone\",\n \"comments\": \"some comments relating to the milestone\",\n \"job_id\": \"2669\",\n \"job_summary\": \"summary of miestone\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"status\": \"open\",\n \"approved_at\": \"2023-11-07T05:31:56Z\",\n \"approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"level_1_approved_at\": \"2023-11-07T05:31:56Z\",\n \"level_1_approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"children\": [\n \"124\"\n ],\n \"parents\": [\n \"14\"\n ],\n \"custom_fields\": {\n \"key\": \"value\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.zivio.net/api/v3/milestones")
.header("X-API-Key", "<api-key>")
.header("zivio-tenant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"66\",\n \"title\": \"Title of Milestone\",\n \"details\": \"Details of Milestone\",\n \"rate\": \"1500.00\",\n \"ccy\": \"GBP\",\n \"due_on\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"some notes relating to the milestone\",\n \"comments\": \"some comments relating to the milestone\",\n \"job_id\": \"2669\",\n \"job_summary\": \"summary of miestone\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"status\": \"open\",\n \"approved_at\": \"2023-11-07T05:31:56Z\",\n \"approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"level_1_approved_at\": \"2023-11-07T05:31:56Z\",\n \"level_1_approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"children\": [\n \"124\"\n ],\n \"parents\": [\n \"14\"\n ],\n \"custom_fields\": {\n \"key\": \"value\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v3/milestones")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["zivio-tenant-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"66\",\n \"title\": \"Title of Milestone\",\n \"details\": \"Details of Milestone\",\n \"rate\": \"1500.00\",\n \"ccy\": \"GBP\",\n \"due_on\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"some notes relating to the milestone\",\n \"comments\": \"some comments relating to the milestone\",\n \"job_id\": \"2669\",\n \"job_summary\": \"summary of miestone\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"status\": \"open\",\n \"approved_at\": \"2023-11-07T05:31:56Z\",\n \"approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"level_1_approved_at\": \"2023-11-07T05:31:56Z\",\n \"level_1_approved_by\": {\n \"id\": \"7158\",\n \"first_name\": \"Jack\",\n \"last_name\": \"Jones\",\n \"email\": \"jack_jones@example.com\",\n \"business_unit\": \"Public Private Partnerships\",\n \"division\": \"Infastructure\",\n \"org_name\": \"Organisation Ltd\",\n \"org_id\": \"567\",\n \"vetting_status\": \"PASSED\",\n \"tax_number\": \"9876543234\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n },\n \"children\": [\n \"124\"\n ],\n \"parents\": [\n \"14\"\n ],\n \"custom_fields\": {\n \"key\": \"value\"\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"
}
}Body
application/json
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
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

