Accept orders on Mirakel

Hello,

I'm trying to accept orders on Mirakel but I have HTTP status code error: 400, with Postman everything works.

Here is the step to reproduce:

1) UrlDownload <-- to donwload the orders. that works

{GET} api/orders

2) VisualJSON2Spreadsheet

3) SpreadsheetFilter <-- to select only the orders with WAITING_ACCEPTANCE

4) SpreadsheetMapper <-- everything works perfectly

5) SpreadsheetUrlDownload

Host:

{PUT} /api/orders/${orders_arrorder_id!}/accept <-- I'm not sure what to do here because I need the row from the SpreadsheetMapper with the order ID (orders_arr.order_id) to be in the link

requestBody:

{

"order_lines": [{

"accepted": true,

"id": "${orders_arrorder_lines_arrorder_line_id!}" <-- again here I don't know what to do, I need the row from SpreadsheetMapper

}]

}

Is this the correct method?

Hello Nicolas,


you can iterate over a Spreadsheet in the URLDownload Step using the list command like this:

<#list spreadsheet@SpreadsheetMapper_20.getRows() as row> (You can get the "spreadsheet@SpreadsheetMapper_20" source using the preview funtion of your source spreadsheet)

</#list>

Inside the list you can access the column of the current row like this: row.get("columName").

Sadly I don't know how your Spreadsheet looks like so I can't give any more precise tips.


I hope I were able to help.


Greetings

Stefan