Attach a product image by URL
curl --request POST \
--url https://api.awardee.com/v1/products/{id}/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"sort_order": 4503599627370495
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', sort_order: 4503599627370495})
};
fetch('https://api.awardee.com/v1/products/{id}/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.awardee.com/v1/products/{id}/images"
payload = {
"url": "<string>",
"sort_order": 4503599627370495
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "product_image",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_url": "<string>",
"file_name": "<string>",
"media_type": "<string>",
"size_bytes": 0,
"sort_order": 0,
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}Endpoints
Attach a product image by URL
Send a public image URL — the server stores it with the product and returns the persisted row. Max 15 MiB. Common formats accepted (JPEG, PNG, WebP, GIF).
POST
/
products
/
{id}
/
images
Attach a product image by URL
curl --request POST \
--url https://api.awardee.com/v1/products/{id}/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"sort_order": 4503599627370495
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', sort_order: 4503599627370495})
};
fetch('https://api.awardee.com/v1/products/{id}/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.awardee.com/v1/products/{id}/images"
payload = {
"url": "<string>",
"sort_order": 4503599627370495
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "product_image",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_url": "<string>",
"file_name": "<string>",
"media_type": "<string>",
"size_bytes": 0,
"sort_order": 0,
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": "<unknown>",
"retry_after": 123
}Authorizations
Send your API key as Authorization: Bearer aw_live_…. Manage keys in the dashboard under Settings → API Keys.
Path Parameters
Body
application/json
Response
Image attached
Allowed value:
"product_image"Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Pattern:
^(?:(?:\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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
