allegro / allegro-api

Issue tracker and wiki for Allegro REST API
https://developer.allegro.pl/
210 stars 39 forks source link

Parameter `Dominant Color` defined ambiguously #9104

Open yu-www opened 1 month ago

yu-www commented 1 month ago

Hi,

call api /sale/product-offers,got error response, thank you for help

request= {"afterSalesServices":{"impliedWarranty":{"id":"76f5d355-cb6a-4cbd-9c0b-6ff791c5e113"},"returnPolicy":{"id":"fe66e33e-5fdd-45a6-9b23-79c9310c78b1"},"warranty":{}},"delivery":{"handlingTime":"P5D","shippingRates":{"id":"738fd916-5287-488a-b05f-2dfe07e290c2"}},"description":{"sections":[{"items":[{"type":"IMAGE","url":"https://ae01.alicdn.com/kf/Scf04241b962e46338a21ef31082416f9f.jpg"},{"content":"<p>【What it does】These solar garden lights are perfect for outdoor decoration and lighting, such as patio entrances and flower beds.</p>","type":"TEXT"}]},{"items":[{"content":"<p>【Working Principle】When you receive the solar flamingo stake, you need to turn the switch to the \"ON\" position and place the solar panel under direct sunlight and charge it for 6 to 8 hours during the day, then the lighting time will be 8 A few hours at night.</p>","type":"TEXT"},{"type":"IMAGE","url":"https://ae01.alicdn.com/kf/S551ece4c97134f6592f624600482dc1cD/Led-gramado-solar-flamingo-l-mpada-ao-ar-livre-movido-a-energia-solar-jardim-luz-quintal.jpg"}]},{"items":[{"type":"IMAGE","url":"https://ae01.alicdn.com/kf/S88818172fc6e471080bade24bed16ed9y.jpg"},{"content":"<p>【Charging Precautions】Please ensure that the solar panel is located in an outdoor area that receives at least 6 hours of sunlight per day.&nbsp; Cool places or bad weather can affect battery charging and shorten working time.</p>","type":"TEXT"}]},{"items":[{"content":"<p>【Away from Other Light Sources】The solar panels of solar garden lights should not be placed near other light sources as the LEDs may be too weak or not work.</p>","type":"TEXT"},{"type":"IMAGE","url":"https://ae01.alicdn.com/kf/S2d54fd5d3e7f4b61bba2fa0e8361bf7cl.jpg"}]},{"items":[{"type":"IMAGE","url":"https://ae01.alicdn.com/kf/S88818172fc6e471080bade24bed16ed9y.jpg"},{"content":"<p>【Specification】</p>\n<p>&nbsp;</p>\n<p>Material: plastic, stainless steel.</p>\n<p>&nbsp;</p>\n<p>pink.</p>\n<p>&nbsp;</p>\n<p>Waterproof grade: IP44</p>\n<p>&nbsp;</p>\n<p>Solar panel: 2v 80mAh</p>\n<p>&nbsp;</p>\n<p>Maximum brightness: 1lux</p>\n<p>&nbsp;</p>\n<p>Battery: 1x AAA 1.2 V 600 mAh NiMH rechargeable battery</p>\n<p>&nbsp;</p>\n<p>Solar charging time: 8 hours</p>\n<p>&nbsp;</p>\n<p>Dimensions: 12.5 x 1.5 x 75 cm</p>\n<p>&nbsp;</p>\n<p>Location of use: parks, lawns, courtyards, lawns, yards, etc.</p>\n<p>&nbsp;</p>\n<p>Package: 3 x Solar Landscape Lights</p>\n<p>&nbsp;</p>","type":"TEXT"}]}]},"external":{"id":"XSCE003"},"images":["https://a.allegroimg.com/original/117a6a/1553a0c2417cb7a92b1ffb22e9b6"],"language":"en-US","location":{"countryCode":"CN"},"name":"Garden Solar LED Lamp FLAMINGO x3pcs Outdoor Waterproof Super LED","parameters":[{"id":"11323","valuesIds":["11323_1"]}],"payments":{"invoice":"NO_INVOICE"},"productSet":[{"product":{"category":{"id":"302981"},"images":["https://a.allegroimg.com/original/11bf66/f347393449a1ad078b51879ab4b4","https://a.allegroimg.com/original/117b9b/7a0d7e18468ba809dcec08c63c0b","https://a.allegroimg.com/original/114d4f/a1fdf5114ae3b78780e780ed34bd","https://a.allegroimg.com/original/110494/413b5da1450eba0a5f1a80eb47ca","https://a.allegroimg.com/original/11bbce/ab1e99f34d66bde9466d1f78ac68","https://a.allegroimg.com/original/11eba3/58e59c304f1eb54611700276e285","https://a.allegroimg.com/original/11c188/e28899424fee8e7d432f27c1ccfc","https://a.allegroimg.com/original/116db2/79e6433a46b5abd63ad7663c58d4","https://a.allegroimg.com/original/110a20/4b3c1af44549bd1eeb8965bf3175","https://a.allegroimg.com/original/11b244/6e5b9df74cb7b1f125e73c137d49","https://a.allegroimg.com/original/113150/c05fa0df4affb52ccfc419ea3eed","https://a.allegroimg.com/original/110fff/2a425fa048ef939ead8326ea6d35"],"name":"Garden Solar LED Lamp FLAMINGO x3pcs Outdoor Waterproof Super LED","parameters":[{"id":"248811","valuesIds":["248811_958954"]},{"id":"243773","values":["Pink"],"valuesIds":["243773_487985"]},{"id":"224017","values":["XSC"]},{"id":"233101","values":["3"]},{"id":"223765","values":["52.5"]},{"id":"225693","values":["0782346943820"]}]}}],"publication":{"marketplaces":{"additional":[{"id":"allegro-cz"},{"id":"allegro-sk"}],"base":{"id":"allegro-pl"}}},"sellingMode":{"price":{"amount":"49","currency":"PLN"}},"stock":{"available":100,"unit":"UNIT"}}

