<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: API request action specific parameters for response custom code in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125278#M54550</link>
    <description>&lt;P&gt;Thank you very much, Dave! I get it now. I think I'll proceed with an object.&lt;/P&gt;&lt;P&gt;By the way, your youtube videos helped me so much! Thank you for that as well.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Apr 2026 20:06:33 GMT</pubDate>
    <dc:creator>gu.toledo</dc:creator>
    <dc:date>2026-04-10T20:06:33Z</dc:date>
    <item>
      <title>API request action specific parameters for response custom code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125266#M54541</link>
      <description>&lt;P&gt;Hi, everyone! I need help with something.&lt;BR /&gt;&lt;BR /&gt;I need to know if there is a way to reference action specific parameters, declared in the parameters tab of an API request, in a custom code request response.&lt;BR /&gt;&lt;BR /&gt;I made a code to extract some data from the response, but I can't make it work. The used code is shown below:&lt;/P&gt;&lt;PRE&gt;Dim dt As New DataTable()

' Define ALL columns
dt.Columns.Add("idConta", GetType(String))
dt.Columns.Add("situacaoProcessamento", GetType(String))
dt.Columns.Add("pagamentoEfetuado", GetType(Boolean))
dt.Columns.Add("dataVencimentoFatura", GetType(DateTime))
dt.Columns.Add("dataVencimentoReal", GetType(DateTime))
dt.Columns.Add("dataFechamento", GetType(DateTime))
dt.Columns.Add("valorTotal", GetType(Double))
dt.Columns.Add("valorPagamentoMinimo", GetType(Double))
dt.Columns.Add("valorDebitosFatura", GetType(Double))
dt.Columns.Add("valorPagamentoEfetuado", GetType(Double))
dt.Columns.Add("saldoAtualizado", GetType(Double))
dt.Columns.Add("atual", GetType(Boolean))

' Parse JSON
Dim json As JObject = JObject.Parse(Response_Content)
Dim content As JArray = json("content")

' Date filter
Dim dataInicio As DateTime = DateTime.Parse(Initial_Date)
Dim dataFim As DateTime = DateTime.Parse(Final_Date)

For Each item As JObject In content

    If Not IsNothing(item("dataVencimentoReal")) Then
        
        Dim dataVenc As DateTime = DateTime.Parse(item("dataVencimentoReal").ToString())

        If dataVenc &amp;gt;= dataInicio AndAlso dataVenc &amp;lt;= dataFim Then
            
            Dim row As DataRow = dt.NewRow()

            ' Strings
            row("idConta") = item("idConta").ToString()
            row("situacaoProcessamento") = item("situacaoProcessamento").ToString()

            ' Booleans
            row("pagamentoEfetuado") = If(item("pagamentoEfetuado") IsNot Nothing, CBool(item("pagamentoEfetuado")), False)
            row("atual") = If(item("atual") IsNot Nothing AndAlso Not IsDBNull(item("atual")), CBool(item("atual")), False)

            ' Dates
            If item("dataVencimentoFatura") IsNot Nothing Then
                row("dataVencimentoFatura") = DateTime.Parse(item("dataVencimentoFatura").ToString())
            End If

            row("dataVencimentoReal") = dataVenc

            If item("dataFechamento") IsNot Nothing Then
                row("dataFechamento") = DateTime.Parse(item("dataFechamento").ToString())
            End If

            ' Numbers (safe conversion)
            row("valorTotal") = If(item("valorTotal") IsNot Nothing, CDbl(item("valorTotal")), 0)
            row("valorPagamentoMinimo") = If(item("valorPagamentoMinimo") IsNot Nothing AndAlso item("valorPagamentoMinimo").ToString() &amp;lt;&amp;gt; "", CDbl(item("valorPagamentoMinimo")), 0)
            row("valorDebitosFatura") = If(item("valorDebitosFatura") IsNot Nothing, CDbl(item("valorDebitosFatura")), 0)
            row("valorPagamentoEfetuado") = If(item("valorPagamentoEfetuado") IsNot Nothing AndAlso item("valorPagamentoEfetuado").ToString() &amp;lt;&amp;gt; "", CDbl(item("valorPagamentoEfetuado")), 0)
            row("saldoAtualizado") = If(item("saldoAtualizado") IsNot Nothing, CDbl(item("saldoAtualizado")), 0)

            dt.Rows.Add(row)
        End If
    End If

Next

