Currently I am using Postmam to check and validate the API credentials, would like to know if anyone can provide me a simple PHP script to do a POST to an API endpoint and to display the response.
The method is POST
URL: https://domain.com/apiupdate
Authorization ->
basic Auth
username
password
HEADER:
Content-Type: application/json
X-Gateway-APIKey:
BODY:
{“updateDate” : “20180203”,
“roomsOccupied” : “3”,
“roomsAvailable” : “10”,
“roomsBooked” : “2”,
“roomsOnMaintenance” : “2”,
“channel” : “XYZ”}