response= {"errors":[{"code":"InvalidDictionaryParameter","message":"The dictionary parameter 'Dominant Color' (id: 243773) is defined ambiguously. Provided value and the dictionary value 'Other' are different.","details":null,"path":"productSet[0].product.parameters","userMessage":"ParameterDominant Colordefined ambiguously. The specified value and the specified dictionary valueOtherdo not match.","metadata":{}}]}

Lukasz-Zurek commented 1 month ago

@yu-www You have provided an ambiguous value for 243773 parameter but you should choose an existing value from our dictionary: 243773_487985 and provide it in "valuesIds" field.

yu-www commented 1 month ago

@yu-www You have provided an ambiguous value for 243773 parameter but you should choose an existing value from our dictionary: 243773_487985 and provide it in "valuesIds" field.

But in my request parameters, I have added the 243773_487985 parameter in valuesIds{"id":"243773","values":["Pink"],"valuesIds":["243773_487985"]}

Is it because when customValuesEnabled=false, I cannot use values to customize values at the same time, and only when customValuesEnabled=true I can customize values

Lukasz-Zurek commented 1 month ago

@yu-www We will take a close look at this case. I will be back with some details soon.

Lukasz-Zurek commented 1 month ago

@yu-www Yes, it is true. If "customValuesEnabled": false, you cannot enter a custom value from outside the dictionary and this is what you are trying to do and we will always return an error.

If your product has a different color, but it is not a color from the available dictionary values ​​- just provide "other" in the "values" field.

stale[bot] commented 1 month ago

W tym wątku nie pojawiła się żadna nowa odpowiedź w ciągu 7 dni, dlatego automatycznie oznaczamy go jako przeterminowany. Jeśli w ciągu kolejnych 7 dni nie pojawi się żadna odpowiedź, wątek zostanie zamknięty. Dziękujemy za zaangażowanie w dyskusję i zachęcamy Cię do wypełnienia ankiety dotyczącej naszego wsparcia na forum.


There was no new reply in this thread within 7 days, therefore, we automatically marked it as expired. If no response is received within the next 7 days, this thread will be closed. Thank you for engaging in the discussion. We encourage you to complete our forum support survey.