InsuraGuest

Introduction

The API integrates insuraGuest with Property Management Software (PMS).

Overview

You need to register your PMS by visting Register PMS

Authentication

API key and secret key is to be passed in request header which must be valid pair for accessing the API endpoints,these keys are provided after PMS registration.

Error Codes

Status 200 Success

Status 500 Internal Error

Status 400 Bad Request (Validation error)

Status 401 Authentication Error

Status 403 Authorization Error (Deactivated or Blocked)

Status 404 Endpoint not found

Responses

Success Failure

Definitions

Parameter Definition
state State Code / Abbreviation (i.e example New York has NY)
bank_routing_number 9-digit routing or ABA number
bank_account_type Either 'S' (Savings account) or 'C' (Checking account)
expdate Expiry date in MMYY format only
trackdata Encoded data retrieved from card swipe

Rate limit

60 requests per minute.

State code

POST Create Hotel
{{ url }}/api/hotels
HEADERS

Authorization
Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0
BODY

name
Eliot Hotel
address
1/3 Park Avenue
city
New York
state
NY
country
USA
zip
69544
email
eliot@yopmail.com
contact_number
986565654
website
www.eliot.com
contact_person_name
Chris Michele
contact__person_phone
897865444
contact_person_email
chris@yopmail.com
sub_merchant_id
545415
sub_merchant_key
545454415
bank_routing_number
123456789
bank_account_number
8451212131
bank_account_type
C


