Edit Order Item
curl --request PUT \
--url https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"product_variant_id": 123,
"quantity": 123,
"is_void": true,
"price_current": 123,
"price_sell": 123,
"price_original": 123,
"price_margin": 123,
"tags": [
"<string>"
]
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}"
payload = {
"name": "<string>",
"product_variant_id": 123,
"quantity": 123,
"is_void": True,
"price_current": 123,
"price_sell": 123,
"price_original": 123,
"price_margin": 123,
"tags": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
product_variant_id: 123,
quantity: 123,
is_void: true,
price_current: 123,
price_sell: 123,
price_original: 123,
price_margin: 123,
tags: ['<string>']
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}', 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.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'product_variant_id' => 123,
'quantity' => 123,
'is_void' => true,
'price_current' => 123,
'price_sell' => 123,
'price_original' => 123,
'price_margin' => 123,
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"product_variant_id\": 123,\n \"quantity\": 123,\n \"is_void\": true,\n \"price_current\": 123,\n \"price_sell\": 123,\n \"price_original\": 123,\n \"price_margin\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"product_variant_id\": 123,\n \"quantity\": 123,\n \"is_void\": true,\n \"price_current\": 123,\n \"price_sell\": 123,\n \"price_original\": 123,\n \"price_margin\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"product_variant_id\": 123,\n \"quantity\": 123,\n \"is_void\": true,\n \"price_current\": 123,\n \"price_sell\": 123,\n \"price_original\": 123,\n \"price_margin\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"external_id": "<string>",
"name": "<string>",
"order_id": 123,
"product_id": 123,
"product_variant_id": 123,
"sku": "<string>",
"variant_external_id": "<string>",
"is_void": true,
"quantity": 123,
"price_current": 123,
"price_sell": 123,
"price_original": 123,
"price_margin": 123,
"price_tax": 123,
"discounts": [
"<unknown>"
],
"department": "<string>",
"product_images": {},
"meta": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>",
"product_variant": {
"id": 123,
"product_id": 123,
"sku": "<string>",
"external_id": "<string>",
"barcode": "<string>",
"web_url": "<string>",
"handle": "<string>",
"title": "<string>",
"description": "<string>",
"position": 123,
"price": 123,
"price_discounted": 123,
"price_comparison": 123,
"price_cost": 123,
"available_quantity": 123,
"images": "<string>",
"meta": [
"<unknown>"
],
"tags": [
"<string>"
],
"options": [
{
"name": "<string>",
"value": "<string>",
"sort_order": 123
}
],
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
},
"product": {
"title": "<string>",
"department": "<string>",
"brand": "<string>",
"custom_fields": [
{
"name": "<string>",
"handle": "<string>",
"namespace": "<string>",
"value": "<string>",
"type": "<string>",
"custom_fieldable_type": "<string>",
"custom_fieldable": {
"id": "<string>",
"external_id": "<string>",
"profile_id": "<string>",
"meta": "<string>",
"total": "<string>",
"total_original": "<string>",
"rounding": "<string>",
"margin": "<string>",
"is_void": "<string>",
"transacted_at": "<string>",
"timezone": "<string>",
"payments": "<string>",
"receipt_is_email": "<string>",
"receipt_ref": "<string>",
"linked_receipt_ref": "<string>",
"claimed_at": "<string>",
"receipt_email": "<string>",
"currency_id": "<string>",
"currency_rate": "<string>",
"currency": "<string>",
"type": "<string>",
"status": "<string>",
"order_number": "<string>",
"order_id": "<string>",
"external_order_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"is_index": 123
}
]
},
"order": {
"transacted_at": "<string>",
"receipt_ref": "<string>",
"external_id": "<string>"
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Order Item
Edit Order Item
A PUT to the /orders/{orderId}/items/{itemId} endpoint allows your application to edit an Order Item.
PUT
/
v3
/
orders
/
{order}
/
items
/
{item}
Edit Order Item
curl --request PUT \
--url https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"product_variant_id": 123,
"quantity": 123,
"is_void": true,
"price_current": 123,
"price_sell": 123,
"price_original": 123,
"price_margin": 123,
"tags": [
"<string>"
]
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}"
payload = {
"name": "<string>",
"product_variant_id": 123,
"quantity": 123,
"is_void": True,
"price_current": 123,
"price_sell": 123,
"price_original": 123,
"price_margin": 123,
"tags": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
product_variant_id: 123,
quantity: 123,
is_void: true,
price_current: 123,
price_sell: 123,
price_original: 123,
price_margin: 123,
tags: ['<string>']
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}', 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.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'product_variant_id' => 123,
'quantity' => 123,
'is_void' => true,
'price_current' => 123,
'price_sell' => 123,
'price_original' => 123,
'price_margin' => 123,
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"product_variant_id\": 123,\n \"quantity\": 123,\n \"is_void\": true,\n \"price_current\": 123,\n \"price_sell\": 123,\n \"price_original\": 123,\n \"price_margin\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"product_variant_id\": 123,\n \"quantity\": 123,\n \"is_void\": true,\n \"price_current\": 123,\n \"price_sell\": 123,\n \"price_original\": 123,\n \"price_margin\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/orders/{order}/items/{item}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"product_variant_id\": 123,\n \"quantity\": 123,\n \"is_void\": true,\n \"price_current\": 123,\n \"price_sell\": 123,\n \"price_original\": 123,\n \"price_margin\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"external_id": "<string>",
"name": "<string>",
"order_id": 123,
"product_id": 123,
"product_variant_id": 123,
"sku": "<string>",
"variant_external_id": "<string>",
"is_void": true,
"quantity": 123,
"price_current": 123,
"price_sell": 123,
"price_original": 123,
"price_margin": 123,
"price_tax": 123,
"discounts": [
"<unknown>"
],
"department": "<string>",
"product_images": {},
"meta": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>",
"product_variant": {
"id": 123,
"product_id": 123,
"sku": "<string>",
"external_id": "<string>",
"barcode": "<string>",
"web_url": "<string>",
"handle": "<string>",
"title": "<string>",
"description": "<string>",
"position": 123,
"price": 123,
"price_discounted": 123,
"price_comparison": 123,
"price_cost": 123,
"available_quantity": 123,
"images": "<string>",
"meta": [
"<unknown>"
],
"tags": [
"<string>"
],
"options": [
{
"name": "<string>",
"value": "<string>",
"sort_order": 123
}
],
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
},
"product": {
"title": "<string>",
"department": "<string>",
"brand": "<string>",
"custom_fields": [
{
"name": "<string>",
"handle": "<string>",
"namespace": "<string>",
"value": "<string>",
"type": "<string>",
"custom_fieldable_type": "<string>",
"custom_fieldable": {
"id": "<string>",
"external_id": "<string>",
"profile_id": "<string>",
"meta": "<string>",
"total": "<string>",
"total_original": "<string>",
"rounding": "<string>",
"margin": "<string>",
"is_void": "<string>",
"transacted_at": "<string>",
"timezone": "<string>",
"payments": "<string>",
"receipt_is_email": "<string>",
"receipt_ref": "<string>",
"linked_receipt_ref": "<string>",
"claimed_at": "<string>",
"receipt_email": "<string>",
"currency_id": "<string>",
"currency_rate": "<string>",
"currency": "<string>",
"type": "<string>",
"status": "<string>",
"order_number": "<string>",
"order_id": "<string>",
"external_order_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"is_index": 123
}
]
},
"order": {
"transacted_at": "<string>",
"receipt_ref": "<string>",
"external_id": "<string>"
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Body
application/json
Response
OrderItem
Show child attributes
Show child attributes
⌘I