Create a purchase order
curl --request POST \
--url https://api.zivio.net/api/v3/purchase_orders \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'zivio-tenant-id: <api-key>' \
--data '
{
"purchase_order": [
{
"external_provider": "External System",
"external_id": "ExSys67687",
"po_number": "ExSys67687",
"status": "issued",
"version": "0",
"owners": {
"job": "23",
"supplier": "23"
}
}
]
}
'import requests
url = "https://api.zivio.net/api/v3/purchase_orders"
payload = { "purchase_order": [
{
"external_provider": "External System",
"external_id": "ExSys67687",
"po_number": "ExSys67687",
"status": "issued",
"version": "0",
"owners": {
"job": "23",
"supplier": "23"
}
}
] }
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({
purchase_order: [
{
external_provider: 'External System',
external_id: 'ExSys67687',
po_number: 'ExSys67687',
status: 'issued',
version: '0',
owners: {job: '23', supplier: '23'}
}
]
})
};
fetch('https://api.zivio.net/api/v3/purchase_orders', 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/purchase_orders",
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([
'purchase_order' => [
[
'external_provider' => 'External System',
'external_id' => 'ExSys67687',
'po_number' => 'ExSys67687',
'status' => 'issued',
'version' => '0',
'owners' => [
'job' => '23',
'supplier' => '23'
]
]
]
]),
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/purchase_orders"
payload := strings.NewReader("{\n \"purchase_order\": [\n {\n \"external_provider\": \"External System\",\n \"external_id\": \"ExSys67687\",\n \"po_number\": \"ExSys67687\",\n \"status\": \"issued\",\n \"version\": \"0\",\n \"owners\": {\n \"job\": \"23\",\n \"supplier\": \"23\"\n }\n }\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/purchase_orders")
.header("X-API-Key", "<api-key>")
.header("zivio-tenant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"purchase_order\": [\n {\n \"external_provider\": \"External System\",\n \"external_id\": \"ExSys67687\",\n \"po_number\": \"ExSys67687\",\n \"status\": \"issued\",\n \"version\": \"0\",\n \"owners\": {\n \"job\": \"23\",\n \"supplier\": \"23\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v3/purchase_orders")
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 \"purchase_order\": [\n {\n \"external_provider\": \"External System\",\n \"external_id\": \"ExSys67687\",\n \"po_number\": \"ExSys67687\",\n \"status\": \"issued\",\n \"version\": \"0\",\n \"owners\": {\n \"job\": \"23\",\n \"supplier\": \"23\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "23",
"external_provider": "External Service",
"external_id": "EX67868",
"po_number": "EX67868",
"version": 123,
"status": "<string>",
"owners": {
"job": "2",
"supplier": "2"
}
}Purchase Orders
Create a purchase order
POST
/
purchase_orders
Create a purchase order
curl --request POST \
--url https://api.zivio.net/api/v3/purchase_orders \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'zivio-tenant-id: <api-key>' \
--data '
{
"purchase_order": [
{
"external_provider": "External System",
"external_id": "ExSys67687",
"po_number": "ExSys67687",
"status": "issued",
"version": "0",
"owners": {
"job": "23",
"supplier": "23"
}
}
]
}
'import requests
url = "https://api.zivio.net/api/v3/purchase_orders"
payload = { "purchase_order": [
{
"external_provider": "External System",
"external_id": "ExSys67687",
"po_number": "ExSys67687",
"status": "issued",
"version": "0",
"owners": {
"job": "23",
"supplier": "23"
}
}
] }
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({
purchase_order: [
{
external_provider: 'External System',
external_id: 'ExSys67687',
po_number: 'ExSys67687',
status: 'issued',
version: '0',
owners: {job: '23', supplier: '23'}
}
]
})
};
fetch('https://api.zivio.net/api/v3/purchase_orders', 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/purchase_orders",
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([
'purchase_order' => [
[
'external_provider' => 'External System',
'external_id' => 'ExSys67687',
'po_number' => 'ExSys67687',
'status' => 'issued',
'version' => '0',
'owners' => [
'job' => '23',
'supplier' => '23'
]
]
]
]),
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/purchase_orders"
payload := strings.NewReader("{\n \"purchase_order\": [\n {\n \"external_provider\": \"External System\",\n \"external_id\": \"ExSys67687\",\n \"po_number\": \"ExSys67687\",\n \"status\": \"issued\",\n \"version\": \"0\",\n \"owners\": {\n \"job\": \"23\",\n \"supplier\": \"23\"\n }\n }\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/purchase_orders")
.header("X-API-Key", "<api-key>")
.header("zivio-tenant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"purchase_order\": [\n {\n \"external_provider\": \"External System\",\n \"external_id\": \"ExSys67687\",\n \"po_number\": \"ExSys67687\",\n \"status\": \"issued\",\n \"version\": \"0\",\n \"owners\": {\n \"job\": \"23\",\n \"supplier\": \"23\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v3/purchase_orders")
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 \"purchase_order\": [\n {\n \"external_provider\": \"External System\",\n \"external_id\": \"ExSys67687\",\n \"po_number\": \"ExSys67687\",\n \"status\": \"issued\",\n \"version\": \"0\",\n \"owners\": {\n \"job\": \"23\",\n \"supplier\": \"23\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "23",
"external_provider": "External Service",
"external_id": "EX67868",
"po_number": "EX67868",
"version": 123,
"status": "<string>",
"owners": {
"job": "2",
"supplier": "2"
}
}Body
application/json
Show child attributes
Show child attributes
⌘I

