Post / request information from web API

Hello

I have an API offered my my pool manufacturer that I am able to use to communicate with my pool controller.

The API use is shown below.

Do I just use an inject node, then set the payload to pool_api_code: ABCDEF, through to a http node which will return the response JSON?

Note: ABCDEF is provided by the pool supplier.

Apologies for asking a dumb question, but I cannot test this out without forking out alot of money for the controller itself. I don't want to fork out the money until I have complete confidence this will work with node red.

URL: /api/poolconfig
Required JSON POST object:
{
 pool_api_code: string
}
Successful Response JSON object:
{
pool_spa_selection_enabled: boolean,
heat_cool_selection_enabled: boolean,
has_heaters: boolean,
has_solar_systems: boolean,
has_channels: boolean,
has_valves: boolean,
has_lighting_zones: boolean,
has_favourites: boolean,
heaters: [
 {
 heater_ number: integer
 }
],
solar_systems: [
 {
 solar _number: integer
}
],
channels: [
 {
 channel_ number: integer,
 function: integer,
 name: string
 }
],
 
valves: [
 {
 valve_number: integer,
 function: integer,
 name: string
 }
],
lighting_zones: [
{
lighting_zone_number: integer,
name: string,
color_enabled: boolean,
colors_available: [
 {
color_number: integer,
color_name: string
}
}
],
favourites: [
{
favourite_number: integer,
name: string
}
 ]
} 

Whats a listen node ?
just an http request node set to POST
and since the reply is a JSON, set the return to "parsed JSON object"
also in your example there is the Required JSON POST object
so trigger the request with :

msg.payload = { pool_api_code: "ABCDEF" }

which will be in the body of the request.

image

maybe you can ask your supplier if they can setup demo unit online for you for a while to test ?

Thanks for the response, I tried that, they didn't want to hear it haha... I think what you've said has provided me with enough comfort.