Products
Update a product
Update a product by its slug
PATCH
/
alpha
/
merchant
/
products
/
{slug}
Update a product
curl --request PATCH \
--url https://api.auctionnow.io/api/alpha/merchant/products/{slug} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"title": "<string>",
"description": "<string>",
"price": 1,
"quantity": 2,
"scheduledStartTime": 123,
"shippingCostUS": 1,
"shippingCostInternational": 1,
"imageUrls": [
"<string>"
],
"digitalLink": "<string>",
"details": {
"color": "red",
"size": "large"
},
"customMessage": "<string>",
"isArchived": true
}
}
'import requests
url = "https://api.auctionnow.io/api/alpha/merchant/products/{slug}"
payload = { "data": {
"title": "<string>",
"description": "<string>",
"price": 1,
"quantity": 2,
"scheduledStartTime": 123,
"shippingCostUS": 1,
"shippingCostInternational": 1,
"imageUrls": ["<string>"],
"digitalLink": "<string>",
"details": {
"color": "red",
"size": "large"
},
"customMessage": "<string>",
"isArchived": True
} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
title: '<string>',
description: '<string>',
price: 1,
quantity: 2,
scheduledStartTime: 123,
shippingCostUS: 1,
shippingCostInternational: 1,
imageUrls: ['<string>'],
digitalLink: '<string>',
details: {color: 'red', size: 'large'},
customMessage: '<string>',
isArchived: true
}
})
};
fetch('https://api.auctionnow.io/api/alpha/merchant/products/{slug}', 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.auctionnow.io/api/alpha/merchant/products/{slug}",
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([
'data' => [
'title' => '<string>',
'description' => '<string>',
'price' => 1,
'quantity' => 2,
'scheduledStartTime' => 123,
'shippingCostUS' => 1,
'shippingCostInternational' => 1,
'imageUrls' => [
'<string>'
],
'digitalLink' => '<string>',
'details' => [
'color' => 'red',
'size' => 'large'
],
'customMessage' => '<string>',
'isArchived' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.auctionnow.io/api/alpha/merchant/products/{slug}"
payload := strings.NewReader("{\n \"data\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 1,\n \"quantity\": 2,\n \"scheduledStartTime\": 123,\n \"shippingCostUS\": 1,\n \"shippingCostInternational\": 1,\n \"imageUrls\": [\n \"<string>\"\n ],\n \"digitalLink\": \"<string>\",\n \"details\": {\n \"color\": \"red\",\n \"size\": \"large\"\n },\n \"customMessage\": \"<string>\",\n \"isArchived\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.auctionnow.io/api/alpha/merchant/products/{slug}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 1,\n \"quantity\": 2,\n \"scheduledStartTime\": 123,\n \"shippingCostUS\": 1,\n \"shippingCostInternational\": 1,\n \"imageUrls\": [\n \"<string>\"\n ],\n \"digitalLink\": \"<string>\",\n \"details\": {\n \"color\": \"red\",\n \"size\": \"large\"\n },\n \"customMessage\": \"<string>\",\n \"isArchived\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.auctionnow.io/api/alpha/merchant/products/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 1,\n \"quantity\": 2,\n \"scheduledStartTime\": 123,\n \"shippingCostUS\": 1,\n \"shippingCostInternational\": 1,\n \"imageUrls\": [\n \"<string>\"\n ],\n \"digitalLink\": \"<string>\",\n \"details\": {\n \"color\": \"red\",\n \"size\": \"large\"\n },\n \"customMessage\": \"<string>\",\n \"isArchived\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "<string>",
"_creationTime": 123,
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"handle": "<string>",
"partyId": "<string>",
"price": 123,
"quantity": 123,
"quantityAvailable": 123,
"shippingCostUS": 123,
"shippingCostInternational": 123,
"status": "<string>",
"image": "<string>",
"digitalLink": "<string>",
"customMessage": "<string>",
"url": "<string>",
"isArchived": true
},
"timestamp": 123,
"message": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"error": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"reason": "<string>"
}{
"error": "<string>"
}Headers
Your Auction Now API key as a Bearer token
Example:
"Bearer ak_XXXXXXX"
Path Parameters
The unique slug of the product
Body
application/json
Fields to update on the product
Show child attributes
Show child attributes
Previous
Delete a productArchive a product by its slug. Archived products are hidden but preserved for history.
Next
⌘I
Update a product
curl --request PATCH \
--url https://api.auctionnow.io/api/alpha/merchant/products/{slug} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"title": "<string>",
"description": "<string>",
"price": 1,
"quantity": 2,
"scheduledStartTime": 123,
"shippingCostUS": 1,
"shippingCostInternational": 1,
"imageUrls": [
"<string>"
],
"digitalLink": "<string>",
"details": {
"color": "red",
"size": "large"
},
"customMessage": "<string>",
"isArchived": true
}
}
'import requests
url = "https://api.auctionnow.io/api/alpha/merchant/products/{slug}"
payload = { "data": {
"title": "<string>",
"description": "<string>",
"price": 1,
"quantity": 2,
"scheduledStartTime": 123,
"shippingCostUS": 1,
"shippingCostInternational": 1,
"imageUrls": ["<string>"],
"digitalLink": "<string>",
"details": {
"color": "red",
"size": "large"
},
"customMessage": "<string>",
"isArchived": True
} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
title: '<string>',
description: '<string>',
price: 1,
quantity: 2,
scheduledStartTime: 123,
shippingCostUS: 1,
shippingCostInternational: 1,
imageUrls: ['<string>'],
digitalLink: '<string>',
details: {color: 'red', size: 'large'},
customMessage: '<string>',
isArchived: true
}
})
};
fetch('https://api.auctionnow.io/api/alpha/merchant/products/{slug}', 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.auctionnow.io/api/alpha/merchant/products/{slug}",
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([
'data' => [
'title' => '<string>',
'description' => '<string>',
'price' => 1,
'quantity' => 2,
'scheduledStartTime' => 123,
'shippingCostUS' => 1,
'shippingCostInternational' => 1,
'imageUrls' => [
'<string>'
],
'digitalLink' => '<string>',
'details' => [
'color' => 'red',
'size' => 'large'
],
'customMessage' => '<string>',
'isArchived' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.auctionnow.io/api/alpha/merchant/products/{slug}"
payload := strings.NewReader("{\n \"data\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 1,\n \"quantity\": 2,\n \"scheduledStartTime\": 123,\n \"shippingCostUS\": 1,\n \"shippingCostInternational\": 1,\n \"imageUrls\": [\n \"<string>\"\n ],\n \"digitalLink\": \"<string>\",\n \"details\": {\n \"color\": \"red\",\n \"size\": \"large\"\n },\n \"customMessage\": \"<string>\",\n \"isArchived\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.auctionnow.io/api/alpha/merchant/products/{slug}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 1,\n \"quantity\": 2,\n \"scheduledStartTime\": 123,\n \"shippingCostUS\": 1,\n \"shippingCostInternational\": 1,\n \"imageUrls\": [\n \"<string>\"\n ],\n \"digitalLink\": \"<string>\",\n \"details\": {\n \"color\": \"red\",\n \"size\": \"large\"\n },\n \"customMessage\": \"<string>\",\n \"isArchived\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.auctionnow.io/api/alpha/merchant/products/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 1,\n \"quantity\": 2,\n \"scheduledStartTime\": 123,\n \"shippingCostUS\": 1,\n \"shippingCostInternational\": 1,\n \"imageUrls\": [\n \"<string>\"\n ],\n \"digitalLink\": \"<string>\",\n \"details\": {\n \"color\": \"red\",\n \"size\": \"large\"\n },\n \"customMessage\": \"<string>\",\n \"isArchived\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "<string>",
"_creationTime": 123,
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"handle": "<string>",
"partyId": "<string>",
"price": 123,
"quantity": 123,
"quantityAvailable": 123,
"shippingCostUS": 123,
"shippingCostInternational": 123,
"status": "<string>",
"image": "<string>",
"digitalLink": "<string>",
"customMessage": "<string>",
"url": "<string>",
"isArchived": true
},
"timestamp": 123,
"message": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"error": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"reason": "<string>"
}{
"error": "<string>"
}