inakiabt / etsy-php

Etsy API wrapper for PHP
74 stars 59 forks source link

500 error returned from the api #21

Closed xiaEngineer closed 7 years ago

xiaEngineer commented 7 years ago

I am using the following simple data params to be passed into the api. I have the latest updated version. Request: ( [quantity] => 1 [title] => 10KT White Gold 1.75ctw Amethyst & Diamond Cocktail Ring, 11.44gm. Size: 5.25 [description] => This brightly polished 10KT white gold ring contains one amethyst in the center, surrounded by single cut diamonds, all prong set in a raised basket style setting. A twisted rope design finishes the look, all set atop a five layer shank. [price] => 720 [shipping_template_id] => 41269799259 [state] => draft [category_id] => 2115 [who_made] => someone_else [is_supply] => 1 [when_made] => 1980s [taxonomy_id] => 2115 )

Response:

`Server ErrorArray ( [http_code] => 500 [content_type] => text/plain;charset=UTF-8 [url] => https://openapi.etsy.com/v2/private/listings?oauth_consumer_key=hladz5fxyi06xfngxf&oauth_signature_method=HMAC-SHA1&oauth_nonce=2187758e68632f0.99729084&oauth_timestamp=1491502642&oauth_version=1.0&oauth_token=e05dfe0c2b1f4f50ba905a&oauth_signature=IpZEOOkCHxfsY%3D [header_size] => 763 [request_size] => 1027 [filetime] => -1 [ssl_verify_result] => 20 [redirect_count] => 0 [total_time] => 3.25 [namelookup_time] => 0.515 [connect_time] => 0.765 [pretransfer_time] => 1.484 [size_upload] => 597 [size_download] => 12 [speed_download] => 3 [speed_upload] => 183 [download_content_length] => 12 [upload_content_length] => 597 [starttransfer_time] => 3.25 [redirect_time] => 0 [headers_recv] => HTTP/1.1 500 Internal Server Error Server: Apache X-Etsy-Request-Uuid: FfmZT-rZNAdZuDOzIJJm41whRY3S X-RateLimit-Limit: 10000 X-RateLimit-Remaining: 9937 X-Error-Detail: Server Error Cache-Control: private Content-Length: 12 Content-Type: text/plain;charset=UTF-8 Date: Thu, 06 Apr 2017 18:17:25 GMT Connection: close Set-Cookie: uaid=uaid%3Dn28PRQtcM-ZoOKECFux6kkTfHLBo%26_now%3D1491502645%26_slt%3DplKz3Ugl%26_kid%3D1%26_ver%3D1%26_mac%3DIB5NJVofFAYDlE8J1-BdFb-xwPax_U5UHfaBEPSPtmY.; expires=Mon, 07-May-2018 10:35:45 GMT; Max-Age=34186700; path=/; domain=.etsy.com; secure; HttpOnly Set-Cookie: user_prefs=0m8gropPnCk8OCEvLLyGVs1-7mNjZACCiGdtpjA6Oq80J0eHZCKWAQA.; expires=Fri, 06-Apr-2018 18:17:25 GMT; Max-Age=31536000; path=/; domain=.etsy.com

)`

inakiabt commented 7 years ago

Your are using same taxonomy_id for category_id. Does the category_id = 2115 exist? I tried this and it worked:

        ...
        "category_id" => 69150467,
        "taxonomy_id" => 2115,
        ...
xiaEngineer commented 7 years ago

Thank you. Yes these are correct. Can you send me a link from where you're getting the taxonomy_id and category_id's? I have csv file for all categories and that i have 2115 for Jewelry Sets.

inakiabt commented 7 years ago

You can use getSellerTaxonomy and Category methods with this library to get that. Closing this issue. Thanks.