Closed michal20111 closed 8 months ago
Przesyłasz nieprawidłową strukturę oferty, zgodnie z dokumentacją powinieneś np. przesyłać tablicę obiektów productSet, a całkowicie ją pominąłeś. Jeśli chodzi o wymagane parametry to w takim przypadku powinieneś użyć GET /sale/category/{categoryId}/parameters, aby sprawdzić, czy parametr taki jak "EAN (GTIN)" jest wymagany ("required" = true).
{ "productSet": [ { "quantity": { "value": 1 }, "product": { "name": "test 123", "parameters": [ { "id": "11323", "valuesIds": [ "11323_1" ] }, { "id": "129591", "valuesIds": [ "129591_64", "129591_1", "129591_2" ] }, { "id": "127415", "valuesIds": [ "127415_1769373" ] }, { "id": "215858", "valuesIds": [ "8595AGSVZ" ] }, { "id": "214434", "valuesIds": [ "214434_266990" ] }, { "id": "232713", "valuesIds": [ "232713_368433" ] }, { "id": "232501", "valuesIds": [ [ "232501_4", "232501_16" ] ] } ], "category": { "id": 18719 }, "images": [ "https:\/\/a.allegroimg.com\/original\/11009f\/73d623294fa29cb793db14b218e6", "https:\/\/a.allegroimg.com\/original\/111b7e\/9d6d626249f59600017437af99a9", "https:\/\/a.allegroimg.com\/original\/113908\/fce148c044329023501dc7cf8989", "https:\/\/a.allegroimg.com\/original\/111502\/a05a715247b39732c573ad5bd7de" ] } } ], "category": { "id": 18719 }, "delivery": { "handlingTime": "PT24H", "shippingRates": { "id": "251e31a8-458d-4efc-b423-66579784915b" }, "additionalInfo": "" }, "publication": { "status": "INACTIVE" }, "language": "pl-PL", "afterSalesServices": { "impliedWarranty": { "id": "7b67a2b8-5383-4c9b-a7fe-2704e596878d" }, "returnPolicy": { "id": "4b354945-bf78-401f-b425-fee65dfce1e8" }, "warranty": { "id": "4d5dce11-1a2d-4a06-ba36-18054363dd51" } }, "stock": { "available": 1, "unit": "UNIT" }, "parameters": [ { "id": "11323", "valuesIds": [ "11323_1" ] } ], "name": "test 123", "payments": { "invoice": "VAT" }, "location": { "city": "Warszawa", "countryCode": "PL", "postCode": "22-400", "province": "Mazowieckie" }, "images": [ "https:\/\/a.allegroimg.com\/original\/11009f\/73d623294fa29cb793db14b218e6", "https:\/\/a.allegroimg.com\/original\/111b7e\/9d6d626249f59600017437af99a9", "https:\/\/a.allegroimg.com\/original\/113908\/fce148c044329023501dc7cf8989", "https:\/\/a.allegroimg.com\/original\/111502\/a05a715247b39732c573ad5bd7de" ], "description": { "sections": [ { "items": [ { "type": "TEXT", "content": "test test" } ] }, { "items": [ { "type": "IMAGE", "url": "https:\/\/a.allegroimg.com\/original\/11009f\/73d623294fa29cb793db14b218e6" } ] }, { "items": [ { "type": "IMAGE", "url": "https:\/\/a.allegroimg.com\/original\/11009f\/73d623294fa29cb793db14b218e6" }, { "type": "IMAGE", "url": "https:\/\/a.allegroimg.com\/original\/111b7e\/9d6d626249f59600017437af99a9" } ] }, { "items": [ { "type": "IMAGE", "url": "https:\/\/a.allegroimg.com\/original\/113908\/fce148c044329023501dc7cf8989" }, { "type": "IMAGE", "url": "https:\/\/a.allegroimg.com\/original\/111502\/a05a715247b39732c573ad5bd7de" } ] } ] }, "external": { "id": "H06828" }, "taxSettings": { "rates": [ { "countryCode": "PL" } ] } }
odczytałem że wymagane są parametry 215858,127415,129591,11323 i dostaję Żądanie zawiera błędne dane. Skontaktuj się z autorem aplikacji. Uzupełniłem productset zgodnie z opisem powyżej
To co widać na pierwszy rzut oka:
"items": [
{
"type": "TEXT",
"content": "<p>test test</p>"
}
]
- błędnie wypełniony parametr string w valuesIds, powinno być w values, gdy wpisujesz własną wartość:
{
"id": "215858",
"values": [
"8595AGSVZ"
]
},
Nie ma też ceny, województwo jest niepoprawne (powinno być dużymi literami MAZOWIECKIE), ale to już powinieneś poprawić na podstawie komunikatów błędów jakie otrzymasz.
Więcej o tym jak wystawić ofertę znajdziesz na [dedykowanej stronie](https://developer.allegro.pl/tutorials/jak-jednym-requestem-wystawic-oferte-powiazana-z-produktem-D7Kj9gw4xFA).
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.
Dostaję błąd że Żądanie zawiera błędne dane. id pobrane jest z katalogu. Dodatkowo nie w przypadku szyb posługuje się kodami OE lub Eurocode nie posiadam kodue EAN ani GTIN jak utworzyć nowy produkt ?
{ "b2b": { "buyableOnlyByBusiness": false }, "delivery": { "handlingTime": "PT24H", "shippingRates": { "id": "25c4bdc5-e5df-4bbb-859b-0195faa91345" }, "additionalInfo": "" }, "stock": { "available": 1, "unit": "UNIT" }, "language": "pl-PL", "category": { "id": 18719 }, "parameters": [ { "id": "11323", "valuesIds": [ "11323_2" ] }, { "id": "129591", "valuesIds": [ "129591_64", "129591_1", "129591_2" ] }, { "id": "127415", "valuesIds": [ "127415_708165" ] }, { "id": "215858", "values": [ "2760AGSCMVZ" ] }, { "id": "214434", "valuesIds": [ "214434_266990" ] }, { "id": "232713", "valuesIds": [ "232713_368433" ] }, { "id": "232501", "valuesIds": [ "232501_4", "232501_16" ] } ], "payments": { "invoice": "VAT" }, "name": "TEST", "sellingMode": { "format": "BUY_NOW", "price": { "amount": 150, "currency": "PLN" } }, "location": { "city": "WARSZAWA", "countryCode": "PL", "postCode": "00-200", "province": "MAZOWIECKIE" }, "images": [ { "url": "https:\/\/a.allegroimg.com\/original\/118e8e\/1dc0afd648c38764ba8aaf37733c" }, { "url": "https:\/\/a.allegroimg.com\/original\/113e50\/26ba99bd4db08f36c081d32511c4" }, { "url": "https:\/\/a.allegroimg.com\/original\/11bd91\/3864db4b4ba0850ae81c600a2e80" }, { "url": "https:\/\/a.allegroimg.com\/original\/119979\/957a7ca443e88a46e221583bc165" }, { "url": "https:\/\/a.allegroimg.com\/original\/116b18\/551cce6b4331a576e5e4c845306e" } ], "product": { "id": "1de86769-8bf6-4774-89dc-83940c32091d" }, "description": { "sections": [ { "items": [ { "type": "TEXT", "content": "SZYBA PRZEDNIA DO AUTA" } ] },
}