multiple-and-new-question-type-support-examples
Examples for the Multiple + New Questions Type Support Period#
Examples of new question types#
Dropdown questions#
Unlabeled file uploads#
Labeled file uploads#
note
For labeled file upload questions, the max_allowed_files value must match the number of labels provided in the options array.
Adding multiple personalization questions to a listing#
To create or update personalization questions for a listing you must first have an existing listing. If you do not have one, you can create a new listing using the createDraftListing endpoint before utilizing this endpoint.
During the Developer Preview and after the General Audience launch (if you’ve updated your application to support multiple questions), you must include the query parameter ?supports_multiple_personalization_questions=true in your request to successfully update the listing. If this parameter is omitted or incorrect, the request will result in a 409 Conflict response. Adding the param without updating the application can lead to deleting data provided by the seller on Etsyweb.
The following procedure creates and attaches personalization profile to a specific listing with the maximum number of personalization questions allowed and an unlabeled file upload question:
Form a valid URL for
updateListingPersonalization, which must include ashop_idand alisting_idand include a?supports_multiple_personalization_questions=trueparam.
For example, if yourshop_idis "12345678", and yourlisting_idis “987654” then thecreateListingPersonalizationURL would be:Build the
updateListingPersonalizationrequest body, which must include:personalization_questions- Array of question objects, with the following shape:
- Execute a
updateListingPersonalizationPOST request with yourlistings_wscoped OAuth token and x-api-key. For example, a request with the previouspersonalization_questionmight look like this:
- JavaScript fetch
- You should get a
201 Createdresponse that would look similar to this:
Updating a listing with existing personalization#
When updating personalization on a listing, please be aware that the payload should contain all the personalization information that you want on the listing, as the POST request will replace the existing listing personalization data.
If the update includes existing questions - for instance, if you are adding an additional question to existing ones – please include the question_id for each of the existing questions in your POST request to the updateListingPersonalization endpoint.
The following procedure updates listing personalization with an existing question:
Obtain the
question_idthrough thegetListingPersonalizationGET endpoint, a valid url must include alisting_id. For example, if yourlisting_idis "987654", the URL is:https://api.etsy.com/v3/application/listings/987654/personalization
Read the
question_idvalue from the response.
Form a valid URL for
updateListingPersonalization, which must include ashop_idand alisting_idand include a?supports_multiple_personalization_questions=trueparam.
For example, if yourshop_idis "12345678", and yourlisting_idis “987654” then thecreateListingPersonalizationURL would be:Build the
updateListingPersonalizationrequest body, which must include:personalization_questions- Array of question objects, each question should include itsquestion_idif you’re editing an existing question:
- Execute a
updateListingPersonalizationPOST request with yourlistings_wscoped OAuth token and x-api-key, similar to the example above. - You should get a
201 Createdresponse that would look similar to this:
- Keep in mind that the
question_idis not stable and it might change in a successful response if Etsy detects any changes to the current question.