Update Inventory Contract
curl --request PATCH \
--url https://api.primeintellect.ai/api/admin/inventory/contracts/{contract_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"reference": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"autoRenew": true,
"noticePeriodDays": 123,
"currency": "<string>",
"description": "<string>",
"notes": "<string>",
"extra": {},
"vendorId": "<string>",
"continuesFromId": "<string>",
"nodeTypes": [
{
"nodeTypeId": "<string>",
"committedNodeCount": 123,
"pricePerGpuHr": 123,
"pricePerNodeHr": 123,
"notes": "<string>",
"extra": {}
}
],
"carryOverNodeIds": [
"<string>"
]
}
'import requests
url = "https://api.primeintellect.ai/api/admin/inventory/contracts/{contract_id}"
payload = {
"name": "<string>",
"reference": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"autoRenew": True,
"noticePeriodDays": 123,
"currency": "<string>",
"description": "<string>",
"notes": "<string>",
"extra": {},
"vendorId": "<string>",
"continuesFromId": "<string>",
"nodeTypes": [
{
"nodeTypeId": "<string>",
"committedNodeCount": 123,
"pricePerGpuHr": 123,
"pricePerNodeHr": 123,
"notes": "<string>",
"extra": {}
}
],
"carryOverNodeIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
reference: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
autoRenew: true,
noticePeriodDays: 123,
currency: '<string>',
description: '<string>',
notes: '<string>',
extra: {},
vendorId: '<string>',
continuesFromId: '<string>',
nodeTypes: [
{
nodeTypeId: '<string>',
committedNodeCount: 123,
pricePerGpuHr: 123,
pricePerNodeHr: 123,
notes: '<string>',
extra: {}
}
],
carryOverNodeIds: ['<string>']
})
};
fetch('https://api.primeintellect.ai/api/admin/inventory/contracts/{contract_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.primeintellect.ai/api/admin/inventory/contracts/{contract_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>',
'reference' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'autoRenew' => true,
'noticePeriodDays' => 123,
'currency' => '<string>',
'description' => '<string>',
'notes' => '<string>',
'extra' => [
],
'vendorId' => '<string>',
'continuesFromId' => '<string>',
'nodeTypes' => [
[
'nodeTypeId' => '<string>',
'committedNodeCount' => 123,
'pricePerGpuHr' => 123,
'pricePerNodeHr' => 123,
'notes' => '<string>',
'extra' => [
]
]
],
'carryOverNodeIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.primeintellect.ai/api/admin/inventory/contracts/{contract_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"autoRenew\": true,\n \"noticePeriodDays\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"extra\": {},\n \"vendorId\": \"<string>\",\n \"continuesFromId\": \"<string>\",\n \"nodeTypes\": [\n {\n \"nodeTypeId\": \"<string>\",\n \"committedNodeCount\": 123,\n \"pricePerGpuHr\": 123,\n \"pricePerNodeHr\": 123,\n \"notes\": \"<string>\",\n \"extra\": {}\n }\n ],\n \"carryOverNodeIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.primeintellect.ai/api/admin/inventory/contracts/{contract_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"autoRenew\": true,\n \"noticePeriodDays\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"extra\": {},\n \"vendorId\": \"<string>\",\n \"continuesFromId\": \"<string>\",\n \"nodeTypes\": [\n {\n \"nodeTypeId\": \"<string>\",\n \"committedNodeCount\": 123,\n \"pricePerGpuHr\": 123,\n \"pricePerNodeHr\": 123,\n \"notes\": \"<string>\",\n \"extra\": {}\n }\n ],\n \"carryOverNodeIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/admin/inventory/contracts/{contract_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"autoRenew\": true,\n \"noticePeriodDays\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"extra\": {},\n \"vendorId\": \"<string>\",\n \"continuesFromId\": \"<string>\",\n \"nodeTypes\": [\n {\n \"nodeTypeId\": \"<string>\",\n \"committedNodeCount\": 123,\n \"pricePerGpuHr\": 123,\n \"pricePerNodeHr\": 123,\n \"notes\": \"<string>\",\n \"extra\": {}\n }\n ],\n \"carryOverNodeIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operationId": "<string>",
"message": "<string>",
"targetId": "<string>",
"targetName": "<string>",
"created": 123,
"updated": 123,
"assigned": 123,
"detached": 123,
"retired": 123
},
"status": "<string>"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}admin-inventory
Update Inventory Contract
PATCH
/
api
/
admin
/
inventory
/
contracts
/
{contract_id}
Update Inventory Contract
curl --request PATCH \
--url https://api.primeintellect.ai/api/admin/inventory/contracts/{contract_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"reference": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"autoRenew": true,
"noticePeriodDays": 123,
"currency": "<string>",
"description": "<string>",
"notes": "<string>",
"extra": {},
"vendorId": "<string>",
"continuesFromId": "<string>",
"nodeTypes": [
{
"nodeTypeId": "<string>",
"committedNodeCount": 123,
"pricePerGpuHr": 123,
"pricePerNodeHr": 123,
"notes": "<string>",
"extra": {}
}
],
"carryOverNodeIds": [
"<string>"
]
}
'import requests
url = "https://api.primeintellect.ai/api/admin/inventory/contracts/{contract_id}"
payload = {
"name": "<string>",
"reference": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"autoRenew": True,
"noticePeriodDays": 123,
"currency": "<string>",
"description": "<string>",
"notes": "<string>",
"extra": {},
"vendorId": "<string>",
"continuesFromId": "<string>",
"nodeTypes": [
{
"nodeTypeId": "<string>",
"committedNodeCount": 123,
"pricePerGpuHr": 123,
"pricePerNodeHr": 123,
"notes": "<string>",
"extra": {}
}
],
"carryOverNodeIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
reference: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
autoRenew: true,
noticePeriodDays: 123,
currency: '<string>',
description: '<string>',
notes: '<string>',
extra: {},
vendorId: '<string>',
continuesFromId: '<string>',
nodeTypes: [
{
nodeTypeId: '<string>',
committedNodeCount: 123,
pricePerGpuHr: 123,
pricePerNodeHr: 123,
notes: '<string>',
extra: {}
}
],
carryOverNodeIds: ['<string>']
})
};
fetch('https://api.primeintellect.ai/api/admin/inventory/contracts/{contract_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.primeintellect.ai/api/admin/inventory/contracts/{contract_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>',
'reference' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'autoRenew' => true,
'noticePeriodDays' => 123,
'currency' => '<string>',
'description' => '<string>',
'notes' => '<string>',
'extra' => [
],
'vendorId' => '<string>',
'continuesFromId' => '<string>',
'nodeTypes' => [
[
'nodeTypeId' => '<string>',
'committedNodeCount' => 123,
'pricePerGpuHr' => 123,
'pricePerNodeHr' => 123,
'notes' => '<string>',
'extra' => [
]
]
],
'carryOverNodeIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.primeintellect.ai/api/admin/inventory/contracts/{contract_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"autoRenew\": true,\n \"noticePeriodDays\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"extra\": {},\n \"vendorId\": \"<string>\",\n \"continuesFromId\": \"<string>\",\n \"nodeTypes\": [\n {\n \"nodeTypeId\": \"<string>\",\n \"committedNodeCount\": 123,\n \"pricePerGpuHr\": 123,\n \"pricePerNodeHr\": 123,\n \"notes\": \"<string>\",\n \"extra\": {}\n }\n ],\n \"carryOverNodeIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.primeintellect.ai/api/admin/inventory/contracts/{contract_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"autoRenew\": true,\n \"noticePeriodDays\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"extra\": {},\n \"vendorId\": \"<string>\",\n \"continuesFromId\": \"<string>\",\n \"nodeTypes\": [\n {\n \"nodeTypeId\": \"<string>\",\n \"committedNodeCount\": 123,\n \"pricePerGpuHr\": 123,\n \"pricePerNodeHr\": 123,\n \"notes\": \"<string>\",\n \"extra\": {}\n }\n ],\n \"carryOverNodeIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/admin/inventory/contracts/{contract_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"autoRenew\": true,\n \"noticePeriodDays\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"extra\": {},\n \"vendorId\": \"<string>\",\n \"continuesFromId\": \"<string>\",\n \"nodeTypes\": [\n {\n \"nodeTypeId\": \"<string>\",\n \"committedNodeCount\": 123,\n \"pricePerGpuHr\": 123,\n \"pricePerNodeHr\": 123,\n \"notes\": \"<string>\",\n \"extra\": {}\n }\n ],\n \"carryOverNodeIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operationId": "<string>",
"message": "<string>",
"targetId": "<string>",
"targetName": "<string>",
"created": 123,
"updated": 123,
"assigned": 123,
"detached": 123,
"retired": 123
},
"status": "<string>"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Body
application/json
Contract create/update. All fields optional (partial update); create
validates name, vendor_id and start_date in the service.
node_types and carry_over_node_ids are create-only conveniences: they are
not columns, they seed the term set and the initial node membership.
Available options:
ONE_OFF, RECURRING, RENEWABLE Available options:
DRAFT, ACTIVE, ENDED, CANCELLED Available options:
ONE_TIME, DAILY, WEEKLY, BIWEEKLY, MONTHLY, BIMONTHLY, QUARTERLY, SEMI_ANNUAL, ANNUAL, BIENNIAL Available options:
ADVANCE, ARREARS Maximum array length:
1000Show child attributes
Show child attributes
Maximum array length:
1000Was this page helpful?