Invoices = dt&lt;/PRE&gt;&lt;P&gt;As you can see, I have declared the parameters in the parameters tab for the API request, but they are not showed in the bottom corner, like the other parameters.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gutoledo_0-1775832077548.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/42157i75282FB231BE7119/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gutoledo_0-1775832077548.png" alt="gutoledo_0-1775832077548.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gutoledo_1-1775832077821.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/42158iC5ABE28D8743D858/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gutoledo_1-1775832077821.png" alt="gutoledo_1-1775832077821.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Did I do something wrong or it's just not possible to do it?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2026 14:42:59 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125266#M54541</guid>
      <dc:creator>gu.toledo</dc:creator>
      <dc:date>2026-04-10T14:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: API request action specific parameters for response custom code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125267#M54542</link>
      <description>&lt;P&gt;I may be reading this wrong, but I'll say some words and maybe it's what you're asking.&lt;/P&gt;&lt;P&gt;The "Parameters" are only input parameters I believe, especially given that you cannot select it as In vs Out. To add outputs, I think you'd have to add them to the Response list there underneath Invoices and then use either custom code or json path to extract each of the dates. Now I'll say this: I have perhaps never used custom code there. I've always either used Json Path or passed the whole response and parsed in a Blue Prism object (VBO) using either BP stages or C# there in the VBO. So, I don't know for sure that what I'm saying is correct, but I would assume you need separate custom code for extracting each output param.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2026 14:55:38 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125267#M54542</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2026-04-10T14:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: API request action specific parameters for response custom code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125270#M54545</link>
      <description>&lt;P&gt;Hi, david! Thanks for the response.&lt;/P&gt;&lt;P&gt;But what I want it's this: I want to grab the input parameters, 'Initial Date' and 'Final Date', and pass its values into the response, inside a custom code, so I can filter the 'Response_Content' based on this dates. They were not meant to be output parameters.&lt;/P&gt;&lt;P&gt;I imagined that I could use the input parameters as part of the custom code to extract the response.&lt;/P&gt;&lt;P&gt;Sorry if I didn't explain this the right way.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2026 17:02:20 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125270#M54545</guid>
      <dc:creator>gu.toledo</dc:creator>
      <dc:date>2026-04-10T17:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: API request action specific parameters for response custom code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125274#M54547</link>
      <description>&lt;P&gt;Just to test it out, I took the code and put it right into a code stage, inside a normal object. Then, I setted the 'Initial Date', 'Final Date' and 'Response Content' as input parameters; and the 'Invoices' collection as an output, just like I would have in the web API services section of Blue Prism. Then I setted the current value for the 'Response Request' with the actual API response I got from the request. The code ran beautifully.&lt;/P&gt;&lt;P&gt;Follow the images for the situation I described as well as the code I used for this test.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Dim dt As New DataTable()

' Define ALL columns
dt.Columns.Add("idConta", GetType(String))
dt.Columns.Add("situacaoProcessamento", GetType(String))
dt.Columns.Add("pagamentoEfetuado", GetType(Boolean))
dt.Columns.Add("dataVencimentoFatura", GetType(DateTime))
dt.Columns.Add("dataVencimentoReal", GetType(DateTime))
dt.Columns.Add("dataFechamento", GetType(DateTime))
dt.Columns.Add("valorTotal", GetType(Double))
dt.Columns.Add("valorPagamentoMinimo", GetType(Double))
dt.Columns.Add("valorDebitosFatura", GetType(Double))
dt.Columns.Add("valorPagamentoEfetuado", GetType(Double))
dt.Columns.Add("saldoAtualizado", GetType(Double))
dt.Columns.Add("atual", GetType(Boolean))

' Parse JSON safely
Dim json As JObject = JObject.Parse(Response_Content)
Dim content As JArray = If(json("content"), New JArray())

' --------------------------
' SAFE INPUT DATE PARSING
' --------------------------
Dim dataInicio As DateTime
Dim dataFim As DateTime

If Not DateTime.TryParse(Initial_Date, dataInicio) Then
    Throw New Exception("Invalid Initial Date: " &amp;amp; Initial_Date)
End If

If Not DateTime.TryParse(Final_Date, dataFim) Then
    Throw New Exception("Invalid Final Date: " &amp;amp; Final_Date)
End If

