I’m just getting started with my trial; my goal is to create a portal that an internet service provider can use internally to order fibre broadband services from its wholesaler. All the data in this case will be held by the wholesaler, who has exposed APIs for their resellers to query location information, product availability and to place orders.
I have been able to link to the data source using the Rest API functionality but I’m not able to make the service work in the way I’d like. In particular, there doesn’t seem to be a way to use POST to send specific values to the available endpoints to retrieve a subset of data.
One of the most basic use cases for this sort of portal is to present a text field to the user into which they enter a value (in this case a UK postcode) - that value needs to be captured to the request body, sent to the endpoint, for a list of addresses with that postcode to be returned and displayed as a list.
To be clear, this postcode value needs to be in the body of the request, not as a URL parameter.
To try and do this I have created a list block linked to the API. In the Body tab of the New Resource set up process, if I enter the postcode I want to search for eg:
{
“address”: {
“postCode”: “L28 4EP”
}
}
then the list will show me addresses with those details. Except the only place I can tell the endpoint which postcode to return info for is in the data source configuration screen. I see no way to make this a dynamic variable or to even manually call the API in the first place by means of a form.
TL;DR: how can I configure what gets sent in the body of a POST payload and can the call be made by capturing data entered into a text box?
Thanks!