Sample Request
Create Hotel
var form = new FormData();
form.append("name", "Eliot Hotel");
form.append("address", "1/3 Park Avenue");
form.append("city", "New York");
form.append("state", "NY");
form.append("country", "USA");
form.append("zip", "69544");
form.append("email", "eliot@yopmail.com");
form.append("contact_number", "986565654");
form.append("website", "www.eliot.com");
form.append("contact_person_name", "Chris Michele");
form.append("contact__person_phone", "897865444");
form.append("contact_person_email", "chris@yopmail.com");
form.append("sub_merchant_id", "545415");
form.append("sub_merchant_key", "545454415");
form.append("bank_routing_number", "123456789");
form.append("bank_account_number", "8451212131");
form.append("bank_account_type", "C");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "{{ url }}/api/hotels",
  "method": "POST",
  "headers": {
    "authorization": "Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("{{ url }}/api/hotels")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0'
request.body = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nEliot Hotel\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n1/3 Park Avenue\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nNY\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n69544\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\neliot@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n986565654\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nwww.eliot.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_name\"\r\n\r\nChris Michele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact__person_phone\"\r\n\r\n897865444\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_email\"\r\n\r\nchris@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_key\"\r\n\r\n545454415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_routing_number\"\r\n\r\n123456789\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_number\"\r\n\r\n8451212131\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_type\"\r\n\r\nC\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"

response = http.request(request)
puts response.read_body
import requests

url = "{{ url }}/api/hotels"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nEliot Hotel\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n1/3 Park Avenue\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nNY\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n69544\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\neliot@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n986565654\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nwww.eliot.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_name\"\r\n\r\nChris Michele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact__person_phone\"\r\n\r\n897865444\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_email\"\r\n\r\nchris@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_key\"\r\n\r\n545454415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_routing_number\"\r\n\r\n123456789\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_number\"\r\n\r\n8451212131\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_type\"\r\n\r\nC\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {'authorization': 'Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("http");

var options = {
  "method": "POST",
  "hostname": [
    "insureaguest",
    "hplbusiness",
    "com"
  ],
  "path": [
    "api",
    "hotels"
  ],
  "headers": {
    "authorization": "Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nEliot Hotel\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n1/3 Park Avenue\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nNY\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n69544\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\neliot@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n986565654\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nwww.eliot.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_name\"\r\n\r\nChris Michele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact__person_phone\"\r\n\r\n897865444\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_email\"\r\n\r\nchris@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_key\"\r\n\r\n545454415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_routing_number\"\r\n\r\n123456789\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_number\"\r\n\r\n8451212131\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_type\"\r\n\r\nC\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{ url }}/api/hotels",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nEliot Hotel\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n1/3 Park Avenue\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nNY\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n69544\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\neliot@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n986565654\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nwww.eliot.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_name\"\r\n\r\nChris Michele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact__person_phone\"\r\n\r\n897865444\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_email\"\r\n\r\nchris@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_key\"\r\n\r\n545454415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_routing_number\"\r\n\r\n123456789\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_number\"\r\n\r\n8451212131\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_type\"\r\n\r\nC\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "{{ url }}/api/hotels"

	payload := strings.NewReader("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nEliot Hotel\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n1/3 Park Avenue\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nNY\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n69544\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\neliot@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n986565654\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nwww.eliot.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_name\"\r\n\r\nChris Michele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact__person_phone\"\r\n\r\n897865444\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_person_email\"\r\n\r\nchris@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sub_merchant_key\"\r\n\r\n545454415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_routing_number\"\r\n\r\n123456789\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_number\"\r\n\r\n8451212131\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"bank_account_type\"\r\n\r\nC\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Store Guest
{{ url }}/api/store-guest
HEADERS

Authorization
Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0
BODY

first_name
Chris
last_name
Michele
age
26
contact_number
787454545454
email
chris@insura.com
address
Vegas
hotel_address
Fun resort
hotel_contact_number
878454
hotel_name
Fun resort
hotel_website
www.funresort.com
hotel_email
contact@funresort.com
hotel_sub_merchant_id
545415
hotel_sub_merchant_key
5454545454
insurance_id
2
room_no
221
no_of_days
8
no_of_persons
2
hotel_contact_person_name
Richard
hotel_contact__person_phone
978456541516
hotel_contact_person_email
rich@yopmail.com
country
USA
city
New York
state
UT
zip
60954
hotel_country
USA
hotel_city
New York
hotel_state
UT
hotel_zip
68542
hotel_bank_routing_number
999999999
hotel_bank_account_number
898466515
hotel_bank_account_type
S


Sample Request
Store Guest
var form = new FormData();
form.append("first_name", "Chris");
form.append("last_name", "Michele");
form.append("age", "26");
form.append("contact_number", "787454545454");
form.append("email", "chris@insura.com");
form.append("address", "Vegas");
form.append("hotel_address", "Fun resort");
form.append("hotel_contact_number", "878454");
form.append("hotel_name", "Fun resort");
form.append("hotel_website", "www.funresort.com");
form.append("hotel_email", "contact@funresort.com");
form.append("hotel_sub_merchant_id", "545415");
form.append("hotel_sub_merchant_key", "5454545454");
form.append("insurance_id", "2");
form.append("room_no", "221");
form.append("no_of_days", "8");
form.append("no_of_persons", "2");
form.append("hotel_contact_person_name", "Richard");
form.append("hotel_contact__person_phone", "978456541516");
form.append("hotel_contact_person_email", "rich@yopmail.com");
form.append("country", "USA");
form.append("city", "New York");
form.append("state", "UT");
form.append("zip", "60954");
form.append("hotel_country", "USA");
form.append("hotel_city", "New York");
form.append("hotel_state", "UT");
form.append("hotel_zip", "68542");
form.append("hotel_bank_routing_number", "999999999");
form.append("hotel_bank_account_number", "898466515");
form.append("hotel_bank_account_type", "S");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "{{ url }}/api/store-guest",
  "method": "POST",
  "headers": {
    "authorization": "Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("{{ url }}/api/store-guest")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0'
request.body = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"first_name\"\r\n\r\nChris\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"last_name\"\r\n\r\nMichele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n26\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n787454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nchris@insura.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\nVegas\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_address\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_number\"\r\n\r\n878454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_name\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_website\"\r\n\r\nwww.funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_email\"\r\n\r\ncontact@funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_key\"\r\n\r\n5454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"insurance_id\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"room_no\"\r\n\r\n221\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_days\"\r\n\r\n8\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_persons\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_name\"\r\n\r\nRichard\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact__person_phone\"\r\n\r\n978456541516\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_email\"\r\n\r\nrich@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n60954\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_zip\"\r\n\r\n68542\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_routing_number\"\r\n\r\n999999999\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_number\"\r\n\r\n898466515\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_type\"\r\n\r\nS\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"

response = http.request(request)
puts response.read_body
import requests

url = "{{ url }}/api/store-guest"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"first_name\"\r\n\r\nChris\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"last_name\"\r\n\r\nMichele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n26\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n787454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nchris@insura.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\nVegas\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_address\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_number\"\r\n\r\n878454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_name\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_website\"\r\n\r\nwww.funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_email\"\r\n\r\ncontact@funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_key\"\r\n\r\n5454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"insurance_id\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"room_no\"\r\n\r\n221\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_days\"\r\n\r\n8\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_persons\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_name\"\r\n\r\nRichard\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact__person_phone\"\r\n\r\n978456541516\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_email\"\r\n\r\nrich@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n60954\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_zip\"\r\n\r\n68542\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_routing_number\"\r\n\r\n999999999\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_number\"\r\n\r\n898466515\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_type\"\r\n\r\nS\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {'authorization': 'Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("http");

var options = {
  "method": "POST",
  "hostname": [
    "insureaguest",
    "hplbusiness",
    "com"
  ],
  "path": [
    "api",
    "store-guest"
  ],
  "headers": {
    "authorization": "Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"first_name\"\r\n\r\nChris\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"last_name\"\r\n\r\nMichele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n26\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n787454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nchris@insura.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\nVegas\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_address\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_number\"\r\n\r\n878454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data;name=\"hotel_name\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_website\"\r\n\r\nwww.funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_email\"\r\n\r\ncontact@funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_key\"\r\n\r\n5454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"insurance_id\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"room_no\"\r\n\r\n221\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_days\"\r\n\r\n8\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_persons\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_name\"\r\n\r\nRichard\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact__person_phone\"\r\n\r\n978456541516\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_email\"\r\n\r\nrich@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n60954\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_zip\"\r\n\r\n68542\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_routing_number\"\r\n\r\n999999999\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_number\"\r\n\r\n898466515\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_type\"\r\n\r\nS\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{ url }}/api/store-guest",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"first_name\"\r\n\r\nChris\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"last_name\"\r\n\r\nMichele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n26\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n787454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nchris@insura.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\nVegas\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_address\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_number\"\r\n\r\n878454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data;name=\"hotel_name\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_website\"\r\n\r\nwww.funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_email\"\r\n\r\ncontact@funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_key\"\r\n\r\n5454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"insurance_id\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"room_no\"\r\n\r\n221\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_days\"\r\n\r\n8\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_persons\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_name\"\r\n\r\nRichard\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact__person_phone\"\r\n\r\n978456541516\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_email\"\r\n\r\nrich@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n60954\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_zip\"\r\n\r\n68542\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_routing_number\"\r\n\r\n999999999\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_number\"\r\n\r\n898466515\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_type\"\r\n\r\nS\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "{{ url }}/api/store-guest"

	payload := strings.NewReader("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"first_name\"\r\n\r\nChris\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"last_name\"\r\n\r\nMichele\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"age\"\r\n\r\n26\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"contact_number\"\r\n\r\n787454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nchris@insura.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\nVegas\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_address\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_number\"\r\n\r\n878454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data;name=\"hotel_name\"\r\n\r\nFun resort\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_website\"\r\n\r\nwww.funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_email\"\r\n\r\ncontact@funresort.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_id\"\r\n\r\n545415\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_sub_merchant_key\"\r\n\r\n5454545454\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"insurance_id\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"room_no\"\r\n\r\n221\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_days\"\r\n\r\n8\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"no_of_persons\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_name\"\r\n\r\nRichard\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact__person_phone\"\r\n\r\n978456541516\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_contact_person_email\"\r\n\r\nrich@yopmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"zip\"\r\n\r\n60954\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_country\"\r\n\r\nUSA\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_city\"\r\n\r\nNew York\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_state\"\r\n\r\nUT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_zip\"\r\n\r\n68542\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_routing_number\"\r\n\r\n999999999\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_number\"\r\n\r\n898466515\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_bank_account_type\"\r\n\r\nS\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Card Payment
{{ url }}/api/card-payment

This endpoint should be called after "Store Guest" API with valid card details

HEADERS

Authorization
Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0
BODY

amount
199
customer_id
11
hotel_id
6
cust_hotel_log_id
16
cardnum
4111111111111111
expdate
1220
cvv
255


Sample Request
Card Payment
              var form = new FormData();
form.append("amount", "199");
form.append("customer_id", "11");
form.append("hotel_id", "6");
form.append("cust_hotel_log_id", "16");
form.append("cardnum", "4111111111111111");
form.append("expdate", "1220");
form.append("cvv", "255");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "{{ url }}/api/card-payment",
  "method": "POST",
  "headers": {},
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("{{ url }}/api/card-payment")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request.body = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n199\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n11\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n6\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n16\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cardnum\"\r\n\r\n4111111111111111\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"expdate\"\r\n\r\n1220\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cvv\"\r\n\r\n255\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"

response = http.request(request)
puts response.read_body
import requests

url = "{{ url }}/api/card-payment"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n199\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n11\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n6\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n16\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cardnum\"\r\n\r\n4111111111111111\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"expdate\"\r\n\r\n1220\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cvv\"\r\n\r\n255\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
response = requests.request("POST", url, data=payload)

print(response.text)
var http = require("http");

var options = {
  "method": "POST",
  "hostname": [
    "insuraguest",
    "hplbusiness",
    "com"
  ],
  "path": [
    "api",
    "card-payment"
  ],
  "headers": {}
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n199\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n11\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n6\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n16\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cardnum\"\r\n\r\n4111111111111111\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"expdate\"\r\n\r\n1220\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cvv\"\r\n\r\n255\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{ url }}/api/card-payment",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n199\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n11\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n6\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n16\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cardnum\"\r\n\r\n4111111111111111\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"expdate\"\r\n\r\n1220\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cvv\"\r\n\r\n255\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "{{ url }}/api/card-payment"

  payload := strings.NewReader("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n199\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n11\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n6\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n16\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cardnum\"\r\n\r\n4111111111111111\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"expdate\"\r\n\r\n1220\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cvv\"\r\n\r\n255\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")

  req, _ := http.NewRequest("POST", url, payload)

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))

}
POST Card Swipe
{{ url }}/api/card-swipe

This endpoint should be called after "Store Guest" API with valid trackdata

HEADERS

Authorization
Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0
BODY

cust_hotel_log_id
13
customer_id
1
hotel_id
1
trackdata
Un-Encrypted: %B4111111111111111^SHARAN/RONAK R^1901201000000000000000000000000000178001000?;4111111111111111=19012010000017800100?
amount
100


Sample Request
Card Swipe
var form = new FormData();
form.append("cust_hotel_log_id", "13");
form.append("customer_id", "1");
form.append("hotel_id", "1");
form.append("trackdata", "Un-Encrypted:\n%B4111111111111111^SHARAN/RONAK R^1901201000000000000000000000000000178001000?;4111111111111111=19012010000017800100?\n\n\n");
form.append("amount", "100");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "{{ url }}/api/card-swipe",
  "method": "POST",
  "headers": {
    "authorization": "Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("{{ url }}/api/card-swipe")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0'
request.body = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n13\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"trackdata\"\r\n\r\nUn-Encrypted:\n%B4111111111111111^SHARAN/RONAK R^1901201000000000000000000000000000178001000?;4111111111111111=19012010000017800100?\n\n\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n100\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"

response = http.request(request)
puts response.read_body
import requests

url = "{{ url }}/api/card-swipe"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n13\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"trackdata\"\r\n\r\nUn-Encrypted:\n%B4111111111111111^SHARAN/RONAK R^1901201000000000000000000000000000178001000?;4111111111111111=19012010000017800100?\n\n\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n100\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {'authorization': 'Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("http");

var options = {
  "method": "POST",
  "hostname": [
    "insureaguest",
    "hplbusiness",
    "com"
  ],
  "path": [
    "api",
    "card-swipe"
  ],
  "headers": {
    "authorization": "Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n13\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"trackdata\"\r\n\r\nUn-Encrypted:\n%B4111111111111111^SHARAN/RONAK R^1901201000000000000000000000000000178001000?;4111111111111111=19012010000017800100?\n\n\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n100\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{ url }}/api/card-swipe",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n13\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"trackdata\"\r\n\r\nUn-Encrypted:\n%B4111111111111111^SHARAN/RONAK R^1901201000000000000000000000000000178001000?;4111111111111111=19012010000017800100?\n\n\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n100\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "{{ url }}/api/card-swipe"

	payload := strings.NewReader("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"cust_hotel_log_id\"\r\n\r\n13\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"customer_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"hotel_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"trackdata\"\r\n\r\nUn-Encrypted:\n%B4111111111111111^SHARAN/RONAK R^1901201000000000000000000000000000178001000?;4111111111111111=19012010000017800100?\n\n\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"amount\"\r\n\r\n100\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Basic UkZ5Z0tOMzBkdml2Ki0jLTp1d1dSLSpZSHZyIy0jIzQ0")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}