' --------------------------
' MAIN LOOP WITH DEBUG TRAP
' --------------------------
For Each item As JObject In content

    Try

        ' --------------------------
        ' SAFE REQUIRED DATE
        ' --------------------------
        If item("dataVencimentoReal") Is Nothing OrElse item("dataVencimentoReal").ToString().Trim() = "" Then
            Continue For
        End If

        Dim dataVenc As DateTime
        If Not DateTime.TryParse(item("dataVencimentoReal").ToString(), dataVenc) Then
            Continue For
        End If

        ' Filter by input dates
        If dataVenc &amp;lt; dataInicio OrElse dataVenc &amp;gt; dataFim Then
            Continue For
        End If

        Dim row As DataRow = dt.NewRow()

        ' --------------------------
        ' STRINGS
        ' --------------------------
        row("idConta") = If(item("idConta") IsNot Nothing, item("idConta").ToString(), "")
        row("situacaoProcessamento") = If(item("situacaoProcessamento") IsNot Nothing, item("situacaoProcessamento").ToString(), "")

        ' --------------------------
        ' BOOLEANS
        ' --------------------------
        Dim boolTemp As Boolean
        If Boolean.TryParse(If(item("pagamentoEfetuado"), "").ToString(), boolTemp) Then
            row("pagamentoEfetuado") = boolTemp
        Else
            row("pagamentoEfetuado") = False
        End If

        If Boolean.TryParse(If(item("atual"), "").ToString(), boolTemp) Then
            row("atual") = boolTemp
        Else
            row("atual") = False
        End If

        ' --------------------------
        ' OPTIONAL DATES
        ' --------------------------
        Dim tempDate As DateTime

        If item("dataVencimentoFatura") IsNot Nothing AndAlso item("dataVencimentoFatura").ToString().Trim() &amp;lt;&amp;gt; "" Then
            If DateTime.TryParse(item("dataVencimentoFatura").ToString(), tempDate) Then
                row("dataVencimentoFatura") = tempDate
            End If
        End If

        row("dataVencimentoReal") = dataVenc

        If item("dataFechamento") IsNot Nothing AndAlso item("dataFechamento").ToString().Trim() &amp;lt;&amp;gt; "" Then
            If DateTime.TryParse(item("dataFechamento").ToString(), tempDate) Then
                row("dataFechamento") = tempDate
            End If
        End If

        ' --------------------------
        ' NUMBERS
        ' --------------------------
        Dim dblTemp As Double

        If Double.TryParse(If(item("valorTotal"), "0").ToString(), dblTemp) Then
            row("valorTotal") = dblTemp
        Else
            row("valorTotal") = 0
        End If

        If Double.TryParse(If(item("valorPagamentoMinimo"), "0").ToString(), dblTemp) Then
            row("valorPagamentoMinimo") = dblTemp
        Else
            row("valorPagamentoMinimo") = 0
        End If

        If Double.TryParse(If(item("valorDebitosFatura"), "0").ToString(), dblTemp) Then
            row("valorDebitosFatura") = dblTemp
        Else
            row("valorDebitosFatura") = 0
        End If

        If Double.TryParse(If(item("valorPagamentoEfetuado"), "0").ToString(), dblTemp) Then
            row("valorPagamentoEfetuado") = dblTemp
        Else
            row("valorPagamentoEfetuado") = 0
        End If

        If Double.TryParse(If(item("saldoAtualizado"), "0").ToString(), dblTemp) Then
            row("saldoAtualizado") = dblTemp
        Else
            row("saldoAtualizado") = 0
        End If

        dt.Rows.Add(row)

    Catch ex As Exception
        Throw New Exception("Error processing item: " &amp;amp; item.ToString() &amp;amp; " | " &amp;amp; ex.Message)
    End Try

Next

Invoices = dt&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gutoledo_0-1775841592478.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/42159i06EAA865434CA7C8/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gutoledo_0-1775841592478.png" alt="gutoledo_0-1775841592478.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gutoledo_1-1775841674124.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/42160i91F3D4843EC6892A/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gutoledo_1-1775841674124.png" alt="gutoledo_1-1775841674124.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2026 17:21:40 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125274#M54547</guid>
      <dc:creator>gu.toledo</dc:creator>
      <dc:date>2026-04-10T17:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: API request action specific parameters for response custom code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125276#M54549</link>
      <description>&lt;P&gt;I see what you're saying now. I probably just didn't look closely enough. I don't think it's possible to do that. The problem is that the input params are designed only to be sent to the API endpoint, and all the Response area (such as the custom code) has access to is the response from the API. Now, that said, sometimes for APIs, you can include your own custom properties or a header or whatever, and the API will respond with those same values returned to you, and then you could use it like you're saying. I believe the right way for you to handle it is to do this in an object (VBO) like you described.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2026 17:29:58 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125276#M54549</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2026-04-10T17:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: API request action specific parameters for response custom code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125278#M54550</link>
      <description>&lt;P&gt;Thank you very much, Dave! I get it now. I think I'll proceed with an object.&lt;/P&gt;&lt;P&gt;By the way, your youtube videos helped me so much! Thank you for that as well.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2026 20:06:33 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125278#M54550</guid>
      <dc:creator>gu.toledo</dc:creator>
      <dc:date>2026-04-10T20:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: API request action specific parameters for response custom code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125279#M54551</link>
      <description>&lt;P&gt;I'm glad the videos helped!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2026 19:52:23 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/API-request-action-specific-parameters-for-response-custom-code/m-p/125279#M54551</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2026-04-12T19:52:23Z</dc:date>
    </item>
  </channel>
</rss>

