curl --request PATCH \
--url https://api.getprimo.com/equipment-order-intents/{intentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order": {
"products": [
{
"id": "<string>",
"variantId": "<string>",
"supplierId": "<string>",
"configuration": {
"enableZTD": true,
"enableACE": true
},
"hasZTD": true
}
],
"shippingAddress": {
"street": "<string>",
"postalCode": "<string>",
"city": "<string>",
"name": "<string>",
"contactName": "<string>",
"phone": "<string>",
"complement": "<string>",
"country": "<string>",
"countryCode": "<string>"
},
"billingProfileId": "<string>",
"notificationEmails": [
"<string>"
],
"companyComment": "<string>",
"appleCareEnterprise": "<string>",
"companyPurchaseNumber": "<string>"
},
"assignedFromInventory": {
"deviceIds": [],
"accessoryIds": []
},
"automaticEnrollment": true,
"sendToPersonalEmail": true
}
'import requests
url = "https://api.getprimo.com/equipment-order-intents/{intentId}"
payload = {
"order": {
"products": [
{
"id": "<string>",
"variantId": "<string>",
"supplierId": "<string>",
"configuration": {
"enableZTD": True,
"enableACE": True
},
"hasZTD": True
}
],
"shippingAddress": {
"street": "<string>",
"postalCode": "<string>",
"city": "<string>",
"name": "<string>",
"contactName": "<string>",
"phone": "<string>",
"complement": "<string>",
"country": "<string>",
"countryCode": "<string>"
},
"billingProfileId": "<string>",
"notificationEmails": ["<string>"],
"companyComment": "<string>",
"appleCareEnterprise": "<string>",
"companyPurchaseNumber": "<string>"
},
"assignedFromInventory": {
"deviceIds": [],
"accessoryIds": []
},
"automaticEnrollment": True,
"sendToPersonalEmail": True
}
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({
order: {
products: [
{
id: '<string>',
variantId: '<string>',
supplierId: '<string>',
configuration: {enableZTD: true, enableACE: true},
hasZTD: true
}
],
shippingAddress: {
street: '<string>',
postalCode: '<string>',
city: '<string>',
name: '<string>',
contactName: '<string>',
phone: '<string>',
complement: '<string>',
country: '<string>',
countryCode: '<string>'
},
billingProfileId: '<string>',
notificationEmails: ['<string>'],
companyComment: '<string>',
appleCareEnterprise: '<string>',
companyPurchaseNumber: '<string>'
},
assignedFromInventory: {deviceIds: [], accessoryIds: []},
automaticEnrollment: true,
sendToPersonalEmail: true
})
};
fetch('https://api.getprimo.com/equipment-order-intents/{intentId}', 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.getprimo.com/equipment-order-intents/{intentId}",
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([
'order' => [
'products' => [
[
'id' => '<string>',
'variantId' => '<string>',
'supplierId' => '<string>',
'configuration' => [
'enableZTD' => true,
'enableACE' => true
],
'hasZTD' => true
]
],
'shippingAddress' => [
'street' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'name' => '<string>',
'contactName' => '<string>',
'phone' => '<string>',
'complement' => '<string>',
'country' => '<string>',
'countryCode' => '<string>'
],
'billingProfileId' => '<string>',
'notificationEmails' => [
'<string>'
],
'companyComment' => '<string>',
'appleCareEnterprise' => '<string>',
'companyPurchaseNumber' => '<string>'
],
'assignedFromInventory' => [
'deviceIds' => [
],
'accessoryIds' => [
]
],
'automaticEnrollment' => true,
'sendToPersonalEmail' => true
]),
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.getprimo.com/equipment-order-intents/{intentId}"
payload := strings.NewReader("{\n \"order\": {\n \"products\": [\n {\n \"id\": \"<string>\",\n \"variantId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"configuration\": {\n \"enableZTD\": true,\n \"enableACE\": true\n },\n \"hasZTD\": true\n }\n ],\n \"shippingAddress\": {\n \"street\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"name\": \"<string>\",\n \"contactName\": \"<string>\",\n \"phone\": \"<string>\",\n \"complement\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"billingProfileId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"companyComment\": \"<string>\",\n \"appleCareEnterprise\": \"<string>\",\n \"companyPurchaseNumber\": \"<string>\"\n },\n \"assignedFromInventory\": {\n \"deviceIds\": [],\n \"accessoryIds\": []\n },\n \"automaticEnrollment\": true,\n \"sendToPersonalEmail\": true\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.getprimo.com/equipment-order-intents/{intentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order\": {\n \"products\": [\n {\n \"id\": \"<string>\",\n \"variantId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"configuration\": {\n \"enableZTD\": true,\n \"enableACE\": true\n },\n \"hasZTD\": true\n }\n ],\n \"shippingAddress\": {\n \"street\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"name\": \"<string>\",\n \"contactName\": \"<string>\",\n \"phone\": \"<string>\",\n \"complement\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"billingProfileId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"companyComment\": \"<string>\",\n \"appleCareEnterprise\": \"<string>\",\n \"companyPurchaseNumber\": \"<string>\"\n },\n \"assignedFromInventory\": {\n \"deviceIds\": [],\n \"accessoryIds\": []\n },\n \"automaticEnrollment\": true,\n \"sendToPersonalEmail\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getprimo.com/equipment-order-intents/{intentId}")
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 \"order\": {\n \"products\": [\n {\n \"id\": \"<string>\",\n \"variantId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"configuration\": {\n \"enableZTD\": true,\n \"enableACE\": true\n },\n \"hasZTD\": true\n }\n ],\n \"shippingAddress\": {\n \"street\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"name\": \"<string>\",\n \"contactName\": \"<string>\",\n \"phone\": \"<string>\",\n \"complement\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"billingProfileId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"companyComment\": \"<string>\",\n \"appleCareEnterprise\": \"<string>\",\n \"companyPurchaseNumber\": \"<string>\"\n },\n \"assignedFromInventory\": {\n \"deviceIds\": [],\n \"accessoryIds\": []\n },\n \"automaticEnrollment\": true,\n \"sendToPersonalEmail\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"taskId": "<string>",
"ticketId": "<string>",
"employeeId": "<string>",
"order": {
"countryCode": "af",
"products": [
{
"id": "<string>",
"variantId": "<string>",
"supplierId": "<string>",
"hasZTD": true,
"configuration": {
"enableZTD": true,
"enableACE": true
}
}
],
"shippingAddressType": "OFFICE",
"shippingAddress": {
"street": "<string>",
"postalCode": "<string>",
"city": "<string>",
"name": "<string>",
"contactName": "<string>",
"phone": "<string>",
"complement": "<string>",
"country": "<string>",
"countryCode": "<string>"
},
"billingProfileId": "<string>",
"notificationEmails": [
"<string>"
],
"companyComment": "<string>",
"appleCareEnterprise": "<string>",
"companyPurchaseNumber": "<string>"
},
"assignedFromInventory": {
"deviceIds": [],
"accessoryIds": []
},
"automaticEnrollment": true,
"sendToPersonalEmail": true,
"orderId": "<string>",
"executedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Update an equipment order intent
Change what an equipment order intent will do before it executes. Only the fields you send change; order and assignedFromInventory are replaced whole, and null clears one. The employee cannot change: create a new intent for someone else. Refused with INTENT_ALREADY_EXECUTED once executed, TICKET_CLOSED when its task is completed or cancelled, INVENTORY_ASSIGNMENT_REQUIRES_EMPLOYEE for stock on an intent with no employee. Stock ids are checked against the company stock on execute. An equipment order cannot be scheduled, so there is no scheduleDate here: execute the intent when the order is due. executeOnboardingEquipment is the legacy twin: use it only for an onboarding still on the classic Equipment step, which it closes. Use the equipment order intent for equipment work tracked as a task on a ticket (an EQUIPMENT_ORDER task) — it never closes an onboarding Equipment step.
curl --request PATCH \
--url https://api.getprimo.com/equipment-order-intents/{intentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order": {
"products": [
{
"id": "<string>",
"variantId": "<string>",
"supplierId": "<string>",
"configuration": {
"enableZTD": true,
"enableACE": true
},
"hasZTD": true
}
],
"shippingAddress": {
"street": "<string>",
"postalCode": "<string>",
"city": "<string>",
"name": "<string>",
"contactName": "<string>",
"phone": "<string>",
"complement": "<string>",
"country": "<string>",
"countryCode": "<string>"
},
"billingProfileId": "<string>",
"notificationEmails": [
"<string>"
],
"companyComment": "<string>",
"appleCareEnterprise": "<string>",
"companyPurchaseNumber": "<string>"
},
"assignedFromInventory": {
"deviceIds": [],
"accessoryIds": []
},
"automaticEnrollment": true,
"sendToPersonalEmail": true
}
'import requests
url = "https://api.getprimo.com/equipment-order-intents/{intentId}"
payload = {
"order": {
"products": [
{
"id": "<string>",
"variantId": "<string>",
"supplierId": "<string>",
"configuration": {
"enableZTD": True,
"enableACE": True
},
"hasZTD": True
}
],
"shippingAddress": {
"street": "<string>",
"postalCode": "<string>",
"city": "<string>",
"name": "<string>",
"contactName": "<string>",
"phone": "<string>",
"complement": "<string>",
"country": "<string>",
"countryCode": "<string>"
},
"billingProfileId": "<string>",
"notificationEmails": ["<string>"],
"companyComment": "<string>",
"appleCareEnterprise": "<string>",
"companyPurchaseNumber": "<string>"
},
"assignedFromInventory": {
"deviceIds": [],
"accessoryIds": []
},
"automaticEnrollment": True,
"sendToPersonalEmail": True
}
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({
order: {
products: [
{
id: '<string>',
variantId: '<string>',
supplierId: '<string>',
configuration: {enableZTD: true, enableACE: true},
hasZTD: true
}
],
shippingAddress: {
street: '<string>',
postalCode: '<string>',
city: '<string>',
name: '<string>',
contactName: '<string>',
phone: '<string>',
complement: '<string>',
country: '<string>',
countryCode: '<string>'
},
billingProfileId: '<string>',
notificationEmails: ['<string>'],
companyComment: '<string>',
appleCareEnterprise: '<string>',
companyPurchaseNumber: '<string>'
},
assignedFromInventory: {deviceIds: [], accessoryIds: []},
automaticEnrollment: true,
sendToPersonalEmail: true
})
};
fetch('https://api.getprimo.com/equipment-order-intents/{intentId}', 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.getprimo.com/equipment-order-intents/{intentId}",
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([
'order' => [
'products' => [
[
'id' => '<string>',
'variantId' => '<string>',
'supplierId' => '<string>',
'configuration' => [
'enableZTD' => true,
'enableACE' => true
],
'hasZTD' => true
]
],
'shippingAddress' => [
'street' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'name' => '<string>',
'contactName' => '<string>',
'phone' => '<string>',
'complement' => '<string>',
'country' => '<string>',
'countryCode' => '<string>'
],
'billingProfileId' => '<string>',
'notificationEmails' => [
'<string>'
],
'companyComment' => '<string>',
'appleCareEnterprise' => '<string>',
'companyPurchaseNumber' => '<string>'
],
'assignedFromInventory' => [
'deviceIds' => [
],
'accessoryIds' => [
]
],
'automaticEnrollment' => true,
'sendToPersonalEmail' => true
]),
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.getprimo.com/equipment-order-intents/{intentId}"
payload := strings.NewReader("{\n \"order\": {\n \"products\": [\n {\n \"id\": \"<string>\",\n \"variantId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"configuration\": {\n \"enableZTD\": true,\n \"enableACE\": true\n },\n \"hasZTD\": true\n }\n ],\n \"shippingAddress\": {\n \"street\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"name\": \"<string>\",\n \"contactName\": \"<string>\",\n \"phone\": \"<string>\",\n \"complement\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"billingProfileId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"companyComment\": \"<string>\",\n \"appleCareEnterprise\": \"<string>\",\n \"companyPurchaseNumber\": \"<string>\"\n },\n \"assignedFromInventory\": {\n \"deviceIds\": [],\n \"accessoryIds\": []\n },\n \"automaticEnrollment\": true,\n \"sendToPersonalEmail\": true\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.getprimo.com/equipment-order-intents/{intentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order\": {\n \"products\": [\n {\n \"id\": \"<string>\",\n \"variantId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"configuration\": {\n \"enableZTD\": true,\n \"enableACE\": true\n },\n \"hasZTD\": true\n }\n ],\n \"shippingAddress\": {\n \"street\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"name\": \"<string>\",\n \"contactName\": \"<string>\",\n \"phone\": \"<string>\",\n \"complement\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"billingProfileId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"companyComment\": \"<string>\",\n \"appleCareEnterprise\": \"<string>\",\n \"companyPurchaseNumber\": \"<string>\"\n },\n \"assignedFromInventory\": {\n \"deviceIds\": [],\n \"accessoryIds\": []\n },\n \"automaticEnrollment\": true,\n \"sendToPersonalEmail\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getprimo.com/equipment-order-intents/{intentId}")
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 \"order\": {\n \"products\": [\n {\n \"id\": \"<string>\",\n \"variantId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"configuration\": {\n \"enableZTD\": true,\n \"enableACE\": true\n },\n \"hasZTD\": true\n }\n ],\n \"shippingAddress\": {\n \"street\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"name\": \"<string>\",\n \"contactName\": \"<string>\",\n \"phone\": \"<string>\",\n \"complement\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"billingProfileId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"companyComment\": \"<string>\",\n \"appleCareEnterprise\": \"<string>\",\n \"companyPurchaseNumber\": \"<string>\"\n },\n \"assignedFromInventory\": {\n \"deviceIds\": [],\n \"accessoryIds\": []\n },\n \"automaticEnrollment\": true,\n \"sendToPersonalEmail\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"taskId": "<string>",
"ticketId": "<string>",
"employeeId": "<string>",
"order": {
"countryCode": "af",
"products": [
{
"id": "<string>",
"variantId": "<string>",
"supplierId": "<string>",
"hasZTD": true,
"configuration": {
"enableZTD": true,
"enableACE": true
}
}
],
"shippingAddressType": "OFFICE",
"shippingAddress": {
"street": "<string>",
"postalCode": "<string>",
"city": "<string>",
"name": "<string>",
"contactName": "<string>",
"phone": "<string>",
"complement": "<string>",
"country": "<string>",
"countryCode": "<string>"
},
"billingProfileId": "<string>",
"notificationEmails": [
"<string>"
],
"companyComment": "<string>",
"appleCareEnterprise": "<string>",
"companyPurchaseNumber": "<string>"
},
"assignedFromInventory": {
"deviceIds": [],
"accessoryIds": []
},
"automaticEnrollment": true,
"sendToPersonalEmail": true,
"orderId": "<string>",
"executedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Authorizations
Use your Primo API key in the Authorization header as Bearer <API_KEY>.
Path Parameters
Body
Catalog order to place on execute, replaced whole on update. Omit or send null when nothing is purchased.
Show child attributes
Show child attributes
Devices and accessories taken from existing stock and handed over to the employee on execute.
Show child attributes
Show child attributes
Send the employee the MDM enrollment request on execute. Defaults to false.
Send that enrollment request to the personal email. Defaults to false.
Response
Intent id — pass it to updateEquipmentOrderIntent and executeEquipmentOrderIntent
The EQUIPMENT_ORDER task that tracks this order
The ticket holding that task: the parentTicketId sent, or the one Primo opened. Null if it could not be read back.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The order placed on execute, null until then or when nothing was bought
When the intent was executed; null while it can still change
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Was this page helpful?