Reputation: 1419
I am currently developing an application that integrates with Etsy's API, specifically using the createDraftListing
endpoint to post new listings. My application focuses on digital downloads, and I am having trouble determining the correct taxonomy_id
to use for these types of products. DOCS
Here's a snippet of my code for creating a draft listing:
import axios from 'axios';
const listingData = {
quantity: 9,
title: "Example Title",
description: "Example Description",
price: 19.99,
who_made: "i_did",
when_made: "2020_2024",
taxonomy_id: ???, // Unsure what to put here
type: "download",
};
axios.post('https://openapi.etsy.com/v3/application/listings', listingData, {
headers: {
'x-api-key': 'Your-Etsy-API-Key',
'Authorization': 'Bearer Your-OAuth-Token',
'Content-Type': 'application/json',
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error posting to Etsy:', error);
});
I am aware that taxonomy_id
is essential for ensuring the listing appears in the correct category on Etsy, but I'm not sure how to find the appropriate ID for digital downloads. I've looked through the Etsy API documentation but haven't found clear guidance on this.
My questions are:
taxonomy_ids
from Etsy's API?taxonomy_id
for digital download products?Any help or pointers to the relevant documentation would be greatly appreciated!
Upvotes: 2
Views: 532
Reputation: 1419
Send a GET
request to this URL: https://openapi.etsy.com/v3/application/seller-taxonomy/nodes
Use your api-key
with a x-api-key
header and the value. You'll receive a large list of taxonomies which you can use. Here is a small amount of the taxonomy code as an example:
{
"count": 15,
"results": [
{
"id": 1,
"level": 1,
"name": "Accessories",
"parent_id": null,
"children": [
{
"id": 2,
"level": 2,
"name": "Belts & Suspenders",
"parent_id": 1,
"children": [
{
"id": 3,
"level": 3,
"name": "Belt Buckles",
"parent_id": 2,
"children": [],
"full_path_taxonomy_ids": [
1,
2,
3
]
},
{
"id": 4,
"level": 3,
"name": "Belts",
"parent_id": 2,
"children": [],
"full_path_taxonomy_ids": [
1,
2,
4
]
},
{
"id": 5,
"level": 3,
"name": "Suspenders",
"parent_id": 2,
"children": [],
"full_path_taxonomy_ids": [
1,
2,
5
]
}
],
"full_path_taxonomy_ids": [
1,
2
]
},
Upvotes: 1