# Post / request information from web API

**URL:** <https://discourse.nodered.org/t/post-request-information-from-web-api/51894>\
**Category:** General\
**Created:** [5 October 2021 22:17 UTC](https://discourse.nodered.org/t/post-request-information-from-web-api/51894 "2021-10-05T22:17:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [5 October 2021 22:17 UTC](https://discourse.nodered.org/t/post-request-information-from-web-api/51894/1 "2021-10-05T22:17:01Z")

</div>

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.

```auto
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
}
 ]
} 

```

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [6 October 2021 00:16 UTC](https://discourse.nodered.org/t/post-request-information-from-web-api/51894/2 "2021-10-06T00:16:17Z")

</div>

> [@Sirhc](#):
>
> Is this just a http request and listen node?

~~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 :

```auto
msg.payload = { pool_api_code: "ABCDEF" }

```

which will be in the body of the request.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/f/3f784ed3c42dbd1eb538417eba4ea3e124b2f12c.png)

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [6 October 2021 01:43 UTC](https://discourse.nodered.org/t/post-request-information-from-web-api/51894/3 "2021-10-06T01:43:30Z")

</div>

> [@Sirhc](#):
>
> I don't want to fork out the money until I have complete confidence this will work with node red.

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

---

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [6 October 2021 03:31 UTC](https://discourse.nodered.org/t/post-request-information-from-web-api/51894/4 "2021-10-06T03:31:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 December 2021 03:32 UTC](https://discourse.nodered.org/t/post-request-information-from-web-api/51894/5 "2021-12-05T03:32:32Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
