Im using Etsy API (PHP) from : https://github.com/gentor/etsy-php-laravel. Im having problems trying to create a listing which contains these custom attributes : "color","height". There is an example code but i don't know how to get the "property_id" field from my custom attributes, also i have no clue how to add these custom attributes to my list. I did read their developer document but still can't figure out anything myself, been 2 days and they keep locking my accounts from here means i can't test my code much. Thanks in advance, here is example code i tried:
dd($conn->updateInventory(
[
'params' => [
'listing_id' => '710642930'
],
'data' => [
'products' => [
'json' => json_encode([
[
'sku' => 'sku-1',
'property_values' => [
[
'property_id' => 2000,
'property_name' => 'color',
'values' => 'red'
],
[
'property_name' => 'height',
'property_id' => 5000,
'value' => '57 cm'
]
],
'offerings' => [
[
'price' => 10,
'quantity' => 3
]
]
],
[
'sku' => 'sku-2',
'property_values' => [
[
'property_name' => 'color',
'property_id' => 2000,
'value' => 'red'
],
[
'property_name' => 'height',
'property_id' => 5000,
'value' => '68 cm'
]
],
'offerings' => [
[
'price' => 11,
'quantity' => 4
]
]
],
[
'sku' => 'sku-3',
'property_values' => [
[
'property_name' => 'color',
'property_id' => 2000,
'value' => 'blue'
],
[
'property_name' => 'height',
'property_id' => 5000,
'value' => '57 cm'
]
],
'offerings' => [
[
'price' => 12,
'quantity' => 5
]
]
],
[
'sku' => 'sku-4',
'property_values' => [
[
'property_name' => 'color',
'property_id' => 2000,
'value' => 'blue'
],
[
'property_name' => 'height',
'property_id' => 5000,
'value' => '68 cm'
]
],
'offerings' => [
[
'price' => 14,
'quantity' => 6
]
]
],
])
],
'price_on_property' => [2000, 5000],
'quantity_on_property' => [2000, 5000],
'sku_on_property' => [2000, 5000],
],
]));