Create return Input did not validate. why/what?

Hi,
I'm trying to create return for order
curl -X POST https://api.webshopapp.com/nl/returns.json \
-u xxxx:yyyy \
-d return[customerId]="123275635" \
-d return[orderId]="163345685" \
-d orderProducts[0][quantity]="1" \
-d orderProducts[0][id]="326293755" \
-d return[status]="new" \
-d return[updateStock]="false" \
-d return[notifyStatus]="false" \
-d return[returnReason]="Return Reason" \
-d return[returnAction]="Return Action" \
-d return[staffNote]="Staff Note" \
-d return[mailMessage]="Mail Message" \
-d return[customerComment]="Customer Comment"
but I'm getting error
{"error":{"code":400,"method":"CREATE","request":"\/nl\/returns.json","message":"Input did not validate."}}
Where is problem?
Order xml
executing requestGET https://api.webshopapp.com/nl/orders.xml?number=ORD00008 HTTP/1.1
Response Code : 200
[FPAPI CONN: -1 USER: ] [MESSAGE GET ORDERS RESULT]: <?xml version="1.0" encoding="utf-8"?>
<orders>
<order>
<id>163345685</id>
<createdAt>2020-09-30T12:29:43+02:00</createdAt>
<updatedAt>2020-10-06T09:57:24+02:00</updatedAt>
<number>ORD00008</number>
<status>completed_shipped</status>
<customStatusId>0</customStatusId>
.....
<customer>
<resource>
<id>123275635</id>
<url>customers/123275635</url>
<link>https://api.webshopapp.com/nl/customers/123275635.xml</link>
</resource>
</customer>
...
<products>
<resource>
<id>false</id>
<url>orders/163345685/products</url>
<link>https://api.webshopapp.com/nl/orders/163345685/products.xml</link>
</resource>
</products>
...
</order>
</orders>
Products
https://api.webshopapp.com/nl/orders/163345685/products.xml
<orderProduct>
<id>326293756</id>
<supplierTitle/>
<brandTitle/>
<productTitle>MM-SS20-1-5</productTitle>
<variantTitle/>
<taxRate>0.21</taxRate>
<taxRates>
<taxRate>
<name>VAT</name>
<rate>0.21</rate>
<amount>3.4713</amount>
</taxRate>
</taxRates>
<quantityOrdered>2</quantityOrdered>
<quantityInvoiced>2</quantityInvoiced>
<quantityShipped>2</quantityShipped>
<quantityRefunded>0</quantityRefunded>
<quantityReturned>0</quantityReturned>
<articleCode/>
<ean>6013823030035</ean>
<sku/>
<weight>0</weight>
<volume>0</volume>
<colli>0</colli>
<sizeX>0</sizeX>
<sizeY>0</sizeY>
<sizeZ>0</sizeZ>
<priceCost>0</priceCost>
<customExcl>0</customExcl>
<customIncl>0</customIncl>
<basePriceExcl>8.2645</basePriceExcl>
<basePriceIncl>10</basePriceIncl>
<priceExcl>16.53</priceExcl>
<priceIncl>20</priceIncl>
<discountExcl>0</discountExcl>
<discountIncl>0</discountIncl>
<customFields>false</customFields>
<product>
<resource>
<id>113557157</id>
<url>products/113557157</url>
<link>https://api.webshopapp.com/nl/products/113557157.xml</link>
</resource>
</product>
<variant>
<resource>
<id>228612210</id>
<url>variants/228612210</url>
<link>https://api.webshopapp.com/nl/variants/228612210.xml</link>
</resource>
</variant>
</orderProduct>
<orderProduct>
<id>326293755</id>
<supplierTitle/>
<brandTitle/>
<productTitle>MM-HS20-1-10-100-S</productTitle>
<variantTitle/>
<taxRate>0.21</taxRate>
<taxRates>
<taxRate>
<name>VAT</name>
<rate>0.21</rate>
<amount>1.3881</amount>
</taxRate>
</taxRates>
<quantityOrdered>2</quantityOrdered>
<quantityInvoiced>2</quantityInvoiced>
<quantityShipped>2</quantityShipped>
<quantityRefunded>0</quantityRefunded>
<quantityReturned>0</quantityReturned>
<articleCode/>
<ean>6013823187135</ean>
<sku/>
<weight>0</weight>
<volume>0</volume>
<colli>0</colli>
<sizeX>0</sizeX>
<sizeY>0</sizeY>
<sizeZ>0</sizeZ>
<priceCost>0</priceCost>
<customExcl>0</customExcl>
<customIncl>0</customIncl>
<basePriceExcl>3.3058</basePriceExcl>
<basePriceIncl>4</basePriceIncl>
<priceExcl>6.61</priceExcl>
<priceIncl>8</priceIncl>
<discountExcl>0</discountExcl>
<discountIncl>0</discountIncl>
<customFields>false</customFields>
<product>
<resource>
<id>113708456</id>
<url>products/113708456</url>
<link>https://api.webshopapp.com/nl/products/113708456.xml</link>
</resource>
</product>
<variant>
<resource>
<id>228825525</id>
<url>variants/228825525</url>
<link>https://api.webshopapp.com/nl/variants/228825525.xml</link>
</resource>
</variant>
</orderProduct>
</orderProducts>
Best Answer
-
LucienVersendaal Moderator, Lightspeed Staff Posts: 991 moderator
Hi @Jarek,
Thank you for contacting us.
Can you try to use this curl with your own return data off course:
curl -X POST https://api.webshopapp.com/nl/returns.json \ -u key:secret \ --data '{"return":{"customerId":117426779,"orderId":161335387,"orderProducts":[{"quantity":1,"id":112004058}],"status":"new","updateStock":false,"notifyStatus":false,"returnReason":"Broken","returnAction":"Refunded","customerComment":"Customer Comment"}}'