POST Create Item
{{baseUrl}}/pos/items
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/items");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/items" {:headers {:x-apideck-consumer-id ""
                                                                :x-apideck-app-id ""
                                                                :authorization "{{apiKey}}"}
                                                      :content-type :json
                                                      :form-params {:abbreviation ""
                                                                    :absent_at_location_ids []
                                                                    :available false
                                                                    :available_for_pickup false
                                                                    :available_online false
                                                                    :categories []
                                                                    :code ""
                                                                    :cost ""
                                                                    :created_at ""
                                                                    :created_by ""
                                                                    :deleted false
                                                                    :description ""
                                                                    :hidden false
                                                                    :id ""
                                                                    :idempotency_key ""
                                                                    :modifier_groups []
                                                                    :name ""
                                                                    :options []
                                                                    :present_at_all_locations false
                                                                    :price_amount ""
                                                                    :price_currency ""
                                                                    :pricing_type ""
                                                                    :product_type ""
                                                                    :sku ""
                                                                    :tax_ids []
                                                                    :updated_at ""
                                                                    :updated_by ""
                                                                    :variations []
                                                                    :version ""}})
require "http/client"

url = "{{baseUrl}}/pos/items"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/items"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/items");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/items"

	payload := strings.NewReader("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/items HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 615

{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/items")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/items"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/items")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/items")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  abbreviation: '',
  absent_at_location_ids: [],
  available: false,
  available_for_pickup: false,
  available_online: false,
  categories: [],
  code: '',
  cost: '',
  created_at: '',
  created_by: '',
  deleted: false,
  description: '',
  hidden: false,
  id: '',
  idempotency_key: '',
  modifier_groups: [],
  name: '',
  options: [],
  present_at_all_locations: false,
  price_amount: '',
  price_currency: '',
  pricing_type: '',
  product_type: '',
  sku: '',
  tax_ids: [],
  updated_at: '',
  updated_by: '',
  variations: [],
  version: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/items');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/items',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    abbreviation: '',
    absent_at_location_ids: [],
    available: false,
    available_for_pickup: false,
    available_online: false,
    categories: [],
    code: '',
    cost: '',
    created_at: '',
    created_by: '',
    deleted: false,
    description: '',
    hidden: false,
    id: '',
    idempotency_key: '',
    modifier_groups: [],
    name: '',
    options: [],
    present_at_all_locations: false,
    price_amount: '',
    price_currency: '',
    pricing_type: '',
    product_type: '',
    sku: '',
    tax_ids: [],
    updated_at: '',
    updated_by: '',
    variations: [],
    version: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/items';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"abbreviation":"","absent_at_location_ids":[],"available":false,"available_for_pickup":false,"available_online":false,"categories":[],"code":"","cost":"","created_at":"","created_by":"","deleted":false,"description":"","hidden":false,"id":"","idempotency_key":"","modifier_groups":[],"name":"","options":[],"present_at_all_locations":false,"price_amount":"","price_currency":"","pricing_type":"","product_type":"","sku":"","tax_ids":[],"updated_at":"","updated_by":"","variations":[],"version":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/items',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "abbreviation": "",\n  "absent_at_location_ids": [],\n  "available": false,\n  "available_for_pickup": false,\n  "available_online": false,\n  "categories": [],\n  "code": "",\n  "cost": "",\n  "created_at": "",\n  "created_by": "",\n  "deleted": false,\n  "description": "",\n  "hidden": false,\n  "id": "",\n  "idempotency_key": "",\n  "modifier_groups": [],\n  "name": "",\n  "options": [],\n  "present_at_all_locations": false,\n  "price_amount": "",\n  "price_currency": "",\n  "pricing_type": "",\n  "product_type": "",\n  "sku": "",\n  "tax_ids": [],\n  "updated_at": "",\n  "updated_by": "",\n  "variations": [],\n  "version": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/items")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/items',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  abbreviation: '',
  absent_at_location_ids: [],
  available: false,
  available_for_pickup: false,
  available_online: false,
  categories: [],
  code: '',
  cost: '',
  created_at: '',
  created_by: '',
  deleted: false,
  description: '',
  hidden: false,
  id: '',
  idempotency_key: '',
  modifier_groups: [],
  name: '',
  options: [],
  present_at_all_locations: false,
  price_amount: '',
  price_currency: '',
  pricing_type: '',
  product_type: '',
  sku: '',
  tax_ids: [],
  updated_at: '',
  updated_by: '',
  variations: [],
  version: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/items',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    abbreviation: '',
    absent_at_location_ids: [],
    available: false,
    available_for_pickup: false,
    available_online: false,
    categories: [],
    code: '',
    cost: '',
    created_at: '',
    created_by: '',
    deleted: false,
    description: '',
    hidden: false,
    id: '',
    idempotency_key: '',
    modifier_groups: [],
    name: '',
    options: [],
    present_at_all_locations: false,
    price_amount: '',
    price_currency: '',
    pricing_type: '',
    product_type: '',
    sku: '',
    tax_ids: [],
    updated_at: '',
    updated_by: '',
    variations: [],
    version: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/items');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  abbreviation: '',
  absent_at_location_ids: [],
  available: false,
  available_for_pickup: false,
  available_online: false,
  categories: [],
  code: '',
  cost: '',
  created_at: '',
  created_by: '',
  deleted: false,
  description: '',
  hidden: false,
  id: '',
  idempotency_key: '',
  modifier_groups: [],
  name: '',
  options: [],
  present_at_all_locations: false,
  price_amount: '',
  price_currency: '',
  pricing_type: '',
  product_type: '',
  sku: '',
  tax_ids: [],
  updated_at: '',
  updated_by: '',
  variations: [],
  version: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/items',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    abbreviation: '',
    absent_at_location_ids: [],
    available: false,
    available_for_pickup: false,
    available_online: false,
    categories: [],
    code: '',
    cost: '',
    created_at: '',
    created_by: '',
    deleted: false,
    description: '',
    hidden: false,
    id: '',
    idempotency_key: '',
    modifier_groups: [],
    name: '',
    options: [],
    present_at_all_locations: false,
    price_amount: '',
    price_currency: '',
    pricing_type: '',
    product_type: '',
    sku: '',
    tax_ids: [],
    updated_at: '',
    updated_by: '',
    variations: [],
    version: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/items';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"abbreviation":"","absent_at_location_ids":[],"available":false,"available_for_pickup":false,"available_online":false,"categories":[],"code":"","cost":"","created_at":"","created_by":"","deleted":false,"description":"","hidden":false,"id":"","idempotency_key":"","modifier_groups":[],"name":"","options":[],"present_at_all_locations":false,"price_amount":"","price_currency":"","pricing_type":"","product_type":"","sku":"","tax_ids":[],"updated_at":"","updated_by":"","variations":[],"version":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"abbreviation": @"",
                              @"absent_at_location_ids": @[  ],
                              @"available": @NO,
                              @"available_for_pickup": @NO,
                              @"available_online": @NO,
                              @"categories": @[  ],
                              @"code": @"",
                              @"cost": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"deleted": @NO,
                              @"description": @"",
                              @"hidden": @NO,
                              @"id": @"",
                              @"idempotency_key": @"",
                              @"modifier_groups": @[  ],
                              @"name": @"",
                              @"options": @[  ],
                              @"present_at_all_locations": @NO,
                              @"price_amount": @"",
                              @"price_currency": @"",
                              @"pricing_type": @"",
                              @"product_type": @"",
                              @"sku": @"",
                              @"tax_ids": @[  ],
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"variations": @[  ],
                              @"version": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/items"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/items" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/items",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'abbreviation' => '',
    'absent_at_location_ids' => [
        
    ],
    'available' => null,
    'available_for_pickup' => null,
    'available_online' => null,
    'categories' => [
        
    ],
    'code' => '',
    'cost' => '',
    'created_at' => '',
    'created_by' => '',
    'deleted' => null,
    'description' => '',
    'hidden' => null,
    'id' => '',
    'idempotency_key' => '',
    'modifier_groups' => [
        
    ],
    'name' => '',
    'options' => [
        
    ],
    'present_at_all_locations' => null,
    'price_amount' => '',
    'price_currency' => '',
    'pricing_type' => '',
    'product_type' => '',
    'sku' => '',
    'tax_ids' => [
        
    ],
    'updated_at' => '',
    'updated_by' => '',
    'variations' => [
        
    ],
    'version' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/items', [
  'body' => '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/items');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'abbreviation' => '',
  'absent_at_location_ids' => [
    
  ],
  'available' => null,
  'available_for_pickup' => null,
  'available_online' => null,
  'categories' => [
    
  ],
  'code' => '',
  'cost' => '',
  'created_at' => '',
  'created_by' => '',
  'deleted' => null,
  'description' => '',
  'hidden' => null,
  'id' => '',
  'idempotency_key' => '',
  'modifier_groups' => [
    
  ],
  'name' => '',
  'options' => [
    
  ],
  'present_at_all_locations' => null,
  'price_amount' => '',
  'price_currency' => '',
  'pricing_type' => '',
  'product_type' => '',
  'sku' => '',
  'tax_ids' => [
    
  ],
  'updated_at' => '',
  'updated_by' => '',
  'variations' => [
    
  ],
  'version' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'abbreviation' => '',
  'absent_at_location_ids' => [
    
  ],
  'available' => null,
  'available_for_pickup' => null,
  'available_online' => null,
  'categories' => [
    
  ],
  'code' => '',
  'cost' => '',
  'created_at' => '',
  'created_by' => '',
  'deleted' => null,
  'description' => '',
  'hidden' => null,
  'id' => '',
  'idempotency_key' => '',
  'modifier_groups' => [
    
  ],
  'name' => '',
  'options' => [
    
  ],
  'present_at_all_locations' => null,
  'price_amount' => '',
  'price_currency' => '',
  'pricing_type' => '',
  'product_type' => '',
  'sku' => '',
  'tax_ids' => [
    
  ],
  'updated_at' => '',
  'updated_by' => '',
  'variations' => [
    
  ],
  'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/items');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/items' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/items' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/items", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/items"

payload = {
    "abbreviation": "",
    "absent_at_location_ids": [],
    "available": False,
    "available_for_pickup": False,
    "available_online": False,
    "categories": [],
    "code": "",
    "cost": "",
    "created_at": "",
    "created_by": "",
    "deleted": False,
    "description": "",
    "hidden": False,
    "id": "",
    "idempotency_key": "",
    "modifier_groups": [],
    "name": "",
    "options": [],
    "present_at_all_locations": False,
    "price_amount": "",
    "price_currency": "",
    "pricing_type": "",
    "product_type": "",
    "sku": "",
    "tax_ids": [],
    "updated_at": "",
    "updated_by": "",
    "variations": [],
    "version": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/items"

payload <- "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/items")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/items') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/items";

    let payload = json!({
        "abbreviation": "",
        "absent_at_location_ids": (),
        "available": false,
        "available_for_pickup": false,
        "available_online": false,
        "categories": (),
        "code": "",
        "cost": "",
        "created_at": "",
        "created_by": "",
        "deleted": false,
        "description": "",
        "hidden": false,
        "id": "",
        "idempotency_key": "",
        "modifier_groups": (),
        "name": "",
        "options": (),
        "present_at_all_locations": false,
        "price_amount": "",
        "price_currency": "",
        "pricing_type": "",
        "product_type": "",
        "sku": "",
        "tax_ids": (),
        "updated_at": "",
        "updated_by": "",
        "variations": (),
        "version": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/items \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}'
echo '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}' |  \
  http POST {{baseUrl}}/pos/items \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "abbreviation": "",\n  "absent_at_location_ids": [],\n  "available": false,\n  "available_for_pickup": false,\n  "available_online": false,\n  "categories": [],\n  "code": "",\n  "cost": "",\n  "created_at": "",\n  "created_by": "",\n  "deleted": false,\n  "description": "",\n  "hidden": false,\n  "id": "",\n  "idempotency_key": "",\n  "modifier_groups": [],\n  "name": "",\n  "options": [],\n  "present_at_all_locations": false,\n  "price_amount": "",\n  "price_currency": "",\n  "pricing_type": "",\n  "product_type": "",\n  "sku": "",\n  "tax_ids": [],\n  "updated_at": "",\n  "updated_by": "",\n  "variations": [],\n  "version": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/items
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/items")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "Items",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete Item
{{baseUrl}}/pos/items/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/items/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/pos/items/:id" {:headers {:x-apideck-consumer-id ""
                                                                      :x-apideck-app-id ""
                                                                      :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/items/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/pos/items/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/items/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/items/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/pos/items/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/pos/items/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/items/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/items/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/pos/items/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/pos/items/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/items/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/items/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/items/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/pos/items/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/items/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/items/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/items/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/items/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/pos/items/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/items/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/items/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/items/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/items/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/pos/items/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/items/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/items/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/items/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/pos/items/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/items/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/pos/items/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/pos/items/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/items/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/items/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "Items",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get Item
{{baseUrl}}/pos/items/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/items/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/items/:id" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/items/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/items/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/items/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/items/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/items/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/items/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/items/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/items/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/items/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/items/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/items/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/items/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/items/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/items/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/items/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/items/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/items/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/items/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/items/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/items/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/items/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/items/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/items/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/items/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/items/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/items/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/items/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/items/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/items/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/items/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/items/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/items/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/items/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "abbreviation": "Ch",
    "absent_at_location_ids": [
      "12345",
      "67890"
    ],
    "available": true,
    "available_for_pickup": false,
    "available_online": false,
    "categories": [
      {
        "id": "12345",
        "image_ids": [
          "12345",
          "67890"
        ],
        "name": "Food"
      }
    ],
    "code": "11910345",
    "cost": 2,
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "deleted": true,
    "description": "Hot Chocolate",
    "hidden": true,
    "id": "#cocoa",
    "idempotency_key": "random_string",
    "modifier_groups": [
      {
        "id": "12345"
      }
    ],
    "name": "Cocoa",
    "present_at_all_locations": false,
    "price_amount": 10,
    "price_currency": "USD",
    "pricing_type": "fixed",
    "product_type": "regular",
    "sku": "11910345",
    "tax_ids": [
      "12345",
      "67890"
    ],
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345",
    "variations": [
      {
        "id": "12345",
        "image_ids": [
          "12345",
          "67890"
        ],
        "item_id": "12345",
        "name": "Food",
        "price_amount": 10,
        "price_currency": "USD",
        "pricing_type": "fixed",
        "sequence": 0,
        "sku": "11910345"
      }
    ],
    "version": "12345"
  },
  "operation": "one",
  "resource": "Items",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List Items
{{baseUrl}}/pos/items
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/items");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/items" {:headers {:x-apideck-consumer-id ""
                                                               :x-apideck-app-id ""
                                                               :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/items"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/items"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/items");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/items"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/items HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/items")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/items"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/items")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/items")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/items');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/items',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/items';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/items',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/items")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/items',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/items',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/items');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/items',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/items';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/items"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/items" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/items",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/items', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/items');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/items');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/items' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/items' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/items", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/items"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/items"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/items")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/items') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/items";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/items \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/items \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/items
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/items")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "Items",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update Item
{{baseUrl}}/pos/items/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/items/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/pos/items/:id" {:headers {:x-apideck-consumer-id ""
                                                                     :x-apideck-app-id ""
                                                                     :authorization "{{apiKey}}"}
                                                           :content-type :json
                                                           :form-params {:abbreviation ""
                                                                         :absent_at_location_ids []
                                                                         :available false
                                                                         :available_for_pickup false
                                                                         :available_online false
                                                                         :categories []
                                                                         :code ""
                                                                         :cost ""
                                                                         :created_at ""
                                                                         :created_by ""
                                                                         :deleted false
                                                                         :description ""
                                                                         :hidden false
                                                                         :id ""
                                                                         :idempotency_key ""
                                                                         :modifier_groups []
                                                                         :name ""
                                                                         :options []
                                                                         :present_at_all_locations false
                                                                         :price_amount ""
                                                                         :price_currency ""
                                                                         :pricing_type ""
                                                                         :product_type ""
                                                                         :sku ""
                                                                         :tax_ids []
                                                                         :updated_at ""
                                                                         :updated_by ""
                                                                         :variations []
                                                                         :version ""}})
require "http/client"

url = "{{baseUrl}}/pos/items/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/pos/items/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/items/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/items/:id"

	payload := strings.NewReader("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/pos/items/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 615

{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/pos/items/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/items/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/items/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/pos/items/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  abbreviation: '',
  absent_at_location_ids: [],
  available: false,
  available_for_pickup: false,
  available_online: false,
  categories: [],
  code: '',
  cost: '',
  created_at: '',
  created_by: '',
  deleted: false,
  description: '',
  hidden: false,
  id: '',
  idempotency_key: '',
  modifier_groups: [],
  name: '',
  options: [],
  present_at_all_locations: false,
  price_amount: '',
  price_currency: '',
  pricing_type: '',
  product_type: '',
  sku: '',
  tax_ids: [],
  updated_at: '',
  updated_by: '',
  variations: [],
  version: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/pos/items/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    abbreviation: '',
    absent_at_location_ids: [],
    available: false,
    available_for_pickup: false,
    available_online: false,
    categories: [],
    code: '',
    cost: '',
    created_at: '',
    created_by: '',
    deleted: false,
    description: '',
    hidden: false,
    id: '',
    idempotency_key: '',
    modifier_groups: [],
    name: '',
    options: [],
    present_at_all_locations: false,
    price_amount: '',
    price_currency: '',
    pricing_type: '',
    product_type: '',
    sku: '',
    tax_ids: [],
    updated_at: '',
    updated_by: '',
    variations: [],
    version: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/items/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"abbreviation":"","absent_at_location_ids":[],"available":false,"available_for_pickup":false,"available_online":false,"categories":[],"code":"","cost":"","created_at":"","created_by":"","deleted":false,"description":"","hidden":false,"id":"","idempotency_key":"","modifier_groups":[],"name":"","options":[],"present_at_all_locations":false,"price_amount":"","price_currency":"","pricing_type":"","product_type":"","sku":"","tax_ids":[],"updated_at":"","updated_by":"","variations":[],"version":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/items/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "abbreviation": "",\n  "absent_at_location_ids": [],\n  "available": false,\n  "available_for_pickup": false,\n  "available_online": false,\n  "categories": [],\n  "code": "",\n  "cost": "",\n  "created_at": "",\n  "created_by": "",\n  "deleted": false,\n  "description": "",\n  "hidden": false,\n  "id": "",\n  "idempotency_key": "",\n  "modifier_groups": [],\n  "name": "",\n  "options": [],\n  "present_at_all_locations": false,\n  "price_amount": "",\n  "price_currency": "",\n  "pricing_type": "",\n  "product_type": "",\n  "sku": "",\n  "tax_ids": [],\n  "updated_at": "",\n  "updated_by": "",\n  "variations": [],\n  "version": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/items/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  abbreviation: '',
  absent_at_location_ids: [],
  available: false,
  available_for_pickup: false,
  available_online: false,
  categories: [],
  code: '',
  cost: '',
  created_at: '',
  created_by: '',
  deleted: false,
  description: '',
  hidden: false,
  id: '',
  idempotency_key: '',
  modifier_groups: [],
  name: '',
  options: [],
  present_at_all_locations: false,
  price_amount: '',
  price_currency: '',
  pricing_type: '',
  product_type: '',
  sku: '',
  tax_ids: [],
  updated_at: '',
  updated_by: '',
  variations: [],
  version: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    abbreviation: '',
    absent_at_location_ids: [],
    available: false,
    available_for_pickup: false,
    available_online: false,
    categories: [],
    code: '',
    cost: '',
    created_at: '',
    created_by: '',
    deleted: false,
    description: '',
    hidden: false,
    id: '',
    idempotency_key: '',
    modifier_groups: [],
    name: '',
    options: [],
    present_at_all_locations: false,
    price_amount: '',
    price_currency: '',
    pricing_type: '',
    product_type: '',
    sku: '',
    tax_ids: [],
    updated_at: '',
    updated_by: '',
    variations: [],
    version: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/pos/items/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  abbreviation: '',
  absent_at_location_ids: [],
  available: false,
  available_for_pickup: false,
  available_online: false,
  categories: [],
  code: '',
  cost: '',
  created_at: '',
  created_by: '',
  deleted: false,
  description: '',
  hidden: false,
  id: '',
  idempotency_key: '',
  modifier_groups: [],
  name: '',
  options: [],
  present_at_all_locations: false,
  price_amount: '',
  price_currency: '',
  pricing_type: '',
  product_type: '',
  sku: '',
  tax_ids: [],
  updated_at: '',
  updated_by: '',
  variations: [],
  version: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/items/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    abbreviation: '',
    absent_at_location_ids: [],
    available: false,
    available_for_pickup: false,
    available_online: false,
    categories: [],
    code: '',
    cost: '',
    created_at: '',
    created_by: '',
    deleted: false,
    description: '',
    hidden: false,
    id: '',
    idempotency_key: '',
    modifier_groups: [],
    name: '',
    options: [],
    present_at_all_locations: false,
    price_amount: '',
    price_currency: '',
    pricing_type: '',
    product_type: '',
    sku: '',
    tax_ids: [],
    updated_at: '',
    updated_by: '',
    variations: [],
    version: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/items/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"abbreviation":"","absent_at_location_ids":[],"available":false,"available_for_pickup":false,"available_online":false,"categories":[],"code":"","cost":"","created_at":"","created_by":"","deleted":false,"description":"","hidden":false,"id":"","idempotency_key":"","modifier_groups":[],"name":"","options":[],"present_at_all_locations":false,"price_amount":"","price_currency":"","pricing_type":"","product_type":"","sku":"","tax_ids":[],"updated_at":"","updated_by":"","variations":[],"version":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"abbreviation": @"",
                              @"absent_at_location_ids": @[  ],
                              @"available": @NO,
                              @"available_for_pickup": @NO,
                              @"available_online": @NO,
                              @"categories": @[  ],
                              @"code": @"",
                              @"cost": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"deleted": @NO,
                              @"description": @"",
                              @"hidden": @NO,
                              @"id": @"",
                              @"idempotency_key": @"",
                              @"modifier_groups": @[  ],
                              @"name": @"",
                              @"options": @[  ],
                              @"present_at_all_locations": @NO,
                              @"price_amount": @"",
                              @"price_currency": @"",
                              @"pricing_type": @"",
                              @"product_type": @"",
                              @"sku": @"",
                              @"tax_ids": @[  ],
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"variations": @[  ],
                              @"version": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/items/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/items/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/items/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'abbreviation' => '',
    'absent_at_location_ids' => [
        
    ],
    'available' => null,
    'available_for_pickup' => null,
    'available_online' => null,
    'categories' => [
        
    ],
    'code' => '',
    'cost' => '',
    'created_at' => '',
    'created_by' => '',
    'deleted' => null,
    'description' => '',
    'hidden' => null,
    'id' => '',
    'idempotency_key' => '',
    'modifier_groups' => [
        
    ],
    'name' => '',
    'options' => [
        
    ],
    'present_at_all_locations' => null,
    'price_amount' => '',
    'price_currency' => '',
    'pricing_type' => '',
    'product_type' => '',
    'sku' => '',
    'tax_ids' => [
        
    ],
    'updated_at' => '',
    'updated_by' => '',
    'variations' => [
        
    ],
    'version' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/pos/items/:id', [
  'body' => '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/items/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'abbreviation' => '',
  'absent_at_location_ids' => [
    
  ],
  'available' => null,
  'available_for_pickup' => null,
  'available_online' => null,
  'categories' => [
    
  ],
  'code' => '',
  'cost' => '',
  'created_at' => '',
  'created_by' => '',
  'deleted' => null,
  'description' => '',
  'hidden' => null,
  'id' => '',
  'idempotency_key' => '',
  'modifier_groups' => [
    
  ],
  'name' => '',
  'options' => [
    
  ],
  'present_at_all_locations' => null,
  'price_amount' => '',
  'price_currency' => '',
  'pricing_type' => '',
  'product_type' => '',
  'sku' => '',
  'tax_ids' => [
    
  ],
  'updated_at' => '',
  'updated_by' => '',
  'variations' => [
    
  ],
  'version' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'abbreviation' => '',
  'absent_at_location_ids' => [
    
  ],
  'available' => null,
  'available_for_pickup' => null,
  'available_online' => null,
  'categories' => [
    
  ],
  'code' => '',
  'cost' => '',
  'created_at' => '',
  'created_by' => '',
  'deleted' => null,
  'description' => '',
  'hidden' => null,
  'id' => '',
  'idempotency_key' => '',
  'modifier_groups' => [
    
  ],
  'name' => '',
  'options' => [
    
  ],
  'present_at_all_locations' => null,
  'price_amount' => '',
  'price_currency' => '',
  'pricing_type' => '',
  'product_type' => '',
  'sku' => '',
  'tax_ids' => [
    
  ],
  'updated_at' => '',
  'updated_by' => '',
  'variations' => [
    
  ],
  'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/items/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/items/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/items/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/pos/items/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/items/:id"

payload = {
    "abbreviation": "",
    "absent_at_location_ids": [],
    "available": False,
    "available_for_pickup": False,
    "available_online": False,
    "categories": [],
    "code": "",
    "cost": "",
    "created_at": "",
    "created_by": "",
    "deleted": False,
    "description": "",
    "hidden": False,
    "id": "",
    "idempotency_key": "",
    "modifier_groups": [],
    "name": "",
    "options": [],
    "present_at_all_locations": False,
    "price_amount": "",
    "price_currency": "",
    "pricing_type": "",
    "product_type": "",
    "sku": "",
    "tax_ids": [],
    "updated_at": "",
    "updated_by": "",
    "variations": [],
    "version": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/items/:id"

payload <- "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/items/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/pos/items/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"abbreviation\": \"\",\n  \"absent_at_location_ids\": [],\n  \"available\": false,\n  \"available_for_pickup\": false,\n  \"available_online\": false,\n  \"categories\": [],\n  \"code\": \"\",\n  \"cost\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"hidden\": false,\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_groups\": [],\n  \"name\": \"\",\n  \"options\": [],\n  \"present_at_all_locations\": false,\n  \"price_amount\": \"\",\n  \"price_currency\": \"\",\n  \"pricing_type\": \"\",\n  \"product_type\": \"\",\n  \"sku\": \"\",\n  \"tax_ids\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"variations\": [],\n  \"version\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/items/:id";

    let payload = json!({
        "abbreviation": "",
        "absent_at_location_ids": (),
        "available": false,
        "available_for_pickup": false,
        "available_online": false,
        "categories": (),
        "code": "",
        "cost": "",
        "created_at": "",
        "created_by": "",
        "deleted": false,
        "description": "",
        "hidden": false,
        "id": "",
        "idempotency_key": "",
        "modifier_groups": (),
        "name": "",
        "options": (),
        "present_at_all_locations": false,
        "price_amount": "",
        "price_currency": "",
        "pricing_type": "",
        "product_type": "",
        "sku": "",
        "tax_ids": (),
        "updated_at": "",
        "updated_by": "",
        "variations": (),
        "version": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/pos/items/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}'
echo '{
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
}' |  \
  http PATCH {{baseUrl}}/pos/items/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "abbreviation": "",\n  "absent_at_location_ids": [],\n  "available": false,\n  "available_for_pickup": false,\n  "available_online": false,\n  "categories": [],\n  "code": "",\n  "cost": "",\n  "created_at": "",\n  "created_by": "",\n  "deleted": false,\n  "description": "",\n  "hidden": false,\n  "id": "",\n  "idempotency_key": "",\n  "modifier_groups": [],\n  "name": "",\n  "options": [],\n  "present_at_all_locations": false,\n  "price_amount": "",\n  "price_currency": "",\n  "pricing_type": "",\n  "product_type": "",\n  "sku": "",\n  "tax_ids": [],\n  "updated_at": "",\n  "updated_by": "",\n  "variations": [],\n  "version": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/items/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "abbreviation": "",
  "absent_at_location_ids": [],
  "available": false,
  "available_for_pickup": false,
  "available_online": false,
  "categories": [],
  "code": "",
  "cost": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "description": "",
  "hidden": false,
  "id": "",
  "idempotency_key": "",
  "modifier_groups": [],
  "name": "",
  "options": [],
  "present_at_all_locations": false,
  "price_amount": "",
  "price_currency": "",
  "pricing_type": "",
  "product_type": "",
  "sku": "",
  "tax_ids": [],
  "updated_at": "",
  "updated_by": "",
  "variations": [],
  "version": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/items/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "Items",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create Location
{{baseUrl}}/pos/locations
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/locations");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/locations" {:headers {:x-apideck-consumer-id ""
                                                                    :x-apideck-app-id ""
                                                                    :authorization "{{apiKey}}"}
                                                          :content-type :json
                                                          :form-params {:address {:city ""
                                                                                  :contact_name ""
                                                                                  :country ""
                                                                                  :county ""
                                                                                  :email ""
                                                                                  :fax ""
                                                                                  :id ""
                                                                                  :latitude ""
                                                                                  :line1 ""
                                                                                  :line2 ""
                                                                                  :line3 ""
                                                                                  :line4 ""
                                                                                  :longitude ""
                                                                                  :name ""
                                                                                  :phone_number ""
                                                                                  :postal_code ""
                                                                                  :row_version ""
                                                                                  :salutation ""
                                                                                  :state ""
                                                                                  :street_number ""
                                                                                  :string ""
                                                                                  :type ""
                                                                                  :website ""}
                                                                        :business_name ""
                                                                        :created_at ""
                                                                        :created_by ""
                                                                        :currency ""
                                                                        :id ""
                                                                        :merchant_id ""
                                                                        :name ""
                                                                        :status ""
                                                                        :updated_at ""
                                                                        :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/locations"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/locations"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/locations");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/locations"

	payload := strings.NewReader("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/locations HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 640

{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/locations")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/locations"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/locations")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/locations")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  business_name: '',
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  merchant_id: '',
  name: '',
  status: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/locations');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/locations',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    business_name: '',
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    merchant_id: '',
    name: '',
    status: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/locations';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"business_name":"","created_at":"","created_by":"","currency":"","id":"","merchant_id":"","name":"","status":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/locations',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "business_name": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "merchant_id": "",\n  "name": "",\n  "status": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/locations")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/locations',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  business_name: '',
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  merchant_id: '',
  name: '',
  status: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/locations',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    business_name: '',
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    merchant_id: '',
    name: '',
    status: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/locations');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  business_name: '',
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  merchant_id: '',
  name: '',
  status: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/locations',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    business_name: '',
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    merchant_id: '',
    name: '',
    status: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/locations';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"business_name":"","created_at":"","created_by":"","currency":"","id":"","merchant_id":"","name":"","status":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" },
                              @"business_name": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"id": @"",
                              @"merchant_id": @"",
                              @"name": @"",
                              @"status": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/locations"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/locations" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/locations",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'address' => [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ],
    'business_name' => '',
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'id' => '',
    'merchant_id' => '',
    'name' => '',
    'status' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/locations', [
  'body' => '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/locations');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'business_name' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'merchant_id' => '',
  'name' => '',
  'status' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'business_name' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'merchant_id' => '',
  'name' => '',
  'status' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/locations');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/locations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/locations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/locations", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/locations"

payload = {
    "address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
    },
    "business_name": "",
    "created_at": "",
    "created_by": "",
    "currency": "",
    "id": "",
    "merchant_id": "",
    "name": "",
    "status": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/locations"

payload <- "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/locations")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/locations') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/locations";

    let payload = json!({
        "address": json!({
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }),
        "business_name": "",
        "created_at": "",
        "created_by": "",
        "currency": "",
        "id": "",
        "merchant_id": "",
        "name": "",
        "status": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/locations \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http POST {{baseUrl}}/pos/locations \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "business_name": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "merchant_id": "",\n  "name": "",\n  "status": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/locations
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "address": [
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  ],
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/locations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "Locations",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete Location
{{baseUrl}}/pos/locations/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/locations/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/pos/locations/:id" {:headers {:x-apideck-consumer-id ""
                                                                          :x-apideck-app-id ""
                                                                          :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/locations/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/pos/locations/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/locations/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/locations/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/pos/locations/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/pos/locations/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/locations/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/locations/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/pos/locations/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/pos/locations/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/locations/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/locations/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/locations/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/pos/locations/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/locations/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/locations/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/locations/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/locations/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/pos/locations/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/locations/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/locations/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/locations/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/locations/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/pos/locations/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/locations/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/locations/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/locations/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/pos/locations/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/locations/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/pos/locations/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/pos/locations/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/locations/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/locations/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "Locations",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get Location
{{baseUrl}}/pos/locations/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/locations/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/locations/:id" {:headers {:x-apideck-consumer-id ""
                                                                       :x-apideck-app-id ""
                                                                       :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/locations/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/locations/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/locations/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/locations/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/locations/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/locations/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/locations/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/locations/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/locations/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/locations/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/locations/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/locations/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/locations/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/locations/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/locations/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/locations/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/locations/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/locations/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/locations/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/locations/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/locations/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/locations/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/locations/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/locations/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/locations/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/locations/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/locations/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/locations/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/locations/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/locations/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/locations/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/locations/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/locations/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "business_name": "Dunkin Donuts LLC",
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "currency": "USD",
    "id": "12345",
    "merchant_id": "12345",
    "name": "Dunkin Donuts",
    "status": "active",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345"
  },
  "operation": "one",
  "resource": "Locations",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List Locations
{{baseUrl}}/pos/locations
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/locations");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/locations" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/locations"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/locations"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/locations");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/locations"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/locations HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/locations")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/locations"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/locations")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/locations")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/locations');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/locations',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/locations';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/locations',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/locations")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/locations',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/locations',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/locations');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/locations',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/locations';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/locations"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/locations" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/locations",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/locations', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/locations');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/locations');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/locations' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/locations' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/locations", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/locations"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/locations"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/locations")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/locations') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/locations";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/locations \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/locations \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/locations
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/locations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "Locations",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update Location
{{baseUrl}}/pos/locations/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/locations/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/pos/locations/:id" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}
                                                               :content-type :json
                                                               :form-params {:address {:city ""
                                                                                       :contact_name ""
                                                                                       :country ""
                                                                                       :county ""
                                                                                       :email ""
                                                                                       :fax ""
                                                                                       :id ""
                                                                                       :latitude ""
                                                                                       :line1 ""
                                                                                       :line2 ""
                                                                                       :line3 ""
                                                                                       :line4 ""
                                                                                       :longitude ""
                                                                                       :name ""
                                                                                       :phone_number ""
                                                                                       :postal_code ""
                                                                                       :row_version ""
                                                                                       :salutation ""
                                                                                       :state ""
                                                                                       :street_number ""
                                                                                       :string ""
                                                                                       :type ""
                                                                                       :website ""}
                                                                             :business_name ""
                                                                             :created_at ""
                                                                             :created_by ""
                                                                             :currency ""
                                                                             :id ""
                                                                             :merchant_id ""
                                                                             :name ""
                                                                             :status ""
                                                                             :updated_at ""
                                                                             :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/locations/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/pos/locations/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/locations/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/locations/:id"

	payload := strings.NewReader("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/pos/locations/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 640

{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/pos/locations/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/locations/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/locations/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/pos/locations/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  business_name: '',
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  merchant_id: '',
  name: '',
  status: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/pos/locations/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    business_name: '',
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    merchant_id: '',
    name: '',
    status: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/locations/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"business_name":"","created_at":"","created_by":"","currency":"","id":"","merchant_id":"","name":"","status":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/locations/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "business_name": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "merchant_id": "",\n  "name": "",\n  "status": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/locations/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  business_name: '',
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  merchant_id: '',
  name: '',
  status: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    business_name: '',
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    merchant_id: '',
    name: '',
    status: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/pos/locations/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  business_name: '',
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  merchant_id: '',
  name: '',
  status: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/locations/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    business_name: '',
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    merchant_id: '',
    name: '',
    status: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/locations/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"business_name":"","created_at":"","created_by":"","currency":"","id":"","merchant_id":"","name":"","status":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" },
                              @"business_name": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"id": @"",
                              @"merchant_id": @"",
                              @"name": @"",
                              @"status": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/locations/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/locations/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/locations/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'address' => [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ],
    'business_name' => '',
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'id' => '',
    'merchant_id' => '',
    'name' => '',
    'status' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/pos/locations/:id', [
  'body' => '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/locations/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'business_name' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'merchant_id' => '',
  'name' => '',
  'status' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'business_name' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'merchant_id' => '',
  'name' => '',
  'status' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/locations/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/locations/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/locations/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/pos/locations/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/locations/:id"

payload = {
    "address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
    },
    "business_name": "",
    "created_at": "",
    "created_by": "",
    "currency": "",
    "id": "",
    "merchant_id": "",
    "name": "",
    "status": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/locations/:id"

payload <- "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/locations/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/pos/locations/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"business_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"merchant_id\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/locations/:id";

    let payload = json!({
        "address": json!({
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }),
        "business_name": "",
        "created_at": "",
        "created_by": "",
        "currency": "",
        "id": "",
        "merchant_id": "",
        "name": "",
        "status": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/pos/locations/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http PATCH {{baseUrl}}/pos/locations/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "business_name": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "merchant_id": "",\n  "name": "",\n  "status": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/locations/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "address": [
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  ],
  "business_name": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "merchant_id": "",
  "name": "",
  "status": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/locations/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "Locations",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create Merchant
{{baseUrl}}/pos/merchants
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/merchants");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/merchants" {:headers {:x-apideck-consumer-id ""
                                                                    :x-apideck-app-id ""
                                                                    :authorization "{{apiKey}}"}
                                                          :content-type :json
                                                          :form-params {:address {:city ""
                                                                                  :contact_name ""
                                                                                  :country ""
                                                                                  :county ""
                                                                                  :email ""
                                                                                  :fax ""
                                                                                  :id ""
                                                                                  :latitude ""
                                                                                  :line1 ""
                                                                                  :line2 ""
                                                                                  :line3 ""
                                                                                  :line4 ""
                                                                                  :longitude ""
                                                                                  :name ""
                                                                                  :phone_number ""
                                                                                  :postal_code ""
                                                                                  :row_version ""
                                                                                  :salutation ""
                                                                                  :state ""
                                                                                  :street_number ""
                                                                                  :string ""
                                                                                  :type ""
                                                                                  :website ""}
                                                                        :created_at ""
                                                                        :created_by ""
                                                                        :currency ""
                                                                        :id ""
                                                                        :language ""
                                                                        :main_location_id ""
                                                                        :name ""
                                                                        :owner_id ""
                                                                        :service_charges [{:active false
                                                                                           :amount ""
                                                                                           :currency ""
                                                                                           :id ""
                                                                                           :name ""
                                                                                           :percentage ""
                                                                                           :type ""}]
                                                                        :status ""
                                                                        :updated_at ""
                                                                        :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/merchants"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/merchants"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/merchants");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/merchants"

	payload := strings.NewReader("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/merchants HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 838

{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/merchants")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/merchants"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/merchants")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/merchants")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  language: '',
  main_location_id: '',
  name: '',
  owner_id: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  status: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/merchants');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/merchants',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    language: '',
    main_location_id: '',
    name: '',
    owner_id: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    status: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/merchants';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"created_at":"","created_by":"","currency":"","id":"","language":"","main_location_id":"","name":"","owner_id":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"status":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/merchants',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "language": "",\n  "main_location_id": "",\n  "name": "",\n  "owner_id": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "status": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/merchants")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/merchants',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  language: '',
  main_location_id: '',
  name: '',
  owner_id: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  status: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/merchants',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    language: '',
    main_location_id: '',
    name: '',
    owner_id: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    status: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/merchants');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  language: '',
  main_location_id: '',
  name: '',
  owner_id: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  status: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/merchants',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    language: '',
    main_location_id: '',
    name: '',
    owner_id: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    status: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/merchants';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"created_at":"","created_by":"","currency":"","id":"","language":"","main_location_id":"","name":"","owner_id":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"status":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" },
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"id": @"",
                              @"language": @"",
                              @"main_location_id": @"",
                              @"name": @"",
                              @"owner_id": @"",
                              @"service_charges": @[ @{ @"active": @NO, @"amount": @"", @"currency": @"", @"id": @"", @"name": @"", @"percentage": @"", @"type": @"" } ],
                              @"status": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/merchants"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/merchants" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/merchants",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'address' => [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ],
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'id' => '',
    'language' => '',
    'main_location_id' => '',
    'name' => '',
    'owner_id' => '',
    'service_charges' => [
        [
                'active' => null,
                'amount' => '',
                'currency' => '',
                'id' => '',
                'name' => '',
                'percentage' => '',
                'type' => ''
        ]
    ],
    'status' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/merchants', [
  'body' => '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/merchants');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'language' => '',
  'main_location_id' => '',
  'name' => '',
  'owner_id' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'status' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'language' => '',
  'main_location_id' => '',
  'name' => '',
  'owner_id' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'status' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/merchants');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/merchants' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/merchants' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/merchants", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/merchants"

payload = {
    "address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
    },
    "created_at": "",
    "created_by": "",
    "currency": "",
    "id": "",
    "language": "",
    "main_location_id": "",
    "name": "",
    "owner_id": "",
    "service_charges": [
        {
            "active": False,
            "amount": "",
            "currency": "",
            "id": "",
            "name": "",
            "percentage": "",
            "type": ""
        }
    ],
    "status": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/merchants"

payload <- "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/merchants")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/merchants') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/merchants";

    let payload = json!({
        "address": json!({
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }),
        "created_at": "",
        "created_by": "",
        "currency": "",
        "id": "",
        "language": "",
        "main_location_id": "",
        "name": "",
        "owner_id": "",
        "service_charges": (
            json!({
                "active": false,
                "amount": "",
                "currency": "",
                "id": "",
                "name": "",
                "percentage": "",
                "type": ""
            })
        ),
        "status": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/merchants \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http POST {{baseUrl}}/pos/merchants \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "language": "",\n  "main_location_id": "",\n  "name": "",\n  "owner_id": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "status": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/merchants
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "address": [
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  ],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    [
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    ]
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/merchants")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "Merchants",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete Merchant
{{baseUrl}}/pos/merchants/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/merchants/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/pos/merchants/:id" {:headers {:x-apideck-consumer-id ""
                                                                          :x-apideck-app-id ""
                                                                          :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/merchants/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/pos/merchants/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/merchants/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/merchants/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/pos/merchants/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/pos/merchants/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/merchants/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/merchants/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/pos/merchants/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/pos/merchants/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/merchants/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/merchants/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/merchants/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/pos/merchants/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/merchants/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/merchants/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/merchants/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/merchants/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/pos/merchants/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/merchants/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/merchants/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/merchants/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/merchants/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/pos/merchants/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/merchants/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/merchants/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/merchants/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/pos/merchants/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/merchants/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/pos/merchants/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/pos/merchants/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/merchants/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/merchants/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "Merchants",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get Merchant
{{baseUrl}}/pos/merchants/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/merchants/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/merchants/:id" {:headers {:x-apideck-consumer-id ""
                                                                       :x-apideck-app-id ""
                                                                       :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/merchants/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/merchants/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/merchants/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/merchants/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/merchants/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/merchants/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/merchants/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/merchants/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/merchants/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/merchants/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/merchants/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/merchants/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/merchants/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/merchants/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/merchants/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/merchants/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/merchants/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/merchants/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/merchants/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/merchants/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/merchants/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/merchants/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/merchants/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/merchants/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/merchants/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/merchants/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/merchants/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/merchants/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/merchants/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/merchants/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/merchants/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/merchants/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/merchants/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "currency": "USD",
    "id": "12345",
    "language": "EN",
    "main_location_id": "12345",
    "name": "Dunkin Donuts",
    "owner_id": "12345",
    "status": "active",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345"
  },
  "operation": "one",
  "resource": "Merchants",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List Merchants
{{baseUrl}}/pos/merchants
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/merchants");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/merchants" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/merchants"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/merchants"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/merchants");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/merchants"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/merchants HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/merchants")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/merchants"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/merchants")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/merchants")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/merchants');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/merchants',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/merchants';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/merchants',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/merchants")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/merchants',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/merchants',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/merchants');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/merchants',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/merchants';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/merchants"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/merchants" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/merchants",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/merchants', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/merchants');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/merchants');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/merchants' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/merchants' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/merchants", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/merchants"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/merchants"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/merchants")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/merchants') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/merchants";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/merchants \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/merchants \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/merchants
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/merchants")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "Merchants",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update Merchant
{{baseUrl}}/pos/merchants/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/merchants/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/pos/merchants/:id" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}
                                                               :content-type :json
                                                               :form-params {:address {:city ""
                                                                                       :contact_name ""
                                                                                       :country ""
                                                                                       :county ""
                                                                                       :email ""
                                                                                       :fax ""
                                                                                       :id ""
                                                                                       :latitude ""
                                                                                       :line1 ""
                                                                                       :line2 ""
                                                                                       :line3 ""
                                                                                       :line4 ""
                                                                                       :longitude ""
                                                                                       :name ""
                                                                                       :phone_number ""
                                                                                       :postal_code ""
                                                                                       :row_version ""
                                                                                       :salutation ""
                                                                                       :state ""
                                                                                       :street_number ""
                                                                                       :string ""
                                                                                       :type ""
                                                                                       :website ""}
                                                                             :created_at ""
                                                                             :created_by ""
                                                                             :currency ""
                                                                             :id ""
                                                                             :language ""
                                                                             :main_location_id ""
                                                                             :name ""
                                                                             :owner_id ""
                                                                             :service_charges [{:active false
                                                                                                :amount ""
                                                                                                :currency ""
                                                                                                :id ""
                                                                                                :name ""
                                                                                                :percentage ""
                                                                                                :type ""}]
                                                                             :status ""
                                                                             :updated_at ""
                                                                             :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/merchants/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/pos/merchants/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/merchants/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/merchants/:id"

	payload := strings.NewReader("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/pos/merchants/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 838

{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/pos/merchants/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/merchants/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/merchants/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/pos/merchants/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  language: '',
  main_location_id: '',
  name: '',
  owner_id: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  status: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/pos/merchants/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    language: '',
    main_location_id: '',
    name: '',
    owner_id: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    status: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/merchants/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"created_at":"","created_by":"","currency":"","id":"","language":"","main_location_id":"","name":"","owner_id":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"status":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/merchants/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "language": "",\n  "main_location_id": "",\n  "name": "",\n  "owner_id": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "status": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/merchants/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  language: '',
  main_location_id: '',
  name: '',
  owner_id: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  status: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    language: '',
    main_location_id: '',
    name: '',
    owner_id: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    status: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/pos/merchants/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  language: '',
  main_location_id: '',
  name: '',
  owner_id: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  status: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/merchants/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    language: '',
    main_location_id: '',
    name: '',
    owner_id: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    status: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/merchants/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"created_at":"","created_by":"","currency":"","id":"","language":"","main_location_id":"","name":"","owner_id":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"status":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" },
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"id": @"",
                              @"language": @"",
                              @"main_location_id": @"",
                              @"name": @"",
                              @"owner_id": @"",
                              @"service_charges": @[ @{ @"active": @NO, @"amount": @"", @"currency": @"", @"id": @"", @"name": @"", @"percentage": @"", @"type": @"" } ],
                              @"status": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/merchants/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/merchants/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/merchants/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'address' => [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ],
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'id' => '',
    'language' => '',
    'main_location_id' => '',
    'name' => '',
    'owner_id' => '',
    'service_charges' => [
        [
                'active' => null,
                'amount' => '',
                'currency' => '',
                'id' => '',
                'name' => '',
                'percentage' => '',
                'type' => ''
        ]
    ],
    'status' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/pos/merchants/:id', [
  'body' => '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/merchants/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'language' => '',
  'main_location_id' => '',
  'name' => '',
  'owner_id' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'status' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'language' => '',
  'main_location_id' => '',
  'name' => '',
  'owner_id' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'status' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/merchants/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/merchants/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/merchants/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/pos/merchants/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/merchants/:id"

payload = {
    "address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
    },
    "created_at": "",
    "created_by": "",
    "currency": "",
    "id": "",
    "language": "",
    "main_location_id": "",
    "name": "",
    "owner_id": "",
    "service_charges": [
        {
            "active": False,
            "amount": "",
            "currency": "",
            "id": "",
            "name": "",
            "percentage": "",
            "type": ""
        }
    ],
    "status": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/merchants/:id"

payload <- "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/merchants/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/pos/merchants/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"main_location_id\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/merchants/:id";

    let payload = json!({
        "address": json!({
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }),
        "created_at": "",
        "created_by": "",
        "currency": "",
        "id": "",
        "language": "",
        "main_location_id": "",
        "name": "",
        "owner_id": "",
        "service_charges": (
            json!({
                "active": false,
                "amount": "",
                "currency": "",
                "id": "",
                "name": "",
                "percentage": "",
                "type": ""
            })
        ),
        "status": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/pos/merchants/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http PATCH {{baseUrl}}/pos/merchants/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "language": "",\n  "main_location_id": "",\n  "name": "",\n  "owner_id": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "status": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/merchants/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "address": [
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  ],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "language": "",
  "main_location_id": "",
  "name": "",
  "owner_id": "",
  "service_charges": [
    [
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    ]
  ],
  "status": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/merchants/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "Merchants",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create Modifier Group
{{baseUrl}}/pos/modifier-groups
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifier-groups");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/modifier-groups" {:headers {:x-apideck-consumer-id ""
                                                                          :x-apideck-app-id ""
                                                                          :authorization "{{apiKey}}"}
                                                                :content-type :json
                                                                :form-params {:alternate_name ""
                                                                              :created_at ""
                                                                              :created_by ""
                                                                              :deleted false
                                                                              :id ""
                                                                              :maximum_allowed 0
                                                                              :minimum_required 0
                                                                              :modifiers []
                                                                              :name ""
                                                                              :present_at_all_locations false
                                                                              :row_version ""
                                                                              :selection_type ""
                                                                              :updated_at ""
                                                                              :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/modifier-groups"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/modifier-groups"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifier-groups");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifier-groups"

	payload := strings.NewReader("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/modifier-groups HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 302

{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/modifier-groups")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifier-groups"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/modifier-groups")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  alternate_name: '',
  created_at: '',
  created_by: '',
  deleted: false,
  id: '',
  maximum_allowed: 0,
  minimum_required: 0,
  modifiers: [],
  name: '',
  present_at_all_locations: false,
  row_version: '',
  selection_type: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/modifier-groups');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/modifier-groups',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    alternate_name: '',
    created_at: '',
    created_by: '',
    deleted: false,
    id: '',
    maximum_allowed: 0,
    minimum_required: 0,
    modifiers: [],
    name: '',
    present_at_all_locations: false,
    row_version: '',
    selection_type: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifier-groups';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"alternate_name":"","created_at":"","created_by":"","deleted":false,"id":"","maximum_allowed":0,"minimum_required":0,"modifiers":[],"name":"","present_at_all_locations":false,"row_version":"","selection_type":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifier-groups',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "alternate_name": "",\n  "created_at": "",\n  "created_by": "",\n  "deleted": false,\n  "id": "",\n  "maximum_allowed": 0,\n  "minimum_required": 0,\n  "modifiers": [],\n  "name": "",\n  "present_at_all_locations": false,\n  "row_version": "",\n  "selection_type": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifier-groups',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  alternate_name: '',
  created_at: '',
  created_by: '',
  deleted: false,
  id: '',
  maximum_allowed: 0,
  minimum_required: 0,
  modifiers: [],
  name: '',
  present_at_all_locations: false,
  row_version: '',
  selection_type: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/modifier-groups',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    alternate_name: '',
    created_at: '',
    created_by: '',
    deleted: false,
    id: '',
    maximum_allowed: 0,
    minimum_required: 0,
    modifiers: [],
    name: '',
    present_at_all_locations: false,
    row_version: '',
    selection_type: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/modifier-groups');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  alternate_name: '',
  created_at: '',
  created_by: '',
  deleted: false,
  id: '',
  maximum_allowed: 0,
  minimum_required: 0,
  modifiers: [],
  name: '',
  present_at_all_locations: false,
  row_version: '',
  selection_type: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/modifier-groups',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    alternate_name: '',
    created_at: '',
    created_by: '',
    deleted: false,
    id: '',
    maximum_allowed: 0,
    minimum_required: 0,
    modifiers: [],
    name: '',
    present_at_all_locations: false,
    row_version: '',
    selection_type: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifier-groups';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"alternate_name":"","created_at":"","created_by":"","deleted":false,"id":"","maximum_allowed":0,"minimum_required":0,"modifiers":[],"name":"","present_at_all_locations":false,"row_version":"","selection_type":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"alternate_name": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"deleted": @NO,
                              @"id": @"",
                              @"maximum_allowed": @0,
                              @"minimum_required": @0,
                              @"modifiers": @[  ],
                              @"name": @"",
                              @"present_at_all_locations": @NO,
                              @"row_version": @"",
                              @"selection_type": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifier-groups"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifier-groups" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifier-groups",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'alternate_name' => '',
    'created_at' => '',
    'created_by' => '',
    'deleted' => null,
    'id' => '',
    'maximum_allowed' => 0,
    'minimum_required' => 0,
    'modifiers' => [
        
    ],
    'name' => '',
    'present_at_all_locations' => null,
    'row_version' => '',
    'selection_type' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/modifier-groups', [
  'body' => '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifier-groups');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'alternate_name' => '',
  'created_at' => '',
  'created_by' => '',
  'deleted' => null,
  'id' => '',
  'maximum_allowed' => 0,
  'minimum_required' => 0,
  'modifiers' => [
    
  ],
  'name' => '',
  'present_at_all_locations' => null,
  'row_version' => '',
  'selection_type' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'alternate_name' => '',
  'created_at' => '',
  'created_by' => '',
  'deleted' => null,
  'id' => '',
  'maximum_allowed' => 0,
  'minimum_required' => 0,
  'modifiers' => [
    
  ],
  'name' => '',
  'present_at_all_locations' => null,
  'row_version' => '',
  'selection_type' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/modifier-groups');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifier-groups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifier-groups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/modifier-groups", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifier-groups"

payload = {
    "alternate_name": "",
    "created_at": "",
    "created_by": "",
    "deleted": False,
    "id": "",
    "maximum_allowed": 0,
    "minimum_required": 0,
    "modifiers": [],
    "name": "",
    "present_at_all_locations": False,
    "row_version": "",
    "selection_type": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifier-groups"

payload <- "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifier-groups")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/modifier-groups') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifier-groups";

    let payload = json!({
        "alternate_name": "",
        "created_at": "",
        "created_by": "",
        "deleted": false,
        "id": "",
        "maximum_allowed": 0,
        "minimum_required": 0,
        "modifiers": (),
        "name": "",
        "present_at_all_locations": false,
        "row_version": "",
        "selection_type": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/modifier-groups \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http POST {{baseUrl}}/pos/modifier-groups \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "alternate_name": "",\n  "created_at": "",\n  "created_by": "",\n  "deleted": false,\n  "id": "",\n  "maximum_allowed": 0,\n  "minimum_required": 0,\n  "modifiers": [],\n  "name": "",\n  "present_at_all_locations": false,\n  "row_version": "",\n  "selection_type": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/modifier-groups
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifier-groups")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "ModifierGroups",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete Modifier Group
{{baseUrl}}/pos/modifier-groups/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifier-groups/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/pos/modifier-groups/:id" {:headers {:x-apideck-consumer-id ""
                                                                                :x-apideck-app-id ""
                                                                                :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/modifier-groups/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/pos/modifier-groups/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifier-groups/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifier-groups/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/pos/modifier-groups/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/pos/modifier-groups/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifier-groups/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/pos/modifier-groups/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/pos/modifier-groups/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifier-groups/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/pos/modifier-groups/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifier-groups/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifier-groups/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifier-groups/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifier-groups/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/pos/modifier-groups/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifier-groups/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/modifier-groups/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifier-groups/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifier-groups/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/pos/modifier-groups/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifier-groups/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifier-groups/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifier-groups/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/pos/modifier-groups/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifier-groups/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/pos/modifier-groups/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/pos/modifier-groups/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/modifier-groups/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifier-groups/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "ModifierGroups",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get Modifier Group
{{baseUrl}}/pos/modifier-groups/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifier-groups/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/modifier-groups/:id" {:headers {:x-apideck-consumer-id ""
                                                                             :x-apideck-app-id ""
                                                                             :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/modifier-groups/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/modifier-groups/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifier-groups/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifier-groups/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/modifier-groups/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/modifier-groups/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifier-groups/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/modifier-groups/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/modifier-groups/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifier-groups/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/modifier-groups/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifier-groups/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifier-groups/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifier-groups/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifier-groups/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/modifier-groups/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifier-groups/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/modifier-groups/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifier-groups/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifier-groups/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/modifier-groups/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifier-groups/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifier-groups/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifier-groups/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/modifier-groups/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifier-groups/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/modifier-groups/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/modifier-groups/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/modifier-groups/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifier-groups/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "alternate_name": "Modifier New",
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "deleted": true,
    "id": "12345",
    "maximum_allowed": 5,
    "minimum_required": 1,
    "name": "Modifier",
    "present_at_all_locations": false,
    "row_version": "1-12345",
    "selection_type": "single",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345"
  },
  "operation": "one",
  "resource": "ModifierGroups",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List Modifier Groups
{{baseUrl}}/pos/modifier-groups
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifier-groups");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/modifier-groups" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/modifier-groups"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/modifier-groups"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifier-groups");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifier-groups"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/modifier-groups HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/modifier-groups")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifier-groups"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/modifier-groups")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/modifier-groups');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifier-groups',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifier-groups';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifier-groups',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifier-groups',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifier-groups',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/modifier-groups');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifier-groups',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifier-groups';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifier-groups"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifier-groups" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifier-groups",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/modifier-groups', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifier-groups');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/modifier-groups');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifier-groups' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifier-groups' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/modifier-groups", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifier-groups"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifier-groups"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifier-groups")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/modifier-groups') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifier-groups";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/modifier-groups \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/modifier-groups \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/modifier-groups
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifier-groups")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "ModifierGroups",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update Modifier Group
{{baseUrl}}/pos/modifier-groups/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifier-groups/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/pos/modifier-groups/:id" {:headers {:x-apideck-consumer-id ""
                                                                               :x-apideck-app-id ""
                                                                               :authorization "{{apiKey}}"}
                                                                     :content-type :json
                                                                     :form-params {:alternate_name ""
                                                                                   :created_at ""
                                                                                   :created_by ""
                                                                                   :deleted false
                                                                                   :id ""
                                                                                   :maximum_allowed 0
                                                                                   :minimum_required 0
                                                                                   :modifiers []
                                                                                   :name ""
                                                                                   :present_at_all_locations false
                                                                                   :row_version ""
                                                                                   :selection_type ""
                                                                                   :updated_at ""
                                                                                   :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/modifier-groups/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/pos/modifier-groups/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifier-groups/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifier-groups/:id"

	payload := strings.NewReader("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/pos/modifier-groups/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 302

{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/pos/modifier-groups/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifier-groups/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/pos/modifier-groups/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  alternate_name: '',
  created_at: '',
  created_by: '',
  deleted: false,
  id: '',
  maximum_allowed: 0,
  minimum_required: 0,
  modifiers: [],
  name: '',
  present_at_all_locations: false,
  row_version: '',
  selection_type: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/pos/modifier-groups/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    alternate_name: '',
    created_at: '',
    created_by: '',
    deleted: false,
    id: '',
    maximum_allowed: 0,
    minimum_required: 0,
    modifiers: [],
    name: '',
    present_at_all_locations: false,
    row_version: '',
    selection_type: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifier-groups/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"alternate_name":"","created_at":"","created_by":"","deleted":false,"id":"","maximum_allowed":0,"minimum_required":0,"modifiers":[],"name":"","present_at_all_locations":false,"row_version":"","selection_type":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "alternate_name": "",\n  "created_at": "",\n  "created_by": "",\n  "deleted": false,\n  "id": "",\n  "maximum_allowed": 0,\n  "minimum_required": 0,\n  "modifiers": [],\n  "name": "",\n  "present_at_all_locations": false,\n  "row_version": "",\n  "selection_type": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifier-groups/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  alternate_name: '',
  created_at: '',
  created_by: '',
  deleted: false,
  id: '',
  maximum_allowed: 0,
  minimum_required: 0,
  modifiers: [],
  name: '',
  present_at_all_locations: false,
  row_version: '',
  selection_type: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    alternate_name: '',
    created_at: '',
    created_by: '',
    deleted: false,
    id: '',
    maximum_allowed: 0,
    minimum_required: 0,
    modifiers: [],
    name: '',
    present_at_all_locations: false,
    row_version: '',
    selection_type: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/pos/modifier-groups/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  alternate_name: '',
  created_at: '',
  created_by: '',
  deleted: false,
  id: '',
  maximum_allowed: 0,
  minimum_required: 0,
  modifiers: [],
  name: '',
  present_at_all_locations: false,
  row_version: '',
  selection_type: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/modifier-groups/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    alternate_name: '',
    created_at: '',
    created_by: '',
    deleted: false,
    id: '',
    maximum_allowed: 0,
    minimum_required: 0,
    modifiers: [],
    name: '',
    present_at_all_locations: false,
    row_version: '',
    selection_type: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifier-groups/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"alternate_name":"","created_at":"","created_by":"","deleted":false,"id":"","maximum_allowed":0,"minimum_required":0,"modifiers":[],"name":"","present_at_all_locations":false,"row_version":"","selection_type":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"alternate_name": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"deleted": @NO,
                              @"id": @"",
                              @"maximum_allowed": @0,
                              @"minimum_required": @0,
                              @"modifiers": @[  ],
                              @"name": @"",
                              @"present_at_all_locations": @NO,
                              @"row_version": @"",
                              @"selection_type": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifier-groups/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifier-groups/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifier-groups/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'alternate_name' => '',
    'created_at' => '',
    'created_by' => '',
    'deleted' => null,
    'id' => '',
    'maximum_allowed' => 0,
    'minimum_required' => 0,
    'modifiers' => [
        
    ],
    'name' => '',
    'present_at_all_locations' => null,
    'row_version' => '',
    'selection_type' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/pos/modifier-groups/:id', [
  'body' => '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifier-groups/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'alternate_name' => '',
  'created_at' => '',
  'created_by' => '',
  'deleted' => null,
  'id' => '',
  'maximum_allowed' => 0,
  'minimum_required' => 0,
  'modifiers' => [
    
  ],
  'name' => '',
  'present_at_all_locations' => null,
  'row_version' => '',
  'selection_type' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'alternate_name' => '',
  'created_at' => '',
  'created_by' => '',
  'deleted' => null,
  'id' => '',
  'maximum_allowed' => 0,
  'minimum_required' => 0,
  'modifiers' => [
    
  ],
  'name' => '',
  'present_at_all_locations' => null,
  'row_version' => '',
  'selection_type' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/modifier-groups/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifier-groups/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifier-groups/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/pos/modifier-groups/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifier-groups/:id"

payload = {
    "alternate_name": "",
    "created_at": "",
    "created_by": "",
    "deleted": False,
    "id": "",
    "maximum_allowed": 0,
    "minimum_required": 0,
    "modifiers": [],
    "name": "",
    "present_at_all_locations": False,
    "row_version": "",
    "selection_type": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifier-groups/:id"

payload <- "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifier-groups/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/pos/modifier-groups/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"alternate_name\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"deleted\": false,\n  \"id\": \"\",\n  \"maximum_allowed\": 0,\n  \"minimum_required\": 0,\n  \"modifiers\": [],\n  \"name\": \"\",\n  \"present_at_all_locations\": false,\n  \"row_version\": \"\",\n  \"selection_type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifier-groups/:id";

    let payload = json!({
        "alternate_name": "",
        "created_at": "",
        "created_by": "",
        "deleted": false,
        "id": "",
        "maximum_allowed": 0,
        "minimum_required": 0,
        "modifiers": (),
        "name": "",
        "present_at_all_locations": false,
        "row_version": "",
        "selection_type": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/pos/modifier-groups/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http PATCH {{baseUrl}}/pos/modifier-groups/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "alternate_name": "",\n  "created_at": "",\n  "created_by": "",\n  "deleted": false,\n  "id": "",\n  "maximum_allowed": 0,\n  "minimum_required": 0,\n  "modifiers": [],\n  "name": "",\n  "present_at_all_locations": false,\n  "row_version": "",\n  "selection_type": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/modifier-groups/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "alternate_name": "",
  "created_at": "",
  "created_by": "",
  "deleted": false,
  "id": "",
  "maximum_allowed": 0,
  "minimum_required": 0,
  "modifiers": [],
  "name": "",
  "present_at_all_locations": false,
  "row_version": "",
  "selection_type": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifier-groups/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "ModifierGroups",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create Modifier
{{baseUrl}}/pos/modifiers
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifiers");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/modifiers" {:headers {:x-apideck-consumer-id ""
                                                                    :x-apideck-app-id ""
                                                                    :authorization "{{apiKey}}"}
                                                          :content-type :json
                                                          :form-params {:alternate_name ""
                                                                        :available false
                                                                        :created_at ""
                                                                        :created_by ""
                                                                        :currency ""
                                                                        :id ""
                                                                        :idempotency_key ""
                                                                        :modifier_group_id ""
                                                                        :name ""
                                                                        :price_amount ""
                                                                        :updated_at ""
                                                                        :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/modifiers"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/modifiers"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifiers");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifiers"

	payload := strings.NewReader("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/modifiers HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 246

{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/modifiers")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifiers"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifiers")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/modifiers")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  alternate_name: '',
  available: false,
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  idempotency_key: '',
  modifier_group_id: '',
  name: '',
  price_amount: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/modifiers');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/modifiers',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    alternate_name: '',
    available: false,
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    idempotency_key: '',
    modifier_group_id: '',
    name: '',
    price_amount: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifiers';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"alternate_name":"","available":false,"created_at":"","created_by":"","currency":"","id":"","idempotency_key":"","modifier_group_id":"","name":"","price_amount":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifiers',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "alternate_name": "",\n  "available": false,\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "idempotency_key": "",\n  "modifier_group_id": "",\n  "name": "",\n  "price_amount": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifiers")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifiers',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  alternate_name: '',
  available: false,
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  idempotency_key: '',
  modifier_group_id: '',
  name: '',
  price_amount: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/modifiers',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    alternate_name: '',
    available: false,
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    idempotency_key: '',
    modifier_group_id: '',
    name: '',
    price_amount: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/modifiers');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  alternate_name: '',
  available: false,
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  idempotency_key: '',
  modifier_group_id: '',
  name: '',
  price_amount: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/modifiers',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    alternate_name: '',
    available: false,
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    idempotency_key: '',
    modifier_group_id: '',
    name: '',
    price_amount: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifiers';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"alternate_name":"","available":false,"created_at":"","created_by":"","currency":"","id":"","idempotency_key":"","modifier_group_id":"","name":"","price_amount":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"alternate_name": @"",
                              @"available": @NO,
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"id": @"",
                              @"idempotency_key": @"",
                              @"modifier_group_id": @"",
                              @"name": @"",
                              @"price_amount": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifiers"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifiers" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifiers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'alternate_name' => '',
    'available' => null,
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'id' => '',
    'idempotency_key' => '',
    'modifier_group_id' => '',
    'name' => '',
    'price_amount' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/modifiers', [
  'body' => '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifiers');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'alternate_name' => '',
  'available' => null,
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'idempotency_key' => '',
  'modifier_group_id' => '',
  'name' => '',
  'price_amount' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'alternate_name' => '',
  'available' => null,
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'idempotency_key' => '',
  'modifier_group_id' => '',
  'name' => '',
  'price_amount' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/modifiers');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifiers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifiers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/modifiers", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifiers"

payload = {
    "alternate_name": "",
    "available": False,
    "created_at": "",
    "created_by": "",
    "currency": "",
    "id": "",
    "idempotency_key": "",
    "modifier_group_id": "",
    "name": "",
    "price_amount": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifiers"

payload <- "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifiers")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/modifiers') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifiers";

    let payload = json!({
        "alternate_name": "",
        "available": false,
        "created_at": "",
        "created_by": "",
        "currency": "",
        "id": "",
        "idempotency_key": "",
        "modifier_group_id": "",
        "name": "",
        "price_amount": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/modifiers \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http POST {{baseUrl}}/pos/modifiers \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "alternate_name": "",\n  "available": false,\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "idempotency_key": "",\n  "modifier_group_id": "",\n  "name": "",\n  "price_amount": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/modifiers
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifiers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "Modifiers",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete Modifier
{{baseUrl}}/pos/modifiers/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifiers/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/pos/modifiers/:id" {:headers {:x-apideck-consumer-id ""
                                                                          :x-apideck-app-id ""
                                                                          :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/modifiers/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/pos/modifiers/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifiers/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifiers/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/pos/modifiers/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/pos/modifiers/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifiers/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifiers/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/pos/modifiers/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/pos/modifiers/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifiers/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifiers/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifiers/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/pos/modifiers/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifiers/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifiers/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifiers/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifiers/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/pos/modifiers/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifiers/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/modifiers/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifiers/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifiers/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/pos/modifiers/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifiers/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifiers/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifiers/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/pos/modifiers/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifiers/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/pos/modifiers/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/pos/modifiers/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/modifiers/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifiers/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "Modifiers",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get Modifier
{{baseUrl}}/pos/modifiers/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifiers/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/modifiers/:id" {:headers {:x-apideck-consumer-id ""
                                                                       :x-apideck-app-id ""
                                                                       :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/modifiers/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/modifiers/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifiers/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifiers/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/modifiers/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/modifiers/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifiers/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifiers/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/modifiers/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/modifiers/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifiers/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifiers/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifiers/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/modifiers/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifiers/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifiers/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifiers/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifiers/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/modifiers/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifiers/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/modifiers/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifiers/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifiers/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/modifiers/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifiers/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifiers/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifiers/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/modifiers/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifiers/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/modifiers/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/modifiers/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/modifiers/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifiers/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "alternate_name": "Modifier New",
    "available": true,
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "currency": "USD",
    "id": "12345",
    "idempotency_key": "random_string",
    "modifier_group_id": "123",
    "name": "Modifier",
    "price_amount": 10,
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345"
  },
  "operation": "one",
  "resource": "Modifiers",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List Modifiers
{{baseUrl}}/pos/modifiers
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifiers");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/modifiers" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/modifiers"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/modifiers"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifiers");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifiers"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/modifiers HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/modifiers")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifiers"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifiers")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/modifiers")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/modifiers');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifiers',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifiers';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifiers',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifiers")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifiers',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifiers',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/modifiers');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/modifiers',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifiers';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifiers"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifiers" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifiers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/modifiers', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifiers');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/modifiers');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifiers' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifiers' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/modifiers", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifiers"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifiers"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifiers")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/modifiers') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifiers";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/modifiers \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/modifiers \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/modifiers
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifiers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "Modifiers",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update Modifier
{{baseUrl}}/pos/modifiers/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/modifiers/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/pos/modifiers/:id" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}
                                                               :content-type :json
                                                               :form-params {:alternate_name ""
                                                                             :available false
                                                                             :created_at ""
                                                                             :created_by ""
                                                                             :currency ""
                                                                             :id ""
                                                                             :idempotency_key ""
                                                                             :modifier_group_id ""
                                                                             :name ""
                                                                             :price_amount ""
                                                                             :updated_at ""
                                                                             :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/modifiers/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/pos/modifiers/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/modifiers/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/modifiers/:id"

	payload := strings.NewReader("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/pos/modifiers/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 246

{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/pos/modifiers/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/modifiers/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/modifiers/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/pos/modifiers/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  alternate_name: '',
  available: false,
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  idempotency_key: '',
  modifier_group_id: '',
  name: '',
  price_amount: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/pos/modifiers/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    alternate_name: '',
    available: false,
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    idempotency_key: '',
    modifier_group_id: '',
    name: '',
    price_amount: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/modifiers/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"alternate_name":"","available":false,"created_at":"","created_by":"","currency":"","id":"","idempotency_key":"","modifier_group_id":"","name":"","price_amount":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/modifiers/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "alternate_name": "",\n  "available": false,\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "idempotency_key": "",\n  "modifier_group_id": "",\n  "name": "",\n  "price_amount": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/modifiers/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  alternate_name: '',
  available: false,
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  idempotency_key: '',
  modifier_group_id: '',
  name: '',
  price_amount: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    alternate_name: '',
    available: false,
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    idempotency_key: '',
    modifier_group_id: '',
    name: '',
    price_amount: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/pos/modifiers/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  alternate_name: '',
  available: false,
  created_at: '',
  created_by: '',
  currency: '',
  id: '',
  idempotency_key: '',
  modifier_group_id: '',
  name: '',
  price_amount: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/modifiers/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    alternate_name: '',
    available: false,
    created_at: '',
    created_by: '',
    currency: '',
    id: '',
    idempotency_key: '',
    modifier_group_id: '',
    name: '',
    price_amount: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/modifiers/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"alternate_name":"","available":false,"created_at":"","created_by":"","currency":"","id":"","idempotency_key":"","modifier_group_id":"","name":"","price_amount":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"alternate_name": @"",
                              @"available": @NO,
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"id": @"",
                              @"idempotency_key": @"",
                              @"modifier_group_id": @"",
                              @"name": @"",
                              @"price_amount": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/modifiers/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/modifiers/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/modifiers/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'alternate_name' => '',
    'available' => null,
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'id' => '',
    'idempotency_key' => '',
    'modifier_group_id' => '',
    'name' => '',
    'price_amount' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/pos/modifiers/:id', [
  'body' => '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/modifiers/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'alternate_name' => '',
  'available' => null,
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'idempotency_key' => '',
  'modifier_group_id' => '',
  'name' => '',
  'price_amount' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'alternate_name' => '',
  'available' => null,
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'id' => '',
  'idempotency_key' => '',
  'modifier_group_id' => '',
  'name' => '',
  'price_amount' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/modifiers/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/modifiers/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/modifiers/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/pos/modifiers/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/modifiers/:id"

payload = {
    "alternate_name": "",
    "available": False,
    "created_at": "",
    "created_by": "",
    "currency": "",
    "id": "",
    "idempotency_key": "",
    "modifier_group_id": "",
    "name": "",
    "price_amount": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/modifiers/:id"

payload <- "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/modifiers/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/pos/modifiers/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"alternate_name\": \"\",\n  \"available\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"modifier_group_id\": \"\",\n  \"name\": \"\",\n  \"price_amount\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/modifiers/:id";

    let payload = json!({
        "alternate_name": "",
        "available": false,
        "created_at": "",
        "created_by": "",
        "currency": "",
        "id": "",
        "idempotency_key": "",
        "modifier_group_id": "",
        "name": "",
        "price_amount": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/pos/modifiers/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http PATCH {{baseUrl}}/pos/modifiers/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "alternate_name": "",\n  "available": false,\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "id": "",\n  "idempotency_key": "",\n  "modifier_group_id": "",\n  "name": "",\n  "price_amount": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/modifiers/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "alternate_name": "",
  "available": false,
  "created_at": "",
  "created_by": "",
  "currency": "",
  "id": "",
  "idempotency_key": "",
  "modifier_group_id": "",
  "name": "",
  "price_amount": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/modifiers/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "Modifiers",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create Order Type
{{baseUrl}}/pos/order-types
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/order-types");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/order-types" {:headers {:x-apideck-consumer-id ""
                                                                      :x-apideck-app-id ""
                                                                      :authorization "{{apiKey}}"}
                                                            :content-type :json
                                                            :form-params {:created_at ""
                                                                          :created_by ""
                                                                          :default false
                                                                          :id ""
                                                                          :name ""
                                                                          :updated_at ""
                                                                          :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/order-types"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/order-types"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/order-types");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/order-types"

	payload := strings.NewReader("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/order-types HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 128

{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/order-types")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/order-types"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/order-types")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/order-types")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  created_at: '',
  created_by: '',
  default: false,
  id: '',
  name: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/order-types');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/order-types',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    created_at: '',
    created_by: '',
    default: false,
    id: '',
    name: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/order-types';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"created_at":"","created_by":"","default":false,"id":"","name":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/order-types',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "created_at": "",\n  "created_by": "",\n  "default": false,\n  "id": "",\n  "name": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/order-types")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/order-types',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  created_at: '',
  created_by: '',
  default: false,
  id: '',
  name: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/order-types',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    created_at: '',
    created_by: '',
    default: false,
    id: '',
    name: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/order-types');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  created_at: '',
  created_by: '',
  default: false,
  id: '',
  name: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/order-types',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    created_at: '',
    created_by: '',
    default: false,
    id: '',
    name: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/order-types';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"created_at":"","created_by":"","default":false,"id":"","name":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created_at": @"",
                              @"created_by": @"",
                              @"default": @NO,
                              @"id": @"",
                              @"name": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/order-types"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/order-types" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/order-types",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'created_at' => '',
    'created_by' => '',
    'default' => null,
    'id' => '',
    'name' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/order-types', [
  'body' => '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/order-types');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'created_at' => '',
  'created_by' => '',
  'default' => null,
  'id' => '',
  'name' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'created_at' => '',
  'created_by' => '',
  'default' => null,
  'id' => '',
  'name' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/order-types');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/order-types' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/order-types' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/order-types", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/order-types"

payload = {
    "created_at": "",
    "created_by": "",
    "default": False,
    "id": "",
    "name": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/order-types"

payload <- "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/order-types")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/order-types') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/order-types";

    let payload = json!({
        "created_at": "",
        "created_by": "",
        "default": false,
        "id": "",
        "name": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/order-types \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http POST {{baseUrl}}/pos/order-types \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "created_at": "",\n  "created_by": "",\n  "default": false,\n  "id": "",\n  "name": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/order-types
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/order-types")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "OrderTypes",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete Order Type
{{baseUrl}}/pos/order-types/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/order-types/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/pos/order-types/:id" {:headers {:x-apideck-consumer-id ""
                                                                            :x-apideck-app-id ""
                                                                            :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/order-types/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/pos/order-types/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/order-types/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/order-types/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/pos/order-types/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/pos/order-types/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/order-types/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/order-types/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/pos/order-types/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/pos/order-types/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/order-types/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/order-types/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/order-types/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/pos/order-types/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/order-types/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/order-types/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/order-types/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/order-types/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/pos/order-types/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/order-types/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/order-types/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/order-types/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/order-types/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/pos/order-types/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/order-types/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/order-types/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/order-types/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/pos/order-types/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/order-types/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/pos/order-types/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/pos/order-types/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/order-types/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/order-types/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "OrderTypes",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get Order Type
{{baseUrl}}/pos/order-types/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/order-types/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/order-types/:id" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/order-types/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/order-types/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/order-types/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/order-types/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/order-types/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/order-types/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/order-types/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/order-types/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/order-types/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/order-types/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/order-types/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/order-types/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/order-types/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/order-types/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/order-types/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/order-types/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/order-types/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/order-types/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/order-types/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/order-types/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/order-types/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/order-types/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/order-types/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/order-types/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/order-types/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/order-types/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/order-types/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/order-types/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/order-types/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/order-types/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/order-types/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/order-types/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/order-types/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "default": true,
    "id": "12345",
    "name": "Default order type",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345"
  },
  "operation": "one",
  "resource": "OrderTypes",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List Order Types
{{baseUrl}}/pos/order-types
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/order-types");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/order-types" {:headers {:x-apideck-consumer-id ""
                                                                     :x-apideck-app-id ""
                                                                     :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/order-types"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/order-types"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/order-types");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/order-types"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/order-types HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/order-types")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/order-types"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/order-types")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/order-types")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/order-types');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/order-types',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/order-types';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/order-types',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/order-types")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/order-types',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/order-types',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/order-types');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/order-types',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/order-types';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/order-types"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/order-types" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/order-types",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/order-types', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/order-types');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/order-types');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/order-types' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/order-types' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/order-types", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/order-types"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/order-types"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/order-types")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/order-types') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/order-types";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/order-types \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/order-types \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/order-types
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/order-types")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "OrderTypes",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update Order Type
{{baseUrl}}/pos/order-types/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/order-types/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/pos/order-types/:id" {:headers {:x-apideck-consumer-id ""
                                                                           :x-apideck-app-id ""
                                                                           :authorization "{{apiKey}}"}
                                                                 :content-type :json
                                                                 :form-params {:created_at ""
                                                                               :created_by ""
                                                                               :default false
                                                                               :id ""
                                                                               :name ""
                                                                               :updated_at ""
                                                                               :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/order-types/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/pos/order-types/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/order-types/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/order-types/:id"

	payload := strings.NewReader("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/pos/order-types/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 128

{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/pos/order-types/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/order-types/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/order-types/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/pos/order-types/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  created_at: '',
  created_by: '',
  default: false,
  id: '',
  name: '',
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/pos/order-types/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    created_at: '',
    created_by: '',
    default: false,
    id: '',
    name: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/order-types/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"created_at":"","created_by":"","default":false,"id":"","name":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/order-types/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "created_at": "",\n  "created_by": "",\n  "default": false,\n  "id": "",\n  "name": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/order-types/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  created_at: '',
  created_by: '',
  default: false,
  id: '',
  name: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    created_at: '',
    created_by: '',
    default: false,
    id: '',
    name: '',
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/pos/order-types/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  created_at: '',
  created_by: '',
  default: false,
  id: '',
  name: '',
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/order-types/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    created_at: '',
    created_by: '',
    default: false,
    id: '',
    name: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/order-types/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"created_at":"","created_by":"","default":false,"id":"","name":"","updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created_at": @"",
                              @"created_by": @"",
                              @"default": @NO,
                              @"id": @"",
                              @"name": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/order-types/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/order-types/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/order-types/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'created_at' => '',
    'created_by' => '',
    'default' => null,
    'id' => '',
    'name' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/pos/order-types/:id', [
  'body' => '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/order-types/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'created_at' => '',
  'created_by' => '',
  'default' => null,
  'id' => '',
  'name' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'created_at' => '',
  'created_by' => '',
  'default' => null,
  'id' => '',
  'name' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/order-types/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/order-types/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/order-types/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/pos/order-types/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/order-types/:id"

payload = {
    "created_at": "",
    "created_by": "",
    "default": False,
    "id": "",
    "name": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/order-types/:id"

payload <- "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/order-types/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/pos/order-types/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"default\": false,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/order-types/:id";

    let payload = json!({
        "created_at": "",
        "created_by": "",
        "default": false,
        "id": "",
        "name": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/pos/order-types/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http PATCH {{baseUrl}}/pos/order-types/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "created_at": "",\n  "created_by": "",\n  "default": false,\n  "id": "",\n  "name": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/order-types/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "created_at": "",
  "created_by": "",
  "default": false,
  "id": "",
  "name": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/order-types/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "OrderTypes",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create Order
{{baseUrl}}/pos/orders
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/orders");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/orders" {:headers {:x-apideck-consumer-id ""
                                                                 :x-apideck-app-id ""
                                                                 :authorization "{{apiKey}}"}
                                                       :content-type :json
                                                       :form-params {:closed_date ""
                                                                     :created_at ""
                                                                     :created_by ""
                                                                     :currency ""
                                                                     :customer_id ""
                                                                     :customers [{:emails [{:email ""
                                                                                            :id ""
                                                                                            :type ""}]
                                                                                  :first_name ""
                                                                                  :id ""
                                                                                  :last_name ""
                                                                                  :middle_name ""
                                                                                  :phone_numbers [{:area_code ""
                                                                                                   :country_code ""
                                                                                                   :extension ""
                                                                                                   :id ""
                                                                                                   :number ""
                                                                                                   :type ""}]}]
                                                                     :discounts [{:amount 0
                                                                                  :currency ""
                                                                                  :id ""
                                                                                  :name ""
                                                                                  :product_id ""
                                                                                  :scope ""
                                                                                  :type ""}]
                                                                     :employee_id ""
                                                                     :fulfillments [{:id ""
                                                                                     :pickup_details {:accepted_at ""
                                                                                                      :auto_complete_duration ""
                                                                                                      :cancel_reason ""
                                                                                                      :canceled_at ""
                                                                                                      :curbside_pickup_details {:buyer_arrived_at ""
                                                                                                                                :curbside_details ""}
                                                                                                      :expired_at ""
                                                                                                      :expires_at ""
                                                                                                      :is_curbside_pickup false
                                                                                                      :note ""
                                                                                                      :picked_up_at ""
                                                                                                      :pickup_at ""
                                                                                                      :pickup_window_duration ""
                                                                                                      :placed_at ""
                                                                                                      :prep_time_duration ""
                                                                                                      :ready_at ""
                                                                                                      :recipient {:address {:city ""
                                                                                                                            :contact_name ""
                                                                                                                            :country ""
                                                                                                                            :county ""
                                                                                                                            :email ""
                                                                                                                            :fax ""
                                                                                                                            :id ""
                                                                                                                            :latitude ""
                                                                                                                            :line1 ""
                                                                                                                            :line2 ""
                                                                                                                            :line3 ""
                                                                                                                            :line4 ""
                                                                                                                            :longitude ""
                                                                                                                            :name ""
                                                                                                                            :phone_number ""
                                                                                                                            :postal_code ""
                                                                                                                            :row_version ""
                                                                                                                            :salutation ""
                                                                                                                            :state ""
                                                                                                                            :street_number ""
                                                                                                                            :string ""
                                                                                                                            :type ""
                                                                                                                            :website ""}
                                                                                                                  :customer_id ""
                                                                                                                  :display_name ""
                                                                                                                  :email {}
                                                                                                                  :phone_number {}}
                                                                                                      :rejected_at ""
                                                                                                      :schedule_type ""}
                                                                                     :shipment_details {}
                                                                                     :status ""
                                                                                     :type ""}]
                                                                     :id ""
                                                                     :idempotency_key ""
                                                                     :line_items [{:applied_discounts []
                                                                                   :applied_taxes []
                                                                                   :id ""
                                                                                   :item ""
                                                                                   :modifiers []
                                                                                   :name ""
                                                                                   :quantity ""
                                                                                   :total_amount 0
                                                                                   :total_discount 0
                                                                                   :total_tax 0
                                                                                   :unit_price ""}]
                                                                     :location_id ""
                                                                     :merchant_id ""
                                                                     :note ""
                                                                     :order_date ""
                                                                     :order_number ""
                                                                     :order_type_id ""
                                                                     :payment_status ""
                                                                     :payments [{:amount 0
                                                                                 :currency ""
                                                                                 :id ""}]
                                                                     :reference_id ""
                                                                     :refunded false
                                                                     :refunds [{:amount 0
                                                                                :currency ""
                                                                                :id ""
                                                                                :location_id ""
                                                                                :reason ""
                                                                                :status ""
                                                                                :tender_id ""
                                                                                :transaction_id ""}]
                                                                     :seat ""
                                                                     :service_charges [{:active false
                                                                                        :amount ""
                                                                                        :currency ""
                                                                                        :id ""
                                                                                        :name ""
                                                                                        :percentage ""
                                                                                        :type ""}]
                                                                     :source ""
                                                                     :status ""
                                                                     :table ""
                                                                     :taxes []
                                                                     :tenders [{:amount ""
                                                                                :buyer_tendered_cash_amount 0
                                                                                :card {:billing_address {}
                                                                                       :bin ""
                                                                                       :card_brand ""
                                                                                       :card_type ""
                                                                                       :cardholder_name ""
                                                                                       :customer_id ""
                                                                                       :enabled false
                                                                                       :exp_month 0
                                                                                       :exp_year 0
                                                                                       :fingerprint ""
                                                                                       :id ""
                                                                                       :last_4 ""
                                                                                       :merchant_id ""
                                                                                       :prepaid_type ""
                                                                                       :reference_id ""
                                                                                       :version ""}
                                                                                :card_entry_method ""
                                                                                :card_status ""
                                                                                :change_back_cash_amount 0
                                                                                :currency ""
                                                                                :id ""
                                                                                :location_id ""
                                                                                :name ""
                                                                                :note ""
                                                                                :payment_id ""
                                                                                :percentage ""
                                                                                :total_amount 0
                                                                                :total_discount 0
                                                                                :total_processing_fee 0
                                                                                :total_refund 0
                                                                                :total_service_charge 0
                                                                                :total_tax 0
                                                                                :total_tip 0
                                                                                :transaction_id ""
                                                                                :type ""}]
                                                                     :title ""
                                                                     :total_amount 0
                                                                     :total_discount 0
                                                                     :total_refund 0
                                                                     :total_service_charge 0
                                                                     :total_tax 0
                                                                     :total_tip 0
                                                                     :updated_at ""
                                                                     :updated_by ""
                                                                     :version ""
                                                                     :voided false
                                                                     :voided_at ""}})
require "http/client"

url = "{{baseUrl}}/pos/orders"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/orders"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/orders");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/orders"

	payload := strings.NewReader("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/orders HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 4547

{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/orders")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/orders"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/orders")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/orders")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  closed_date: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  customers: [
    {
      emails: [
        {
          email: '',
          id: '',
          type: ''
        }
      ],
      first_name: '',
      id: '',
      last_name: '',
      middle_name: '',
      phone_numbers: [
        {
          area_code: '',
          country_code: '',
          extension: '',
          id: '',
          number: '',
          type: ''
        }
      ]
    }
  ],
  discounts: [
    {
      amount: 0,
      currency: '',
      id: '',
      name: '',
      product_id: '',
      scope: '',
      type: ''
    }
  ],
  employee_id: '',
  fulfillments: [
    {
      id: '',
      pickup_details: {
        accepted_at: '',
        auto_complete_duration: '',
        cancel_reason: '',
        canceled_at: '',
        curbside_pickup_details: {
          buyer_arrived_at: '',
          curbside_details: ''
        },
        expired_at: '',
        expires_at: '',
        is_curbside_pickup: false,
        note: '',
        picked_up_at: '',
        pickup_at: '',
        pickup_window_duration: '',
        placed_at: '',
        prep_time_duration: '',
        ready_at: '',
        recipient: {
          address: {
            city: '',
            contact_name: '',
            country: '',
            county: '',
            email: '',
            fax: '',
            id: '',
            latitude: '',
            line1: '',
            line2: '',
            line3: '',
            line4: '',
            longitude: '',
            name: '',
            phone_number: '',
            postal_code: '',
            row_version: '',
            salutation: '',
            state: '',
            street_number: '',
            string: '',
            type: '',
            website: ''
          },
          customer_id: '',
          display_name: '',
          email: {},
          phone_number: {}
        },
        rejected_at: '',
        schedule_type: ''
      },
      shipment_details: {},
      status: '',
      type: ''
    }
  ],
  id: '',
  idempotency_key: '',
  line_items: [
    {
      applied_discounts: [],
      applied_taxes: [],
      id: '',
      item: '',
      modifiers: [],
      name: '',
      quantity: '',
      total_amount: 0,
      total_discount: 0,
      total_tax: 0,
      unit_price: ''
    }
  ],
  location_id: '',
  merchant_id: '',
  note: '',
  order_date: '',
  order_number: '',
  order_type_id: '',
  payment_status: '',
  payments: [
    {
      amount: 0,
      currency: '',
      id: ''
    }
  ],
  reference_id: '',
  refunded: false,
  refunds: [
    {
      amount: 0,
      currency: '',
      id: '',
      location_id: '',
      reason: '',
      status: '',
      tender_id: '',
      transaction_id: ''
    }
  ],
  seat: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  status: '',
  table: '',
  taxes: [],
  tenders: [
    {
      amount: '',
      buyer_tendered_cash_amount: 0,
      card: {
        billing_address: {},
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      },
      card_entry_method: '',
      card_status: '',
      change_back_cash_amount: 0,
      currency: '',
      id: '',
      location_id: '',
      name: '',
      note: '',
      payment_id: '',
      percentage: '',
      total_amount: 0,
      total_discount: 0,
      total_processing_fee: 0,
      total_refund: 0,
      total_service_charge: 0,
      total_tax: 0,
      total_tip: 0,
      transaction_id: '',
      type: ''
    }
  ],
  title: '',
  total_amount: 0,
  total_discount: 0,
  total_refund: 0,
  total_service_charge: 0,
  total_tax: 0,
  total_tip: 0,
  updated_at: '',
  updated_by: '',
  version: '',
  voided: false,
  voided_at: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/orders');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/orders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    closed_date: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    customers: [
      {
        emails: [{email: '', id: '', type: ''}],
        first_name: '',
        id: '',
        last_name: '',
        middle_name: '',
        phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
      }
    ],
    discounts: [
      {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
    ],
    employee_id: '',
    fulfillments: [
      {
        id: '',
        pickup_details: {
          accepted_at: '',
          auto_complete_duration: '',
          cancel_reason: '',
          canceled_at: '',
          curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
          expired_at: '',
          expires_at: '',
          is_curbside_pickup: false,
          note: '',
          picked_up_at: '',
          pickup_at: '',
          pickup_window_duration: '',
          placed_at: '',
          prep_time_duration: '',
          ready_at: '',
          recipient: {
            address: {
              city: '',
              contact_name: '',
              country: '',
              county: '',
              email: '',
              fax: '',
              id: '',
              latitude: '',
              line1: '',
              line2: '',
              line3: '',
              line4: '',
              longitude: '',
              name: '',
              phone_number: '',
              postal_code: '',
              row_version: '',
              salutation: '',
              state: '',
              street_number: '',
              string: '',
              type: '',
              website: ''
            },
            customer_id: '',
            display_name: '',
            email: {},
            phone_number: {}
          },
          rejected_at: '',
          schedule_type: ''
        },
        shipment_details: {},
        status: '',
        type: ''
      }
    ],
    id: '',
    idempotency_key: '',
    line_items: [
      {
        applied_discounts: [],
        applied_taxes: [],
        id: '',
        item: '',
        modifiers: [],
        name: '',
        quantity: '',
        total_amount: 0,
        total_discount: 0,
        total_tax: 0,
        unit_price: ''
      }
    ],
    location_id: '',
    merchant_id: '',
    note: '',
    order_date: '',
    order_number: '',
    order_type_id: '',
    payment_status: '',
    payments: [{amount: 0, currency: '', id: ''}],
    reference_id: '',
    refunded: false,
    refunds: [
      {
        amount: 0,
        currency: '',
        id: '',
        location_id: '',
        reason: '',
        status: '',
        tender_id: '',
        transaction_id: ''
      }
    ],
    seat: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    status: '',
    table: '',
    taxes: [],
    tenders: [
      {
        amount: '',
        buyer_tendered_cash_amount: 0,
        card: {
          billing_address: {},
          bin: '',
          card_brand: '',
          card_type: '',
          cardholder_name: '',
          customer_id: '',
          enabled: false,
          exp_month: 0,
          exp_year: 0,
          fingerprint: '',
          id: '',
          last_4: '',
          merchant_id: '',
          prepaid_type: '',
          reference_id: '',
          version: ''
        },
        card_entry_method: '',
        card_status: '',
        change_back_cash_amount: 0,
        currency: '',
        id: '',
        location_id: '',
        name: '',
        note: '',
        payment_id: '',
        percentage: '',
        total_amount: 0,
        total_discount: 0,
        total_processing_fee: 0,
        total_refund: 0,
        total_service_charge: 0,
        total_tax: 0,
        total_tip: 0,
        transaction_id: '',
        type: ''
      }
    ],
    title: '',
    total_amount: 0,
    total_discount: 0,
    total_refund: 0,
    total_service_charge: 0,
    total_tax: 0,
    total_tip: 0,
    updated_at: '',
    updated_by: '',
    version: '',
    voided: false,
    voided_at: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/orders';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"closed_date":"","created_at":"","created_by":"","currency":"","customer_id":"","customers":[{"emails":[{"email":"","id":"","type":""}],"first_name":"","id":"","last_name":"","middle_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}]}],"discounts":[{"amount":0,"currency":"","id":"","name":"","product_id":"","scope":"","type":""}],"employee_id":"","fulfillments":[{"id":"","pickup_details":{"accepted_at":"","auto_complete_duration":"","cancel_reason":"","canceled_at":"","curbside_pickup_details":{"buyer_arrived_at":"","curbside_details":""},"expired_at":"","expires_at":"","is_curbside_pickup":false,"note":"","picked_up_at":"","pickup_at":"","pickup_window_duration":"","placed_at":"","prep_time_duration":"","ready_at":"","recipient":{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"customer_id":"","display_name":"","email":{},"phone_number":{}},"rejected_at":"","schedule_type":""},"shipment_details":{},"status":"","type":""}],"id":"","idempotency_key":"","line_items":[{"applied_discounts":[],"applied_taxes":[],"id":"","item":"","modifiers":[],"name":"","quantity":"","total_amount":0,"total_discount":0,"total_tax":0,"unit_price":""}],"location_id":"","merchant_id":"","note":"","order_date":"","order_number":"","order_type_id":"","payment_status":"","payments":[{"amount":0,"currency":"","id":""}],"reference_id":"","refunded":false,"refunds":[{"amount":0,"currency":"","id":"","location_id":"","reason":"","status":"","tender_id":"","transaction_id":""}],"seat":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","status":"","table":"","taxes":[],"tenders":[{"amount":"","buyer_tendered_cash_amount":0,"card":{"billing_address":{},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""},"card_entry_method":"","card_status":"","change_back_cash_amount":0,"currency":"","id":"","location_id":"","name":"","note":"","payment_id":"","percentage":"","total_amount":0,"total_discount":0,"total_processing_fee":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"transaction_id":"","type":""}],"title":"","total_amount":0,"total_discount":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"updated_at":"","updated_by":"","version":"","voided":false,"voided_at":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/orders',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "closed_date": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "customers": [\n    {\n      "emails": [\n        {\n          "email": "",\n          "id": "",\n          "type": ""\n        }\n      ],\n      "first_name": "",\n      "id": "",\n      "last_name": "",\n      "middle_name": "",\n      "phone_numbers": [\n        {\n          "area_code": "",\n          "country_code": "",\n          "extension": "",\n          "id": "",\n          "number": "",\n          "type": ""\n        }\n      ]\n    }\n  ],\n  "discounts": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "name": "",\n      "product_id": "",\n      "scope": "",\n      "type": ""\n    }\n  ],\n  "employee_id": "",\n  "fulfillments": [\n    {\n      "id": "",\n      "pickup_details": {\n        "accepted_at": "",\n        "auto_complete_duration": "",\n        "cancel_reason": "",\n        "canceled_at": "",\n        "curbside_pickup_details": {\n          "buyer_arrived_at": "",\n          "curbside_details": ""\n        },\n        "expired_at": "",\n        "expires_at": "",\n        "is_curbside_pickup": false,\n        "note": "",\n        "picked_up_at": "",\n        "pickup_at": "",\n        "pickup_window_duration": "",\n        "placed_at": "",\n        "prep_time_duration": "",\n        "ready_at": "",\n        "recipient": {\n          "address": {\n            "city": "",\n            "contact_name": "",\n            "country": "",\n            "county": "",\n            "email": "",\n            "fax": "",\n            "id": "",\n            "latitude": "",\n            "line1": "",\n            "line2": "",\n            "line3": "",\n            "line4": "",\n            "longitude": "",\n            "name": "",\n            "phone_number": "",\n            "postal_code": "",\n            "row_version": "",\n            "salutation": "",\n            "state": "",\n            "street_number": "",\n            "string": "",\n            "type": "",\n            "website": ""\n          },\n          "customer_id": "",\n          "display_name": "",\n          "email": {},\n          "phone_number": {}\n        },\n        "rejected_at": "",\n        "schedule_type": ""\n      },\n      "shipment_details": {},\n      "status": "",\n      "type": ""\n    }\n  ],\n  "id": "",\n  "idempotency_key": "",\n  "line_items": [\n    {\n      "applied_discounts": [],\n      "applied_taxes": [],\n      "id": "",\n      "item": "",\n      "modifiers": [],\n      "name": "",\n      "quantity": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_tax": 0,\n      "unit_price": ""\n    }\n  ],\n  "location_id": "",\n  "merchant_id": "",\n  "note": "",\n  "order_date": "",\n  "order_number": "",\n  "order_type_id": "",\n  "payment_status": "",\n  "payments": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": ""\n    }\n  ],\n  "reference_id": "",\n  "refunded": false,\n  "refunds": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "reason": "",\n      "status": "",\n      "tender_id": "",\n      "transaction_id": ""\n    }\n  ],\n  "seat": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "status": "",\n  "table": "",\n  "taxes": [],\n  "tenders": [\n    {\n      "amount": "",\n      "buyer_tendered_cash_amount": 0,\n      "card": {\n        "billing_address": {},\n        "bin": "",\n        "card_brand": "",\n        "card_type": "",\n        "cardholder_name": "",\n        "customer_id": "",\n        "enabled": false,\n        "exp_month": 0,\n        "exp_year": 0,\n        "fingerprint": "",\n        "id": "",\n        "last_4": "",\n        "merchant_id": "",\n        "prepaid_type": "",\n        "reference_id": "",\n        "version": ""\n      },\n      "card_entry_method": "",\n      "card_status": "",\n      "change_back_cash_amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "name": "",\n      "note": "",\n      "payment_id": "",\n      "percentage": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_processing_fee": 0,\n      "total_refund": 0,\n      "total_service_charge": 0,\n      "total_tax": 0,\n      "total_tip": 0,\n      "transaction_id": "",\n      "type": ""\n    }\n  ],\n  "title": "",\n  "total_amount": 0,\n  "total_discount": 0,\n  "total_refund": 0,\n  "total_service_charge": 0,\n  "total_tax": 0,\n  "total_tip": 0,\n  "updated_at": "",\n  "updated_by": "",\n  "version": "",\n  "voided": false,\n  "voided_at": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/orders")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/orders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  closed_date: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  customers: [
    {
      emails: [{email: '', id: '', type: ''}],
      first_name: '',
      id: '',
      last_name: '',
      middle_name: '',
      phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
    }
  ],
  discounts: [
    {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
  ],
  employee_id: '',
  fulfillments: [
    {
      id: '',
      pickup_details: {
        accepted_at: '',
        auto_complete_duration: '',
        cancel_reason: '',
        canceled_at: '',
        curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
        expired_at: '',
        expires_at: '',
        is_curbside_pickup: false,
        note: '',
        picked_up_at: '',
        pickup_at: '',
        pickup_window_duration: '',
        placed_at: '',
        prep_time_duration: '',
        ready_at: '',
        recipient: {
          address: {
            city: '',
            contact_name: '',
            country: '',
            county: '',
            email: '',
            fax: '',
            id: '',
            latitude: '',
            line1: '',
            line2: '',
            line3: '',
            line4: '',
            longitude: '',
            name: '',
            phone_number: '',
            postal_code: '',
            row_version: '',
            salutation: '',
            state: '',
            street_number: '',
            string: '',
            type: '',
            website: ''
          },
          customer_id: '',
          display_name: '',
          email: {},
          phone_number: {}
        },
        rejected_at: '',
        schedule_type: ''
      },
      shipment_details: {},
      status: '',
      type: ''
    }
  ],
  id: '',
  idempotency_key: '',
  line_items: [
    {
      applied_discounts: [],
      applied_taxes: [],
      id: '',
      item: '',
      modifiers: [],
      name: '',
      quantity: '',
      total_amount: 0,
      total_discount: 0,
      total_tax: 0,
      unit_price: ''
    }
  ],
  location_id: '',
  merchant_id: '',
  note: '',
  order_date: '',
  order_number: '',
  order_type_id: '',
  payment_status: '',
  payments: [{amount: 0, currency: '', id: ''}],
  reference_id: '',
  refunded: false,
  refunds: [
    {
      amount: 0,
      currency: '',
      id: '',
      location_id: '',
      reason: '',
      status: '',
      tender_id: '',
      transaction_id: ''
    }
  ],
  seat: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  status: '',
  table: '',
  taxes: [],
  tenders: [
    {
      amount: '',
      buyer_tendered_cash_amount: 0,
      card: {
        billing_address: {},
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      },
      card_entry_method: '',
      card_status: '',
      change_back_cash_amount: 0,
      currency: '',
      id: '',
      location_id: '',
      name: '',
      note: '',
      payment_id: '',
      percentage: '',
      total_amount: 0,
      total_discount: 0,
      total_processing_fee: 0,
      total_refund: 0,
      total_service_charge: 0,
      total_tax: 0,
      total_tip: 0,
      transaction_id: '',
      type: ''
    }
  ],
  title: '',
  total_amount: 0,
  total_discount: 0,
  total_refund: 0,
  total_service_charge: 0,
  total_tax: 0,
  total_tip: 0,
  updated_at: '',
  updated_by: '',
  version: '',
  voided: false,
  voided_at: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/orders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    closed_date: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    customers: [
      {
        emails: [{email: '', id: '', type: ''}],
        first_name: '',
        id: '',
        last_name: '',
        middle_name: '',
        phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
      }
    ],
    discounts: [
      {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
    ],
    employee_id: '',
    fulfillments: [
      {
        id: '',
        pickup_details: {
          accepted_at: '',
          auto_complete_duration: '',
          cancel_reason: '',
          canceled_at: '',
          curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
          expired_at: '',
          expires_at: '',
          is_curbside_pickup: false,
          note: '',
          picked_up_at: '',
          pickup_at: '',
          pickup_window_duration: '',
          placed_at: '',
          prep_time_duration: '',
          ready_at: '',
          recipient: {
            address: {
              city: '',
              contact_name: '',
              country: '',
              county: '',
              email: '',
              fax: '',
              id: '',
              latitude: '',
              line1: '',
              line2: '',
              line3: '',
              line4: '',
              longitude: '',
              name: '',
              phone_number: '',
              postal_code: '',
              row_version: '',
              salutation: '',
              state: '',
              street_number: '',
              string: '',
              type: '',
              website: ''
            },
            customer_id: '',
            display_name: '',
            email: {},
            phone_number: {}
          },
          rejected_at: '',
          schedule_type: ''
        },
        shipment_details: {},
        status: '',
        type: ''
      }
    ],
    id: '',
    idempotency_key: '',
    line_items: [
      {
        applied_discounts: [],
        applied_taxes: [],
        id: '',
        item: '',
        modifiers: [],
        name: '',
        quantity: '',
        total_amount: 0,
        total_discount: 0,
        total_tax: 0,
        unit_price: ''
      }
    ],
    location_id: '',
    merchant_id: '',
    note: '',
    order_date: '',
    order_number: '',
    order_type_id: '',
    payment_status: '',
    payments: [{amount: 0, currency: '', id: ''}],
    reference_id: '',
    refunded: false,
    refunds: [
      {
        amount: 0,
        currency: '',
        id: '',
        location_id: '',
        reason: '',
        status: '',
        tender_id: '',
        transaction_id: ''
      }
    ],
    seat: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    status: '',
    table: '',
    taxes: [],
    tenders: [
      {
        amount: '',
        buyer_tendered_cash_amount: 0,
        card: {
          billing_address: {},
          bin: '',
          card_brand: '',
          card_type: '',
          cardholder_name: '',
          customer_id: '',
          enabled: false,
          exp_month: 0,
          exp_year: 0,
          fingerprint: '',
          id: '',
          last_4: '',
          merchant_id: '',
          prepaid_type: '',
          reference_id: '',
          version: ''
        },
        card_entry_method: '',
        card_status: '',
        change_back_cash_amount: 0,
        currency: '',
        id: '',
        location_id: '',
        name: '',
        note: '',
        payment_id: '',
        percentage: '',
        total_amount: 0,
        total_discount: 0,
        total_processing_fee: 0,
        total_refund: 0,
        total_service_charge: 0,
        total_tax: 0,
        total_tip: 0,
        transaction_id: '',
        type: ''
      }
    ],
    title: '',
    total_amount: 0,
    total_discount: 0,
    total_refund: 0,
    total_service_charge: 0,
    total_tax: 0,
    total_tip: 0,
    updated_at: '',
    updated_by: '',
    version: '',
    voided: false,
    voided_at: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/orders');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  closed_date: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  customers: [
    {
      emails: [
        {
          email: '',
          id: '',
          type: ''
        }
      ],
      first_name: '',
      id: '',
      last_name: '',
      middle_name: '',
      phone_numbers: [
        {
          area_code: '',
          country_code: '',
          extension: '',
          id: '',
          number: '',
          type: ''
        }
      ]
    }
  ],
  discounts: [
    {
      amount: 0,
      currency: '',
      id: '',
      name: '',
      product_id: '',
      scope: '',
      type: ''
    }
  ],
  employee_id: '',
  fulfillments: [
    {
      id: '',
      pickup_details: {
        accepted_at: '',
        auto_complete_duration: '',
        cancel_reason: '',
        canceled_at: '',
        curbside_pickup_details: {
          buyer_arrived_at: '',
          curbside_details: ''
        },
        expired_at: '',
        expires_at: '',
        is_curbside_pickup: false,
        note: '',
        picked_up_at: '',
        pickup_at: '',
        pickup_window_duration: '',
        placed_at: '',
        prep_time_duration: '',
        ready_at: '',
        recipient: {
          address: {
            city: '',
            contact_name: '',
            country: '',
            county: '',
            email: '',
            fax: '',
            id: '',
            latitude: '',
            line1: '',
            line2: '',
            line3: '',
            line4: '',
            longitude: '',
            name: '',
            phone_number: '',
            postal_code: '',
            row_version: '',
            salutation: '',
            state: '',
            street_number: '',
            string: '',
            type: '',
            website: ''
          },
          customer_id: '',
          display_name: '',
          email: {},
          phone_number: {}
        },
        rejected_at: '',
        schedule_type: ''
      },
      shipment_details: {},
      status: '',
      type: ''
    }
  ],
  id: '',
  idempotency_key: '',
  line_items: [
    {
      applied_discounts: [],
      applied_taxes: [],
      id: '',
      item: '',
      modifiers: [],
      name: '',
      quantity: '',
      total_amount: 0,
      total_discount: 0,
      total_tax: 0,
      unit_price: ''
    }
  ],
  location_id: '',
  merchant_id: '',
  note: '',
  order_date: '',
  order_number: '',
  order_type_id: '',
  payment_status: '',
  payments: [
    {
      amount: 0,
      currency: '',
      id: ''
    }
  ],
  reference_id: '',
  refunded: false,
  refunds: [
    {
      amount: 0,
      currency: '',
      id: '',
      location_id: '',
      reason: '',
      status: '',
      tender_id: '',
      transaction_id: ''
    }
  ],
  seat: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  status: '',
  table: '',
  taxes: [],
  tenders: [
    {
      amount: '',
      buyer_tendered_cash_amount: 0,
      card: {
        billing_address: {},
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      },
      card_entry_method: '',
      card_status: '',
      change_back_cash_amount: 0,
      currency: '',
      id: '',
      location_id: '',
      name: '',
      note: '',
      payment_id: '',
      percentage: '',
      total_amount: 0,
      total_discount: 0,
      total_processing_fee: 0,
      total_refund: 0,
      total_service_charge: 0,
      total_tax: 0,
      total_tip: 0,
      transaction_id: '',
      type: ''
    }
  ],
  title: '',
  total_amount: 0,
  total_discount: 0,
  total_refund: 0,
  total_service_charge: 0,
  total_tax: 0,
  total_tip: 0,
  updated_at: '',
  updated_by: '',
  version: '',
  voided: false,
  voided_at: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/orders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    closed_date: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    customers: [
      {
        emails: [{email: '', id: '', type: ''}],
        first_name: '',
        id: '',
        last_name: '',
        middle_name: '',
        phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
      }
    ],
    discounts: [
      {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
    ],
    employee_id: '',
    fulfillments: [
      {
        id: '',
        pickup_details: {
          accepted_at: '',
          auto_complete_duration: '',
          cancel_reason: '',
          canceled_at: '',
          curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
          expired_at: '',
          expires_at: '',
          is_curbside_pickup: false,
          note: '',
          picked_up_at: '',
          pickup_at: '',
          pickup_window_duration: '',
          placed_at: '',
          prep_time_duration: '',
          ready_at: '',
          recipient: {
            address: {
              city: '',
              contact_name: '',
              country: '',
              county: '',
              email: '',
              fax: '',
              id: '',
              latitude: '',
              line1: '',
              line2: '',
              line3: '',
              line4: '',
              longitude: '',
              name: '',
              phone_number: '',
              postal_code: '',
              row_version: '',
              salutation: '',
              state: '',
              street_number: '',
              string: '',
              type: '',
              website: ''
            },
            customer_id: '',
            display_name: '',
            email: {},
            phone_number: {}
          },
          rejected_at: '',
          schedule_type: ''
        },
        shipment_details: {},
        status: '',
        type: ''
      }
    ],
    id: '',
    idempotency_key: '',
    line_items: [
      {
        applied_discounts: [],
        applied_taxes: [],
        id: '',
        item: '',
        modifiers: [],
        name: '',
        quantity: '',
        total_amount: 0,
        total_discount: 0,
        total_tax: 0,
        unit_price: ''
      }
    ],
    location_id: '',
    merchant_id: '',
    note: '',
    order_date: '',
    order_number: '',
    order_type_id: '',
    payment_status: '',
    payments: [{amount: 0, currency: '', id: ''}],
    reference_id: '',
    refunded: false,
    refunds: [
      {
        amount: 0,
        currency: '',
        id: '',
        location_id: '',
        reason: '',
        status: '',
        tender_id: '',
        transaction_id: ''
      }
    ],
    seat: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    status: '',
    table: '',
    taxes: [],
    tenders: [
      {
        amount: '',
        buyer_tendered_cash_amount: 0,
        card: {
          billing_address: {},
          bin: '',
          card_brand: '',
          card_type: '',
          cardholder_name: '',
          customer_id: '',
          enabled: false,
          exp_month: 0,
          exp_year: 0,
          fingerprint: '',
          id: '',
          last_4: '',
          merchant_id: '',
          prepaid_type: '',
          reference_id: '',
          version: ''
        },
        card_entry_method: '',
        card_status: '',
        change_back_cash_amount: 0,
        currency: '',
        id: '',
        location_id: '',
        name: '',
        note: '',
        payment_id: '',
        percentage: '',
        total_amount: 0,
        total_discount: 0,
        total_processing_fee: 0,
        total_refund: 0,
        total_service_charge: 0,
        total_tax: 0,
        total_tip: 0,
        transaction_id: '',
        type: ''
      }
    ],
    title: '',
    total_amount: 0,
    total_discount: 0,
    total_refund: 0,
    total_service_charge: 0,
    total_tax: 0,
    total_tip: 0,
    updated_at: '',
    updated_by: '',
    version: '',
    voided: false,
    voided_at: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/orders';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"closed_date":"","created_at":"","created_by":"","currency":"","customer_id":"","customers":[{"emails":[{"email":"","id":"","type":""}],"first_name":"","id":"","last_name":"","middle_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}]}],"discounts":[{"amount":0,"currency":"","id":"","name":"","product_id":"","scope":"","type":""}],"employee_id":"","fulfillments":[{"id":"","pickup_details":{"accepted_at":"","auto_complete_duration":"","cancel_reason":"","canceled_at":"","curbside_pickup_details":{"buyer_arrived_at":"","curbside_details":""},"expired_at":"","expires_at":"","is_curbside_pickup":false,"note":"","picked_up_at":"","pickup_at":"","pickup_window_duration":"","placed_at":"","prep_time_duration":"","ready_at":"","recipient":{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"customer_id":"","display_name":"","email":{},"phone_number":{}},"rejected_at":"","schedule_type":""},"shipment_details":{},"status":"","type":""}],"id":"","idempotency_key":"","line_items":[{"applied_discounts":[],"applied_taxes":[],"id":"","item":"","modifiers":[],"name":"","quantity":"","total_amount":0,"total_discount":0,"total_tax":0,"unit_price":""}],"location_id":"","merchant_id":"","note":"","order_date":"","order_number":"","order_type_id":"","payment_status":"","payments":[{"amount":0,"currency":"","id":""}],"reference_id":"","refunded":false,"refunds":[{"amount":0,"currency":"","id":"","location_id":"","reason":"","status":"","tender_id":"","transaction_id":""}],"seat":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","status":"","table":"","taxes":[],"tenders":[{"amount":"","buyer_tendered_cash_amount":0,"card":{"billing_address":{},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""},"card_entry_method":"","card_status":"","change_back_cash_amount":0,"currency":"","id":"","location_id":"","name":"","note":"","payment_id":"","percentage":"","total_amount":0,"total_discount":0,"total_processing_fee":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"transaction_id":"","type":""}],"title":"","total_amount":0,"total_discount":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"updated_at":"","updated_by":"","version":"","voided":false,"voided_at":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"closed_date": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"customer_id": @"",
                              @"customers": @[ @{ @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ], @"first_name": @"", @"id": @"", @"last_name": @"", @"middle_name": @"", @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ] } ],
                              @"discounts": @[ @{ @"amount": @0, @"currency": @"", @"id": @"", @"name": @"", @"product_id": @"", @"scope": @"", @"type": @"" } ],
                              @"employee_id": @"",
                              @"fulfillments": @[ @{ @"id": @"", @"pickup_details": @{ @"accepted_at": @"", @"auto_complete_duration": @"", @"cancel_reason": @"", @"canceled_at": @"", @"curbside_pickup_details": @{ @"buyer_arrived_at": @"", @"curbside_details": @"" }, @"expired_at": @"", @"expires_at": @"", @"is_curbside_pickup": @NO, @"note": @"", @"picked_up_at": @"", @"pickup_at": @"", @"pickup_window_duration": @"", @"placed_at": @"", @"prep_time_duration": @"", @"ready_at": @"", @"recipient": @{ @"address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" }, @"customer_id": @"", @"display_name": @"", @"email": @{  }, @"phone_number": @{  } }, @"rejected_at": @"", @"schedule_type": @"" }, @"shipment_details": @{  }, @"status": @"", @"type": @"" } ],
                              @"id": @"",
                              @"idempotency_key": @"",
                              @"line_items": @[ @{ @"applied_discounts": @[  ], @"applied_taxes": @[  ], @"id": @"", @"item": @"", @"modifiers": @[  ], @"name": @"", @"quantity": @"", @"total_amount": @0, @"total_discount": @0, @"total_tax": @0, @"unit_price": @"" } ],
                              @"location_id": @"",
                              @"merchant_id": @"",
                              @"note": @"",
                              @"order_date": @"",
                              @"order_number": @"",
                              @"order_type_id": @"",
                              @"payment_status": @"",
                              @"payments": @[ @{ @"amount": @0, @"currency": @"", @"id": @"" } ],
                              @"reference_id": @"",
                              @"refunded": @NO,
                              @"refunds": @[ @{ @"amount": @0, @"currency": @"", @"id": @"", @"location_id": @"", @"reason": @"", @"status": @"", @"tender_id": @"", @"transaction_id": @"" } ],
                              @"seat": @"",
                              @"service_charges": @[ @{ @"active": @NO, @"amount": @"", @"currency": @"", @"id": @"", @"name": @"", @"percentage": @"", @"type": @"" } ],
                              @"source": @"",
                              @"status": @"",
                              @"table": @"",
                              @"taxes": @[  ],
                              @"tenders": @[ @{ @"amount": @"", @"buyer_tendered_cash_amount": @0, @"card": @{ @"billing_address": @{  }, @"bin": @"", @"card_brand": @"", @"card_type": @"", @"cardholder_name": @"", @"customer_id": @"", @"enabled": @NO, @"exp_month": @0, @"exp_year": @0, @"fingerprint": @"", @"id": @"", @"last_4": @"", @"merchant_id": @"", @"prepaid_type": @"", @"reference_id": @"", @"version": @"" }, @"card_entry_method": @"", @"card_status": @"", @"change_back_cash_amount": @0, @"currency": @"", @"id": @"", @"location_id": @"", @"name": @"", @"note": @"", @"payment_id": @"", @"percentage": @"", @"total_amount": @0, @"total_discount": @0, @"total_processing_fee": @0, @"total_refund": @0, @"total_service_charge": @0, @"total_tax": @0, @"total_tip": @0, @"transaction_id": @"", @"type": @"" } ],
                              @"title": @"",
                              @"total_amount": @0,
                              @"total_discount": @0,
                              @"total_refund": @0,
                              @"total_service_charge": @0,
                              @"total_tax": @0,
                              @"total_tip": @0,
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"version": @"",
                              @"voided": @NO,
                              @"voided_at": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/orders"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/orders" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/orders",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'closed_date' => '',
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'customer_id' => '',
    'customers' => [
        [
                'emails' => [
                                [
                                                                'email' => '',
                                                                'id' => '',
                                                                'type' => ''
                                ]
                ],
                'first_name' => '',
                'id' => '',
                'last_name' => '',
                'middle_name' => '',
                'phone_numbers' => [
                                [
                                                                'area_code' => '',
                                                                'country_code' => '',
                                                                'extension' => '',
                                                                'id' => '',
                                                                'number' => '',
                                                                'type' => ''
                                ]
                ]
        ]
    ],
    'discounts' => [
        [
                'amount' => 0,
                'currency' => '',
                'id' => '',
                'name' => '',
                'product_id' => '',
                'scope' => '',
                'type' => ''
        ]
    ],
    'employee_id' => '',
    'fulfillments' => [
        [
                'id' => '',
                'pickup_details' => [
                                'accepted_at' => '',
                                'auto_complete_duration' => '',
                                'cancel_reason' => '',
                                'canceled_at' => '',
                                'curbside_pickup_details' => [
                                                                'buyer_arrived_at' => '',
                                                                'curbside_details' => ''
                                ],
                                'expired_at' => '',
                                'expires_at' => '',
                                'is_curbside_pickup' => null,
                                'note' => '',
                                'picked_up_at' => '',
                                'pickup_at' => '',
                                'pickup_window_duration' => '',
                                'placed_at' => '',
                                'prep_time_duration' => '',
                                'ready_at' => '',
                                'recipient' => [
                                                                'address' => [
                                                                                                                                'city' => '',
                                                                                                                                'contact_name' => '',
                                                                                                                                'country' => '',
                                                                                                                                'county' => '',
                                                                                                                                'email' => '',
                                                                                                                                'fax' => '',
                                                                                                                                'id' => '',
                                                                                                                                'latitude' => '',
                                                                                                                                'line1' => '',
                                                                                                                                'line2' => '',
                                                                                                                                'line3' => '',
                                                                                                                                'line4' => '',
                                                                                                                                'longitude' => '',
                                                                                                                                'name' => '',
                                                                                                                                'phone_number' => '',
                                                                                                                                'postal_code' => '',
                                                                                                                                'row_version' => '',
                                                                                                                                'salutation' => '',
                                                                                                                                'state' => '',
                                                                                                                                'street_number' => '',
                                                                                                                                'string' => '',
                                                                                                                                'type' => '',
                                                                                                                                'website' => ''
                                                                ],
                                                                'customer_id' => '',
                                                                'display_name' => '',
                                                                'email' => [
                                                                                                                                
                                                                ],
                                                                'phone_number' => [
                                                                                                                                
                                                                ]
                                ],
                                'rejected_at' => '',
                                'schedule_type' => ''
                ],
                'shipment_details' => [
                                
                ],
                'status' => '',
                'type' => ''
        ]
    ],
    'id' => '',
    'idempotency_key' => '',
    'line_items' => [
        [
                'applied_discounts' => [
                                
                ],
                'applied_taxes' => [
                                
                ],
                'id' => '',
                'item' => '',
                'modifiers' => [
                                
                ],
                'name' => '',
                'quantity' => '',
                'total_amount' => 0,
                'total_discount' => 0,
                'total_tax' => 0,
                'unit_price' => ''
        ]
    ],
    'location_id' => '',
    'merchant_id' => '',
    'note' => '',
    'order_date' => '',
    'order_number' => '',
    'order_type_id' => '',
    'payment_status' => '',
    'payments' => [
        [
                'amount' => 0,
                'currency' => '',
                'id' => ''
        ]
    ],
    'reference_id' => '',
    'refunded' => null,
    'refunds' => [
        [
                'amount' => 0,
                'currency' => '',
                'id' => '',
                'location_id' => '',
                'reason' => '',
                'status' => '',
                'tender_id' => '',
                'transaction_id' => ''
        ]
    ],
    'seat' => '',
    'service_charges' => [
        [
                'active' => null,
                'amount' => '',
                'currency' => '',
                'id' => '',
                'name' => '',
                'percentage' => '',
                'type' => ''
        ]
    ],
    'source' => '',
    'status' => '',
    'table' => '',
    'taxes' => [
        
    ],
    'tenders' => [
        [
                'amount' => '',
                'buyer_tendered_cash_amount' => 0,
                'card' => [
                                'billing_address' => [
                                                                
                                ],
                                'bin' => '',
                                'card_brand' => '',
                                'card_type' => '',
                                'cardholder_name' => '',
                                'customer_id' => '',
                                'enabled' => null,
                                'exp_month' => 0,
                                'exp_year' => 0,
                                'fingerprint' => '',
                                'id' => '',
                                'last_4' => '',
                                'merchant_id' => '',
                                'prepaid_type' => '',
                                'reference_id' => '',
                                'version' => ''
                ],
                'card_entry_method' => '',
                'card_status' => '',
                'change_back_cash_amount' => 0,
                'currency' => '',
                'id' => '',
                'location_id' => '',
                'name' => '',
                'note' => '',
                'payment_id' => '',
                'percentage' => '',
                'total_amount' => 0,
                'total_discount' => 0,
                'total_processing_fee' => 0,
                'total_refund' => 0,
                'total_service_charge' => 0,
                'total_tax' => 0,
                'total_tip' => 0,
                'transaction_id' => '',
                'type' => ''
        ]
    ],
    'title' => '',
    'total_amount' => 0,
    'total_discount' => 0,
    'total_refund' => 0,
    'total_service_charge' => 0,
    'total_tax' => 0,
    'total_tip' => 0,
    'updated_at' => '',
    'updated_by' => '',
    'version' => '',
    'voided' => null,
    'voided_at' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/orders', [
  'body' => '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/orders');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'closed_date' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'customers' => [
    [
        'emails' => [
                [
                                'email' => '',
                                'id' => '',
                                'type' => ''
                ]
        ],
        'first_name' => '',
        'id' => '',
        'last_name' => '',
        'middle_name' => '',
        'phone_numbers' => [
                [
                                'area_code' => '',
                                'country_code' => '',
                                'extension' => '',
                                'id' => '',
                                'number' => '',
                                'type' => ''
                ]
        ]
    ]
  ],
  'discounts' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'name' => '',
        'product_id' => '',
        'scope' => '',
        'type' => ''
    ]
  ],
  'employee_id' => '',
  'fulfillments' => [
    [
        'id' => '',
        'pickup_details' => [
                'accepted_at' => '',
                'auto_complete_duration' => '',
                'cancel_reason' => '',
                'canceled_at' => '',
                'curbside_pickup_details' => [
                                'buyer_arrived_at' => '',
                                'curbside_details' => ''
                ],
                'expired_at' => '',
                'expires_at' => '',
                'is_curbside_pickup' => null,
                'note' => '',
                'picked_up_at' => '',
                'pickup_at' => '',
                'pickup_window_duration' => '',
                'placed_at' => '',
                'prep_time_duration' => '',
                'ready_at' => '',
                'recipient' => [
                                'address' => [
                                                                'city' => '',
                                                                'contact_name' => '',
                                                                'country' => '',
                                                                'county' => '',
                                                                'email' => '',
                                                                'fax' => '',
                                                                'id' => '',
                                                                'latitude' => '',
                                                                'line1' => '',
                                                                'line2' => '',
                                                                'line3' => '',
                                                                'line4' => '',
                                                                'longitude' => '',
                                                                'name' => '',
                                                                'phone_number' => '',
                                                                'postal_code' => '',
                                                                'row_version' => '',
                                                                'salutation' => '',
                                                                'state' => '',
                                                                'street_number' => '',
                                                                'string' => '',
                                                                'type' => '',
                                                                'website' => ''
                                ],
                                'customer_id' => '',
                                'display_name' => '',
                                'email' => [
                                                                
                                ],
                                'phone_number' => [
                                                                
                                ]
                ],
                'rejected_at' => '',
                'schedule_type' => ''
        ],
        'shipment_details' => [
                
        ],
        'status' => '',
        'type' => ''
    ]
  ],
  'id' => '',
  'idempotency_key' => '',
  'line_items' => [
    [
        'applied_discounts' => [
                
        ],
        'applied_taxes' => [
                
        ],
        'id' => '',
        'item' => '',
        'modifiers' => [
                
        ],
        'name' => '',
        'quantity' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_tax' => 0,
        'unit_price' => ''
    ]
  ],
  'location_id' => '',
  'merchant_id' => '',
  'note' => '',
  'order_date' => '',
  'order_number' => '',
  'order_type_id' => '',
  'payment_status' => '',
  'payments' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => ''
    ]
  ],
  'reference_id' => '',
  'refunded' => null,
  'refunds' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'reason' => '',
        'status' => '',
        'tender_id' => '',
        'transaction_id' => ''
    ]
  ],
  'seat' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'status' => '',
  'table' => '',
  'taxes' => [
    
  ],
  'tenders' => [
    [
        'amount' => '',
        'buyer_tendered_cash_amount' => 0,
        'card' => [
                'billing_address' => [
                                
                ],
                'bin' => '',
                'card_brand' => '',
                'card_type' => '',
                'cardholder_name' => '',
                'customer_id' => '',
                'enabled' => null,
                'exp_month' => 0,
                'exp_year' => 0,
                'fingerprint' => '',
                'id' => '',
                'last_4' => '',
                'merchant_id' => '',
                'prepaid_type' => '',
                'reference_id' => '',
                'version' => ''
        ],
        'card_entry_method' => '',
        'card_status' => '',
        'change_back_cash_amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'name' => '',
        'note' => '',
        'payment_id' => '',
        'percentage' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_processing_fee' => 0,
        'total_refund' => 0,
        'total_service_charge' => 0,
        'total_tax' => 0,
        'total_tip' => 0,
        'transaction_id' => '',
        'type' => ''
    ]
  ],
  'title' => '',
  'total_amount' => 0,
  'total_discount' => 0,
  'total_refund' => 0,
  'total_service_charge' => 0,
  'total_tax' => 0,
  'total_tip' => 0,
  'updated_at' => '',
  'updated_by' => '',
  'version' => '',
  'voided' => null,
  'voided_at' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'closed_date' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'customers' => [
    [
        'emails' => [
                [
                                'email' => '',
                                'id' => '',
                                'type' => ''
                ]
        ],
        'first_name' => '',
        'id' => '',
        'last_name' => '',
        'middle_name' => '',
        'phone_numbers' => [
                [
                                'area_code' => '',
                                'country_code' => '',
                                'extension' => '',
                                'id' => '',
                                'number' => '',
                                'type' => ''
                ]
        ]
    ]
  ],
  'discounts' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'name' => '',
        'product_id' => '',
        'scope' => '',
        'type' => ''
    ]
  ],
  'employee_id' => '',
  'fulfillments' => [
    [
        'id' => '',
        'pickup_details' => [
                'accepted_at' => '',
                'auto_complete_duration' => '',
                'cancel_reason' => '',
                'canceled_at' => '',
                'curbside_pickup_details' => [
                                'buyer_arrived_at' => '',
                                'curbside_details' => ''
                ],
                'expired_at' => '',
                'expires_at' => '',
                'is_curbside_pickup' => null,
                'note' => '',
                'picked_up_at' => '',
                'pickup_at' => '',
                'pickup_window_duration' => '',
                'placed_at' => '',
                'prep_time_duration' => '',
                'ready_at' => '',
                'recipient' => [
                                'address' => [
                                                                'city' => '',
                                                                'contact_name' => '',
                                                                'country' => '',
                                                                'county' => '',
                                                                'email' => '',
                                                                'fax' => '',
                                                                'id' => '',
                                                                'latitude' => '',
                                                                'line1' => '',
                                                                'line2' => '',
                                                                'line3' => '',
                                                                'line4' => '',
                                                                'longitude' => '',
                                                                'name' => '',
                                                                'phone_number' => '',
                                                                'postal_code' => '',
                                                                'row_version' => '',
                                                                'salutation' => '',
                                                                'state' => '',
                                                                'street_number' => '',
                                                                'string' => '',
                                                                'type' => '',
                                                                'website' => ''
                                ],
                                'customer_id' => '',
                                'display_name' => '',
                                'email' => [
                                                                
                                ],
                                'phone_number' => [
                                                                
                                ]
                ],
                'rejected_at' => '',
                'schedule_type' => ''
        ],
        'shipment_details' => [
                
        ],
        'status' => '',
        'type' => ''
    ]
  ],
  'id' => '',
  'idempotency_key' => '',
  'line_items' => [
    [
        'applied_discounts' => [
                
        ],
        'applied_taxes' => [
                
        ],
        'id' => '',
        'item' => '',
        'modifiers' => [
                
        ],
        'name' => '',
        'quantity' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_tax' => 0,
        'unit_price' => ''
    ]
  ],
  'location_id' => '',
  'merchant_id' => '',
  'note' => '',
  'order_date' => '',
  'order_number' => '',
  'order_type_id' => '',
  'payment_status' => '',
  'payments' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => ''
    ]
  ],
  'reference_id' => '',
  'refunded' => null,
  'refunds' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'reason' => '',
        'status' => '',
        'tender_id' => '',
        'transaction_id' => ''
    ]
  ],
  'seat' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'status' => '',
  'table' => '',
  'taxes' => [
    
  ],
  'tenders' => [
    [
        'amount' => '',
        'buyer_tendered_cash_amount' => 0,
        'card' => [
                'billing_address' => [
                                
                ],
                'bin' => '',
                'card_brand' => '',
                'card_type' => '',
                'cardholder_name' => '',
                'customer_id' => '',
                'enabled' => null,
                'exp_month' => 0,
                'exp_year' => 0,
                'fingerprint' => '',
                'id' => '',
                'last_4' => '',
                'merchant_id' => '',
                'prepaid_type' => '',
                'reference_id' => '',
                'version' => ''
        ],
        'card_entry_method' => '',
        'card_status' => '',
        'change_back_cash_amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'name' => '',
        'note' => '',
        'payment_id' => '',
        'percentage' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_processing_fee' => 0,
        'total_refund' => 0,
        'total_service_charge' => 0,
        'total_tax' => 0,
        'total_tip' => 0,
        'transaction_id' => '',
        'type' => ''
    ]
  ],
  'title' => '',
  'total_amount' => 0,
  'total_discount' => 0,
  'total_refund' => 0,
  'total_service_charge' => 0,
  'total_tax' => 0,
  'total_tip' => 0,
  'updated_at' => '',
  'updated_by' => '',
  'version' => '',
  'voided' => null,
  'voided_at' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/orders');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/orders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/orders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/orders", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/orders"

payload = {
    "closed_date": "",
    "created_at": "",
    "created_by": "",
    "currency": "",
    "customer_id": "",
    "customers": [
        {
            "emails": [
                {
                    "email": "",
                    "id": "",
                    "type": ""
                }
            ],
            "first_name": "",
            "id": "",
            "last_name": "",
            "middle_name": "",
            "phone_numbers": [
                {
                    "area_code": "",
                    "country_code": "",
                    "extension": "",
                    "id": "",
                    "number": "",
                    "type": ""
                }
            ]
        }
    ],
    "discounts": [
        {
            "amount": 0,
            "currency": "",
            "id": "",
            "name": "",
            "product_id": "",
            "scope": "",
            "type": ""
        }
    ],
    "employee_id": "",
    "fulfillments": [
        {
            "id": "",
            "pickup_details": {
                "accepted_at": "",
                "auto_complete_duration": "",
                "cancel_reason": "",
                "canceled_at": "",
                "curbside_pickup_details": {
                    "buyer_arrived_at": "",
                    "curbside_details": ""
                },
                "expired_at": "",
                "expires_at": "",
                "is_curbside_pickup": False,
                "note": "",
                "picked_up_at": "",
                "pickup_at": "",
                "pickup_window_duration": "",
                "placed_at": "",
                "prep_time_duration": "",
                "ready_at": "",
                "recipient": {
                    "address": {
                        "city": "",
                        "contact_name": "",
                        "country": "",
                        "county": "",
                        "email": "",
                        "fax": "",
                        "id": "",
                        "latitude": "",
                        "line1": "",
                        "line2": "",
                        "line3": "",
                        "line4": "",
                        "longitude": "",
                        "name": "",
                        "phone_number": "",
                        "postal_code": "",
                        "row_version": "",
                        "salutation": "",
                        "state": "",
                        "street_number": "",
                        "string": "",
                        "type": "",
                        "website": ""
                    },
                    "customer_id": "",
                    "display_name": "",
                    "email": {},
                    "phone_number": {}
                },
                "rejected_at": "",
                "schedule_type": ""
            },
            "shipment_details": {},
            "status": "",
            "type": ""
        }
    ],
    "id": "",
    "idempotency_key": "",
    "line_items": [
        {
            "applied_discounts": [],
            "applied_taxes": [],
            "id": "",
            "item": "",
            "modifiers": [],
            "name": "",
            "quantity": "",
            "total_amount": 0,
            "total_discount": 0,
            "total_tax": 0,
            "unit_price": ""
        }
    ],
    "location_id": "",
    "merchant_id": "",
    "note": "",
    "order_date": "",
    "order_number": "",
    "order_type_id": "",
    "payment_status": "",
    "payments": [
        {
            "amount": 0,
            "currency": "",
            "id": ""
        }
    ],
    "reference_id": "",
    "refunded": False,
    "refunds": [
        {
            "amount": 0,
            "currency": "",
            "id": "",
            "location_id": "",
            "reason": "",
            "status": "",
            "tender_id": "",
            "transaction_id": ""
        }
    ],
    "seat": "",
    "service_charges": [
        {
            "active": False,
            "amount": "",
            "currency": "",
            "id": "",
            "name": "",
            "percentage": "",
            "type": ""
        }
    ],
    "source": "",
    "status": "",
    "table": "",
    "taxes": [],
    "tenders": [
        {
            "amount": "",
            "buyer_tendered_cash_amount": 0,
            "card": {
                "billing_address": {},
                "bin": "",
                "card_brand": "",
                "card_type": "",
                "cardholder_name": "",
                "customer_id": "",
                "enabled": False,
                "exp_month": 0,
                "exp_year": 0,
                "fingerprint": "",
                "id": "",
                "last_4": "",
                "merchant_id": "",
                "prepaid_type": "",
                "reference_id": "",
                "version": ""
            },
            "card_entry_method": "",
            "card_status": "",
            "change_back_cash_amount": 0,
            "currency": "",
            "id": "",
            "location_id": "",
            "name": "",
            "note": "",
            "payment_id": "",
            "percentage": "",
            "total_amount": 0,
            "total_discount": 0,
            "total_processing_fee": 0,
            "total_refund": 0,
            "total_service_charge": 0,
            "total_tax": 0,
            "total_tip": 0,
            "transaction_id": "",
            "type": ""
        }
    ],
    "title": "",
    "total_amount": 0,
    "total_discount": 0,
    "total_refund": 0,
    "total_service_charge": 0,
    "total_tax": 0,
    "total_tip": 0,
    "updated_at": "",
    "updated_by": "",
    "version": "",
    "voided": False,
    "voided_at": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/orders"

payload <- "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/orders")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/orders') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/orders";

    let payload = json!({
        "closed_date": "",
        "created_at": "",
        "created_by": "",
        "currency": "",
        "customer_id": "",
        "customers": (
            json!({
                "emails": (
                    json!({
                        "email": "",
                        "id": "",
                        "type": ""
                    })
                ),
                "first_name": "",
                "id": "",
                "last_name": "",
                "middle_name": "",
                "phone_numbers": (
                    json!({
                        "area_code": "",
                        "country_code": "",
                        "extension": "",
                        "id": "",
                        "number": "",
                        "type": ""
                    })
                )
            })
        ),
        "discounts": (
            json!({
                "amount": 0,
                "currency": "",
                "id": "",
                "name": "",
                "product_id": "",
                "scope": "",
                "type": ""
            })
        ),
        "employee_id": "",
        "fulfillments": (
            json!({
                "id": "",
                "pickup_details": json!({
                    "accepted_at": "",
                    "auto_complete_duration": "",
                    "cancel_reason": "",
                    "canceled_at": "",
                    "curbside_pickup_details": json!({
                        "buyer_arrived_at": "",
                        "curbside_details": ""
                    }),
                    "expired_at": "",
                    "expires_at": "",
                    "is_curbside_pickup": false,
                    "note": "",
                    "picked_up_at": "",
                    "pickup_at": "",
                    "pickup_window_duration": "",
                    "placed_at": "",
                    "prep_time_duration": "",
                    "ready_at": "",
                    "recipient": json!({
                        "address": json!({
                            "city": "",
                            "contact_name": "",
                            "country": "",
                            "county": "",
                            "email": "",
                            "fax": "",
                            "id": "",
                            "latitude": "",
                            "line1": "",
                            "line2": "",
                            "line3": "",
                            "line4": "",
                            "longitude": "",
                            "name": "",
                            "phone_number": "",
                            "postal_code": "",
                            "row_version": "",
                            "salutation": "",
                            "state": "",
                            "street_number": "",
                            "string": "",
                            "type": "",
                            "website": ""
                        }),
                        "customer_id": "",
                        "display_name": "",
                        "email": json!({}),
                        "phone_number": json!({})
                    }),
                    "rejected_at": "",
                    "schedule_type": ""
                }),
                "shipment_details": json!({}),
                "status": "",
                "type": ""
            })
        ),
        "id": "",
        "idempotency_key": "",
        "line_items": (
            json!({
                "applied_discounts": (),
                "applied_taxes": (),
                "id": "",
                "item": "",
                "modifiers": (),
                "name": "",
                "quantity": "",
                "total_amount": 0,
                "total_discount": 0,
                "total_tax": 0,
                "unit_price": ""
            })
        ),
        "location_id": "",
        "merchant_id": "",
        "note": "",
        "order_date": "",
        "order_number": "",
        "order_type_id": "",
        "payment_status": "",
        "payments": (
            json!({
                "amount": 0,
                "currency": "",
                "id": ""
            })
        ),
        "reference_id": "",
        "refunded": false,
        "refunds": (
            json!({
                "amount": 0,
                "currency": "",
                "id": "",
                "location_id": "",
                "reason": "",
                "status": "",
                "tender_id": "",
                "transaction_id": ""
            })
        ),
        "seat": "",
        "service_charges": (
            json!({
                "active": false,
                "amount": "",
                "currency": "",
                "id": "",
                "name": "",
                "percentage": "",
                "type": ""
            })
        ),
        "source": "",
        "status": "",
        "table": "",
        "taxes": (),
        "tenders": (
            json!({
                "amount": "",
                "buyer_tendered_cash_amount": 0,
                "card": json!({
                    "billing_address": json!({}),
                    "bin": "",
                    "card_brand": "",
                    "card_type": "",
                    "cardholder_name": "",
                    "customer_id": "",
                    "enabled": false,
                    "exp_month": 0,
                    "exp_year": 0,
                    "fingerprint": "",
                    "id": "",
                    "last_4": "",
                    "merchant_id": "",
                    "prepaid_type": "",
                    "reference_id": "",
                    "version": ""
                }),
                "card_entry_method": "",
                "card_status": "",
                "change_back_cash_amount": 0,
                "currency": "",
                "id": "",
                "location_id": "",
                "name": "",
                "note": "",
                "payment_id": "",
                "percentage": "",
                "total_amount": 0,
                "total_discount": 0,
                "total_processing_fee": 0,
                "total_refund": 0,
                "total_service_charge": 0,
                "total_tax": 0,
                "total_tip": 0,
                "transaction_id": "",
                "type": ""
            })
        ),
        "title": "",
        "total_amount": 0,
        "total_discount": 0,
        "total_refund": 0,
        "total_service_charge": 0,
        "total_tax": 0,
        "total_tip": 0,
        "updated_at": "",
        "updated_by": "",
        "version": "",
        "voided": false,
        "voided_at": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/orders \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}'
echo '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}' |  \
  http POST {{baseUrl}}/pos/orders \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "closed_date": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "customers": [\n    {\n      "emails": [\n        {\n          "email": "",\n          "id": "",\n          "type": ""\n        }\n      ],\n      "first_name": "",\n      "id": "",\n      "last_name": "",\n      "middle_name": "",\n      "phone_numbers": [\n        {\n          "area_code": "",\n          "country_code": "",\n          "extension": "",\n          "id": "",\n          "number": "",\n          "type": ""\n        }\n      ]\n    }\n  ],\n  "discounts": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "name": "",\n      "product_id": "",\n      "scope": "",\n      "type": ""\n    }\n  ],\n  "employee_id": "",\n  "fulfillments": [\n    {\n      "id": "",\n      "pickup_details": {\n        "accepted_at": "",\n        "auto_complete_duration": "",\n        "cancel_reason": "",\n        "canceled_at": "",\n        "curbside_pickup_details": {\n          "buyer_arrived_at": "",\n          "curbside_details": ""\n        },\n        "expired_at": "",\n        "expires_at": "",\n        "is_curbside_pickup": false,\n        "note": "",\n        "picked_up_at": "",\n        "pickup_at": "",\n        "pickup_window_duration": "",\n        "placed_at": "",\n        "prep_time_duration": "",\n        "ready_at": "",\n        "recipient": {\n          "address": {\n            "city": "",\n            "contact_name": "",\n            "country": "",\n            "county": "",\n            "email": "",\n            "fax": "",\n            "id": "",\n            "latitude": "",\n            "line1": "",\n            "line2": "",\n            "line3": "",\n            "line4": "",\n            "longitude": "",\n            "name": "",\n            "phone_number": "",\n            "postal_code": "",\n            "row_version": "",\n            "salutation": "",\n            "state": "",\n            "street_number": "",\n            "string": "",\n            "type": "",\n            "website": ""\n          },\n          "customer_id": "",\n          "display_name": "",\n          "email": {},\n          "phone_number": {}\n        },\n        "rejected_at": "",\n        "schedule_type": ""\n      },\n      "shipment_details": {},\n      "status": "",\n      "type": ""\n    }\n  ],\n  "id": "",\n  "idempotency_key": "",\n  "line_items": [\n    {\n      "applied_discounts": [],\n      "applied_taxes": [],\n      "id": "",\n      "item": "",\n      "modifiers": [],\n      "name": "",\n      "quantity": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_tax": 0,\n      "unit_price": ""\n    }\n  ],\n  "location_id": "",\n  "merchant_id": "",\n  "note": "",\n  "order_date": "",\n  "order_number": "",\n  "order_type_id": "",\n  "payment_status": "",\n  "payments": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": ""\n    }\n  ],\n  "reference_id": "",\n  "refunded": false,\n  "refunds": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "reason": "",\n      "status": "",\n      "tender_id": "",\n      "transaction_id": ""\n    }\n  ],\n  "seat": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "status": "",\n  "table": "",\n  "taxes": [],\n  "tenders": [\n    {\n      "amount": "",\n      "buyer_tendered_cash_amount": 0,\n      "card": {\n        "billing_address": {},\n        "bin": "",\n        "card_brand": "",\n        "card_type": "",\n        "cardholder_name": "",\n        "customer_id": "",\n        "enabled": false,\n        "exp_month": 0,\n        "exp_year": 0,\n        "fingerprint": "",\n        "id": "",\n        "last_4": "",\n        "merchant_id": "",\n        "prepaid_type": "",\n        "reference_id": "",\n        "version": ""\n      },\n      "card_entry_method": "",\n      "card_status": "",\n      "change_back_cash_amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "name": "",\n      "note": "",\n      "payment_id": "",\n      "percentage": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_processing_fee": 0,\n      "total_refund": 0,\n      "total_service_charge": 0,\n      "total_tax": 0,\n      "total_tip": 0,\n      "transaction_id": "",\n      "type": ""\n    }\n  ],\n  "title": "",\n  "total_amount": 0,\n  "total_discount": 0,\n  "total_refund": 0,\n  "total_service_charge": 0,\n  "total_tax": 0,\n  "total_tip": 0,\n  "updated_at": "",\n  "updated_by": "",\n  "version": "",\n  "voided": false,\n  "voided_at": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/orders
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    [
      "emails": [
        [
          "email": "",
          "id": "",
          "type": ""
        ]
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        [
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        ]
      ]
    ]
  ],
  "discounts": [
    [
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    ]
  ],
  "employee_id": "",
  "fulfillments": [
    [
      "id": "",
      "pickup_details": [
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": [
          "buyer_arrived_at": "",
          "curbside_details": ""
        ],
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": [
          "address": [
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          ],
          "customer_id": "",
          "display_name": "",
          "email": [],
          "phone_number": []
        ],
        "rejected_at": "",
        "schedule_type": ""
      ],
      "shipment_details": [],
      "status": "",
      "type": ""
    ]
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    [
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    ]
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    [
      "amount": 0,
      "currency": "",
      "id": ""
    ]
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    [
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    ]
  ],
  "seat": "",
  "service_charges": [
    [
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    ]
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    [
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": [
        "billing_address": [],
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      ],
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    ]
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "orders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete Order
{{baseUrl}}/pos/orders/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/orders/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/pos/orders/:id" {:headers {:x-apideck-consumer-id ""
                                                                       :x-apideck-app-id ""
                                                                       :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/orders/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/pos/orders/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/orders/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/orders/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/pos/orders/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/pos/orders/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/orders/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/orders/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/pos/orders/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/pos/orders/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/orders/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/orders/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/orders/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/pos/orders/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/orders/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/orders/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/orders/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/orders/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/pos/orders/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/orders/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/orders/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/orders/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/orders/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/pos/orders/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/orders/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/orders/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/orders/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/pos/orders/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/orders/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/pos/orders/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/pos/orders/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/orders/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/orders/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "orders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get Order
{{baseUrl}}/pos/orders/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/orders/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/orders/:id" {:headers {:x-apideck-consumer-id ""
                                                                    :x-apideck-app-id ""
                                                                    :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/orders/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/orders/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/orders/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/orders/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/orders/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/orders/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/orders/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/orders/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/orders/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/orders/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/orders/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/orders/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/orders/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/orders/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/orders/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/orders/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/orders/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/orders/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/orders/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/orders/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/orders/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/orders/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/orders/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/orders/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/orders/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/orders/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/orders/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/orders/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/orders/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/orders/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/orders/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/orders/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/orders/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "closed_date": "2022-08-13",
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "currency": "USD",
    "customer_id": "12345",
    "employee_id": "12345",
    "id": "12345",
    "idempotency_key": "random_string",
    "location_id": "12345",
    "merchant_id": "12345",
    "order_date": "2022-08-12",
    "order_number": "1F",
    "order_type_id": "12345",
    "payment_status": "open",
    "reference_id": "my-order-001",
    "refunded": false,
    "seat": "23F",
    "source": "api",
    "status": "open",
    "table": "1F",
    "total_amount": 275,
    "total_discount": 300,
    "total_refund": 0,
    "total_service_charge": 0,
    "total_tax": 275,
    "total_tip": 700,
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345",
    "version": "230320320320",
    "voided": false,
    "voided_at": "2020-09-30T07:43:32.000Z"
  },
  "operation": "one",
  "resource": "orders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List Orders
{{baseUrl}}/pos/orders
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/orders");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/orders" {:headers {:x-apideck-consumer-id ""
                                                                :x-apideck-app-id ""
                                                                :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/orders"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/orders"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/orders");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/orders"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/orders HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/orders")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/orders"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/orders")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/orders")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/orders');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/orders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/orders';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/orders',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/orders")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/orders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/orders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/orders');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/orders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/orders';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/orders"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/orders" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/orders",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/orders', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/orders');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/orders');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/orders' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/orders' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/orders", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/orders"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/orders"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/orders")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/orders') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/orders";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/orders \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/orders \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/orders
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "orders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Pay Order
{{baseUrl}}/pos/orders/:id/pay
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/orders/:id/pay");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/orders/:id/pay" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}
                                                               :content-type :json
                                                               :form-params {:closed_date ""
                                                                             :created_at ""
                                                                             :created_by ""
                                                                             :currency ""
                                                                             :customer_id ""
                                                                             :customers [{:emails [{:email ""
                                                                                                    :id ""
                                                                                                    :type ""}]
                                                                                          :first_name ""
                                                                                          :id ""
                                                                                          :last_name ""
                                                                                          :middle_name ""
                                                                                          :phone_numbers [{:area_code ""
                                                                                                           :country_code ""
                                                                                                           :extension ""
                                                                                                           :id ""
                                                                                                           :number ""
                                                                                                           :type ""}]}]
                                                                             :discounts [{:amount 0
                                                                                          :currency ""
                                                                                          :id ""
                                                                                          :name ""
                                                                                          :product_id ""
                                                                                          :scope ""
                                                                                          :type ""}]
                                                                             :employee_id ""
                                                                             :fulfillments [{:id ""
                                                                                             :pickup_details {:accepted_at ""
                                                                                                              :auto_complete_duration ""
                                                                                                              :cancel_reason ""
                                                                                                              :canceled_at ""
                                                                                                              :curbside_pickup_details {:buyer_arrived_at ""
                                                                                                                                        :curbside_details ""}
                                                                                                              :expired_at ""
                                                                                                              :expires_at ""
                                                                                                              :is_curbside_pickup false
                                                                                                              :note ""
                                                                                                              :picked_up_at ""
                                                                                                              :pickup_at ""
                                                                                                              :pickup_window_duration ""
                                                                                                              :placed_at ""
                                                                                                              :prep_time_duration ""
                                                                                                              :ready_at ""
                                                                                                              :recipient {:address {:city ""
                                                                                                                                    :contact_name ""
                                                                                                                                    :country ""
                                                                                                                                    :county ""
                                                                                                                                    :email ""
                                                                                                                                    :fax ""
                                                                                                                                    :id ""
                                                                                                                                    :latitude ""
                                                                                                                                    :line1 ""
                                                                                                                                    :line2 ""
                                                                                                                                    :line3 ""
                                                                                                                                    :line4 ""
                                                                                                                                    :longitude ""
                                                                                                                                    :name ""
                                                                                                                                    :phone_number ""
                                                                                                                                    :postal_code ""
                                                                                                                                    :row_version ""
                                                                                                                                    :salutation ""
                                                                                                                                    :state ""
                                                                                                                                    :street_number ""
                                                                                                                                    :string ""
                                                                                                                                    :type ""
                                                                                                                                    :website ""}
                                                                                                                          :customer_id ""
                                                                                                                          :display_name ""
                                                                                                                          :email {}
                                                                                                                          :phone_number {}}
                                                                                                              :rejected_at ""
                                                                                                              :schedule_type ""}
                                                                                             :shipment_details {}
                                                                                             :status ""
                                                                                             :type ""}]
                                                                             :id ""
                                                                             :idempotency_key ""
                                                                             :line_items [{:applied_discounts []
                                                                                           :applied_taxes []
                                                                                           :id ""
                                                                                           :item ""
                                                                                           :modifiers []
                                                                                           :name ""
                                                                                           :quantity ""
                                                                                           :total_amount 0
                                                                                           :total_discount 0
                                                                                           :total_tax 0
                                                                                           :unit_price ""}]
                                                                             :location_id ""
                                                                             :merchant_id ""
                                                                             :note ""
                                                                             :order_date ""
                                                                             :order_number ""
                                                                             :order_type_id ""
                                                                             :payment_status ""
                                                                             :payments [{:amount 0
                                                                                         :currency ""
                                                                                         :id ""}]
                                                                             :reference_id ""
                                                                             :refunded false
                                                                             :refunds [{:amount 0
                                                                                        :currency ""
                                                                                        :id ""
                                                                                        :location_id ""
                                                                                        :reason ""
                                                                                        :status ""
                                                                                        :tender_id ""
                                                                                        :transaction_id ""}]
                                                                             :seat ""
                                                                             :service_charges [{:active false
                                                                                                :amount ""
                                                                                                :currency ""
                                                                                                :id ""
                                                                                                :name ""
                                                                                                :percentage ""
                                                                                                :type ""}]
                                                                             :source ""
                                                                             :status ""
                                                                             :table ""
                                                                             :taxes []
                                                                             :tenders [{:amount ""
                                                                                        :buyer_tendered_cash_amount 0
                                                                                        :card {:billing_address {}
                                                                                               :bin ""
                                                                                               :card_brand ""
                                                                                               :card_type ""
                                                                                               :cardholder_name ""
                                                                                               :customer_id ""
                                                                                               :enabled false
                                                                                               :exp_month 0
                                                                                               :exp_year 0
                                                                                               :fingerprint ""
                                                                                               :id ""
                                                                                               :last_4 ""
                                                                                               :merchant_id ""
                                                                                               :prepaid_type ""
                                                                                               :reference_id ""
                                                                                               :version ""}
                                                                                        :card_entry_method ""
                                                                                        :card_status ""
                                                                                        :change_back_cash_amount 0
                                                                                        :currency ""
                                                                                        :id ""
                                                                                        :location_id ""
                                                                                        :name ""
                                                                                        :note ""
                                                                                        :payment_id ""
                                                                                        :percentage ""
                                                                                        :total_amount 0
                                                                                        :total_discount 0
                                                                                        :total_processing_fee 0
                                                                                        :total_refund 0
                                                                                        :total_service_charge 0
                                                                                        :total_tax 0
                                                                                        :total_tip 0
                                                                                        :transaction_id ""
                                                                                        :type ""}]
                                                                             :title ""
                                                                             :total_amount 0
                                                                             :total_discount 0
                                                                             :total_refund 0
                                                                             :total_service_charge 0
                                                                             :total_tax 0
                                                                             :total_tip 0
                                                                             :updated_at ""
                                                                             :updated_by ""
                                                                             :version ""
                                                                             :voided false
                                                                             :voided_at ""}})
require "http/client"

url = "{{baseUrl}}/pos/orders/:id/pay"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/orders/:id/pay"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/orders/:id/pay");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/orders/:id/pay"

	payload := strings.NewReader("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/orders/:id/pay HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 4547

{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/orders/:id/pay")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/orders/:id/pay"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/orders/:id/pay")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/orders/:id/pay")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  closed_date: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  customers: [
    {
      emails: [
        {
          email: '',
          id: '',
          type: ''
        }
      ],
      first_name: '',
      id: '',
      last_name: '',
      middle_name: '',
      phone_numbers: [
        {
          area_code: '',
          country_code: '',
          extension: '',
          id: '',
          number: '',
          type: ''
        }
      ]
    }
  ],
  discounts: [
    {
      amount: 0,
      currency: '',
      id: '',
      name: '',
      product_id: '',
      scope: '',
      type: ''
    }
  ],
  employee_id: '',
  fulfillments: [
    {
      id: '',
      pickup_details: {
        accepted_at: '',
        auto_complete_duration: '',
        cancel_reason: '',
        canceled_at: '',
        curbside_pickup_details: {
          buyer_arrived_at: '',
          curbside_details: ''
        },
        expired_at: '',
        expires_at: '',
        is_curbside_pickup: false,
        note: '',
        picked_up_at: '',
        pickup_at: '',
        pickup_window_duration: '',
        placed_at: '',
        prep_time_duration: '',
        ready_at: '',
        recipient: {
          address: {
            city: '',
            contact_name: '',
            country: '',
            county: '',
            email: '',
            fax: '',
            id: '',
            latitude: '',
            line1: '',
            line2: '',
            line3: '',
            line4: '',
            longitude: '',
            name: '',
            phone_number: '',
            postal_code: '',
            row_version: '',
            salutation: '',
            state: '',
            street_number: '',
            string: '',
            type: '',
            website: ''
          },
          customer_id: '',
          display_name: '',
          email: {},
          phone_number: {}
        },
        rejected_at: '',
        schedule_type: ''
      },
      shipment_details: {},
      status: '',
      type: ''
    }
  ],
  id: '',
  idempotency_key: '',
  line_items: [
    {
      applied_discounts: [],
      applied_taxes: [],
      id: '',
      item: '',
      modifiers: [],
      name: '',
      quantity: '',
      total_amount: 0,
      total_discount: 0,
      total_tax: 0,
      unit_price: ''
    }
  ],
  location_id: '',
  merchant_id: '',
  note: '',
  order_date: '',
  order_number: '',
  order_type_id: '',
  payment_status: '',
  payments: [
    {
      amount: 0,
      currency: '',
      id: ''
    }
  ],
  reference_id: '',
  refunded: false,
  refunds: [
    {
      amount: 0,
      currency: '',
      id: '',
      location_id: '',
      reason: '',
      status: '',
      tender_id: '',
      transaction_id: ''
    }
  ],
  seat: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  status: '',
  table: '',
  taxes: [],
  tenders: [
    {
      amount: '',
      buyer_tendered_cash_amount: 0,
      card: {
        billing_address: {},
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      },
      card_entry_method: '',
      card_status: '',
      change_back_cash_amount: 0,
      currency: '',
      id: '',
      location_id: '',
      name: '',
      note: '',
      payment_id: '',
      percentage: '',
      total_amount: 0,
      total_discount: 0,
      total_processing_fee: 0,
      total_refund: 0,
      total_service_charge: 0,
      total_tax: 0,
      total_tip: 0,
      transaction_id: '',
      type: ''
    }
  ],
  title: '',
  total_amount: 0,
  total_discount: 0,
  total_refund: 0,
  total_service_charge: 0,
  total_tax: 0,
  total_tip: 0,
  updated_at: '',
  updated_by: '',
  version: '',
  voided: false,
  voided_at: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/orders/:id/pay');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/orders/:id/pay',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    closed_date: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    customers: [
      {
        emails: [{email: '', id: '', type: ''}],
        first_name: '',
        id: '',
        last_name: '',
        middle_name: '',
        phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
      }
    ],
    discounts: [
      {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
    ],
    employee_id: '',
    fulfillments: [
      {
        id: '',
        pickup_details: {
          accepted_at: '',
          auto_complete_duration: '',
          cancel_reason: '',
          canceled_at: '',
          curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
          expired_at: '',
          expires_at: '',
          is_curbside_pickup: false,
          note: '',
          picked_up_at: '',
          pickup_at: '',
          pickup_window_duration: '',
          placed_at: '',
          prep_time_duration: '',
          ready_at: '',
          recipient: {
            address: {
              city: '',
              contact_name: '',
              country: '',
              county: '',
              email: '',
              fax: '',
              id: '',
              latitude: '',
              line1: '',
              line2: '',
              line3: '',
              line4: '',
              longitude: '',
              name: '',
              phone_number: '',
              postal_code: '',
              row_version: '',
              salutation: '',
              state: '',
              street_number: '',
              string: '',
              type: '',
              website: ''
            },
            customer_id: '',
            display_name: '',
            email: {},
            phone_number: {}
          },
          rejected_at: '',
          schedule_type: ''
        },
        shipment_details: {},
        status: '',
        type: ''
      }
    ],
    id: '',
    idempotency_key: '',
    line_items: [
      {
        applied_discounts: [],
        applied_taxes: [],
        id: '',
        item: '',
        modifiers: [],
        name: '',
        quantity: '',
        total_amount: 0,
        total_discount: 0,
        total_tax: 0,
        unit_price: ''
      }
    ],
    location_id: '',
    merchant_id: '',
    note: '',
    order_date: '',
    order_number: '',
    order_type_id: '',
    payment_status: '',
    payments: [{amount: 0, currency: '', id: ''}],
    reference_id: '',
    refunded: false,
    refunds: [
      {
        amount: 0,
        currency: '',
        id: '',
        location_id: '',
        reason: '',
        status: '',
        tender_id: '',
        transaction_id: ''
      }
    ],
    seat: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    status: '',
    table: '',
    taxes: [],
    tenders: [
      {
        amount: '',
        buyer_tendered_cash_amount: 0,
        card: {
          billing_address: {},
          bin: '',
          card_brand: '',
          card_type: '',
          cardholder_name: '',
          customer_id: '',
          enabled: false,
          exp_month: 0,
          exp_year: 0,
          fingerprint: '',
          id: '',
          last_4: '',
          merchant_id: '',
          prepaid_type: '',
          reference_id: '',
          version: ''
        },
        card_entry_method: '',
        card_status: '',
        change_back_cash_amount: 0,
        currency: '',
        id: '',
        location_id: '',
        name: '',
        note: '',
        payment_id: '',
        percentage: '',
        total_amount: 0,
        total_discount: 0,
        total_processing_fee: 0,
        total_refund: 0,
        total_service_charge: 0,
        total_tax: 0,
        total_tip: 0,
        transaction_id: '',
        type: ''
      }
    ],
    title: '',
    total_amount: 0,
    total_discount: 0,
    total_refund: 0,
    total_service_charge: 0,
    total_tax: 0,
    total_tip: 0,
    updated_at: '',
    updated_by: '',
    version: '',
    voided: false,
    voided_at: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/orders/:id/pay';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"closed_date":"","created_at":"","created_by":"","currency":"","customer_id":"","customers":[{"emails":[{"email":"","id":"","type":""}],"first_name":"","id":"","last_name":"","middle_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}]}],"discounts":[{"amount":0,"currency":"","id":"","name":"","product_id":"","scope":"","type":""}],"employee_id":"","fulfillments":[{"id":"","pickup_details":{"accepted_at":"","auto_complete_duration":"","cancel_reason":"","canceled_at":"","curbside_pickup_details":{"buyer_arrived_at":"","curbside_details":""},"expired_at":"","expires_at":"","is_curbside_pickup":false,"note":"","picked_up_at":"","pickup_at":"","pickup_window_duration":"","placed_at":"","prep_time_duration":"","ready_at":"","recipient":{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"customer_id":"","display_name":"","email":{},"phone_number":{}},"rejected_at":"","schedule_type":""},"shipment_details":{},"status":"","type":""}],"id":"","idempotency_key":"","line_items":[{"applied_discounts":[],"applied_taxes":[],"id":"","item":"","modifiers":[],"name":"","quantity":"","total_amount":0,"total_discount":0,"total_tax":0,"unit_price":""}],"location_id":"","merchant_id":"","note":"","order_date":"","order_number":"","order_type_id":"","payment_status":"","payments":[{"amount":0,"currency":"","id":""}],"reference_id":"","refunded":false,"refunds":[{"amount":0,"currency":"","id":"","location_id":"","reason":"","status":"","tender_id":"","transaction_id":""}],"seat":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","status":"","table":"","taxes":[],"tenders":[{"amount":"","buyer_tendered_cash_amount":0,"card":{"billing_address":{},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""},"card_entry_method":"","card_status":"","change_back_cash_amount":0,"currency":"","id":"","location_id":"","name":"","note":"","payment_id":"","percentage":"","total_amount":0,"total_discount":0,"total_processing_fee":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"transaction_id":"","type":""}],"title":"","total_amount":0,"total_discount":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"updated_at":"","updated_by":"","version":"","voided":false,"voided_at":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/orders/:id/pay',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "closed_date": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "customers": [\n    {\n      "emails": [\n        {\n          "email": "",\n          "id": "",\n          "type": ""\n        }\n      ],\n      "first_name": "",\n      "id": "",\n      "last_name": "",\n      "middle_name": "",\n      "phone_numbers": [\n        {\n          "area_code": "",\n          "country_code": "",\n          "extension": "",\n          "id": "",\n          "number": "",\n          "type": ""\n        }\n      ]\n    }\n  ],\n  "discounts": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "name": "",\n      "product_id": "",\n      "scope": "",\n      "type": ""\n    }\n  ],\n  "employee_id": "",\n  "fulfillments": [\n    {\n      "id": "",\n      "pickup_details": {\n        "accepted_at": "",\n        "auto_complete_duration": "",\n        "cancel_reason": "",\n        "canceled_at": "",\n        "curbside_pickup_details": {\n          "buyer_arrived_at": "",\n          "curbside_details": ""\n        },\n        "expired_at": "",\n        "expires_at": "",\n        "is_curbside_pickup": false,\n        "note": "",\n        "picked_up_at": "",\n        "pickup_at": "",\n        "pickup_window_duration": "",\n        "placed_at": "",\n        "prep_time_duration": "",\n        "ready_at": "",\n        "recipient": {\n          "address": {\n            "city": "",\n            "contact_name": "",\n            "country": "",\n            "county": "",\n            "email": "",\n            "fax": "",\n            "id": "",\n            "latitude": "",\n            "line1": "",\n            "line2": "",\n            "line3": "",\n            "line4": "",\n            "longitude": "",\n            "name": "",\n            "phone_number": "",\n            "postal_code": "",\n            "row_version": "",\n            "salutation": "",\n            "state": "",\n            "street_number": "",\n            "string": "",\n            "type": "",\n            "website": ""\n          },\n          "customer_id": "",\n          "display_name": "",\n          "email": {},\n          "phone_number": {}\n        },\n        "rejected_at": "",\n        "schedule_type": ""\n      },\n      "shipment_details": {},\n      "status": "",\n      "type": ""\n    }\n  ],\n  "id": "",\n  "idempotency_key": "",\n  "line_items": [\n    {\n      "applied_discounts": [],\n      "applied_taxes": [],\n      "id": "",\n      "item": "",\n      "modifiers": [],\n      "name": "",\n      "quantity": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_tax": 0,\n      "unit_price": ""\n    }\n  ],\n  "location_id": "",\n  "merchant_id": "",\n  "note": "",\n  "order_date": "",\n  "order_number": "",\n  "order_type_id": "",\n  "payment_status": "",\n  "payments": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": ""\n    }\n  ],\n  "reference_id": "",\n  "refunded": false,\n  "refunds": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "reason": "",\n      "status": "",\n      "tender_id": "",\n      "transaction_id": ""\n    }\n  ],\n  "seat": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "status": "",\n  "table": "",\n  "taxes": [],\n  "tenders": [\n    {\n      "amount": "",\n      "buyer_tendered_cash_amount": 0,\n      "card": {\n        "billing_address": {},\n        "bin": "",\n        "card_brand": "",\n        "card_type": "",\n        "cardholder_name": "",\n        "customer_id": "",\n        "enabled": false,\n        "exp_month": 0,\n        "exp_year": 0,\n        "fingerprint": "",\n        "id": "",\n        "last_4": "",\n        "merchant_id": "",\n        "prepaid_type": "",\n        "reference_id": "",\n        "version": ""\n      },\n      "card_entry_method": "",\n      "card_status": "",\n      "change_back_cash_amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "name": "",\n      "note": "",\n      "payment_id": "",\n      "percentage": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_processing_fee": 0,\n      "total_refund": 0,\n      "total_service_charge": 0,\n      "total_tax": 0,\n      "total_tip": 0,\n      "transaction_id": "",\n      "type": ""\n    }\n  ],\n  "title": "",\n  "total_amount": 0,\n  "total_discount": 0,\n  "total_refund": 0,\n  "total_service_charge": 0,\n  "total_tax": 0,\n  "total_tip": 0,\n  "updated_at": "",\n  "updated_by": "",\n  "version": "",\n  "voided": false,\n  "voided_at": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/orders/:id/pay")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/orders/:id/pay',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  closed_date: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  customers: [
    {
      emails: [{email: '', id: '', type: ''}],
      first_name: '',
      id: '',
      last_name: '',
      middle_name: '',
      phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
    }
  ],
  discounts: [
    {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
  ],
  employee_id: '',
  fulfillments: [
    {
      id: '',
      pickup_details: {
        accepted_at: '',
        auto_complete_duration: '',
        cancel_reason: '',
        canceled_at: '',
        curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
        expired_at: '',
        expires_at: '',
        is_curbside_pickup: false,
        note: '',
        picked_up_at: '',
        pickup_at: '',
        pickup_window_duration: '',
        placed_at: '',
        prep_time_duration: '',
        ready_at: '',
        recipient: {
          address: {
            city: '',
            contact_name: '',
            country: '',
            county: '',
            email: '',
            fax: '',
            id: '',
            latitude: '',
            line1: '',
            line2: '',
            line3: '',
            line4: '',
            longitude: '',
            name: '',
            phone_number: '',
            postal_code: '',
            row_version: '',
            salutation: '',
            state: '',
            street_number: '',
            string: '',
            type: '',
            website: ''
          },
          customer_id: '',
          display_name: '',
          email: {},
          phone_number: {}
        },
        rejected_at: '',
        schedule_type: ''
      },
      shipment_details: {},
      status: '',
      type: ''
    }
  ],
  id: '',
  idempotency_key: '',
  line_items: [
    {
      applied_discounts: [],
      applied_taxes: [],
      id: '',
      item: '',
      modifiers: [],
      name: '',
      quantity: '',
      total_amount: 0,
      total_discount: 0,
      total_tax: 0,
      unit_price: ''
    }
  ],
  location_id: '',
  merchant_id: '',
  note: '',
  order_date: '',
  order_number: '',
  order_type_id: '',
  payment_status: '',
  payments: [{amount: 0, currency: '', id: ''}],
  reference_id: '',
  refunded: false,
  refunds: [
    {
      amount: 0,
      currency: '',
      id: '',
      location_id: '',
      reason: '',
      status: '',
      tender_id: '',
      transaction_id: ''
    }
  ],
  seat: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  status: '',
  table: '',
  taxes: [],
  tenders: [
    {
      amount: '',
      buyer_tendered_cash_amount: 0,
      card: {
        billing_address: {},
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      },
      card_entry_method: '',
      card_status: '',
      change_back_cash_amount: 0,
      currency: '',
      id: '',
      location_id: '',
      name: '',
      note: '',
      payment_id: '',
      percentage: '',
      total_amount: 0,
      total_discount: 0,
      total_processing_fee: 0,
      total_refund: 0,
      total_service_charge: 0,
      total_tax: 0,
      total_tip: 0,
      transaction_id: '',
      type: ''
    }
  ],
  title: '',
  total_amount: 0,
  total_discount: 0,
  total_refund: 0,
  total_service_charge: 0,
  total_tax: 0,
  total_tip: 0,
  updated_at: '',
  updated_by: '',
  version: '',
  voided: false,
  voided_at: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/orders/:id/pay',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    closed_date: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    customers: [
      {
        emails: [{email: '', id: '', type: ''}],
        first_name: '',
        id: '',
        last_name: '',
        middle_name: '',
        phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
      }
    ],
    discounts: [
      {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
    ],
    employee_id: '',
    fulfillments: [
      {
        id: '',
        pickup_details: {
          accepted_at: '',
          auto_complete_duration: '',
          cancel_reason: '',
          canceled_at: '',
          curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
          expired_at: '',
          expires_at: '',
          is_curbside_pickup: false,
          note: '',
          picked_up_at: '',
          pickup_at: '',
          pickup_window_duration: '',
          placed_at: '',
          prep_time_duration: '',
          ready_at: '',
          recipient: {
            address: {
              city: '',
              contact_name: '',
              country: '',
              county: '',
              email: '',
              fax: '',
              id: '',
              latitude: '',
              line1: '',
              line2: '',
              line3: '',
              line4: '',
              longitude: '',
              name: '',
              phone_number: '',
              postal_code: '',
              row_version: '',
              salutation: '',
              state: '',
              street_number: '',
              string: '',
              type: '',
              website: ''
            },
            customer_id: '',
            display_name: '',
            email: {},
            phone_number: {}
          },
          rejected_at: '',
          schedule_type: ''
        },
        shipment_details: {},
        status: '',
        type: ''
      }
    ],
    id: '',
    idempotency_key: '',
    line_items: [
      {
        applied_discounts: [],
        applied_taxes: [],
        id: '',
        item: '',
        modifiers: [],
        name: '',
        quantity: '',
        total_amount: 0,
        total_discount: 0,
        total_tax: 0,
        unit_price: ''
      }
    ],
    location_id: '',
    merchant_id: '',
    note: '',
    order_date: '',
    order_number: '',
    order_type_id: '',
    payment_status: '',
    payments: [{amount: 0, currency: '', id: ''}],
    reference_id: '',
    refunded: false,
    refunds: [
      {
        amount: 0,
        currency: '',
        id: '',
        location_id: '',
        reason: '',
        status: '',
        tender_id: '',
        transaction_id: ''
      }
    ],
    seat: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    status: '',
    table: '',
    taxes: [],
    tenders: [
      {
        amount: '',
        buyer_tendered_cash_amount: 0,
        card: {
          billing_address: {},
          bin: '',
          card_brand: '',
          card_type: '',
          cardholder_name: '',
          customer_id: '',
          enabled: false,
          exp_month: 0,
          exp_year: 0,
          fingerprint: '',
          id: '',
          last_4: '',
          merchant_id: '',
          prepaid_type: '',
          reference_id: '',
          version: ''
        },
        card_entry_method: '',
        card_status: '',
        change_back_cash_amount: 0,
        currency: '',
        id: '',
        location_id: '',
        name: '',
        note: '',
        payment_id: '',
        percentage: '',
        total_amount: 0,
        total_discount: 0,
        total_processing_fee: 0,
        total_refund: 0,
        total_service_charge: 0,
        total_tax: 0,
        total_tip: 0,
        transaction_id: '',
        type: ''
      }
    ],
    title: '',
    total_amount: 0,
    total_discount: 0,
    total_refund: 0,
    total_service_charge: 0,
    total_tax: 0,
    total_tip: 0,
    updated_at: '',
    updated_by: '',
    version: '',
    voided: false,
    voided_at: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/orders/:id/pay');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  closed_date: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  customers: [
    {
      emails: [
        {
          email: '',
          id: '',
          type: ''
        }
      ],
      first_name: '',
      id: '',
      last_name: '',
      middle_name: '',
      phone_numbers: [
        {
          area_code: '',
          country_code: '',
          extension: '',
          id: '',
          number: '',
          type: ''
        }
      ]
    }
  ],
  discounts: [
    {
      amount: 0,
      currency: '',
      id: '',
      name: '',
      product_id: '',
      scope: '',
      type: ''
    }
  ],
  employee_id: '',
  fulfillments: [
    {
      id: '',
      pickup_details: {
        accepted_at: '',
        auto_complete_duration: '',
        cancel_reason: '',
        canceled_at: '',
        curbside_pickup_details: {
          buyer_arrived_at: '',
          curbside_details: ''
        },
        expired_at: '',
        expires_at: '',
        is_curbside_pickup: false,
        note: '',
        picked_up_at: '',
        pickup_at: '',
        pickup_window_duration: '',
        placed_at: '',
        prep_time_duration: '',
        ready_at: '',
        recipient: {
          address: {
            city: '',
            contact_name: '',
            country: '',
            county: '',
            email: '',
            fax: '',
            id: '',
            latitude: '',
            line1: '',
            line2: '',
            line3: '',
            line4: '',
            longitude: '',
            name: '',
            phone_number: '',
            postal_code: '',
            row_version: '',
            salutation: '',
            state: '',
            street_number: '',
            string: '',
            type: '',
            website: ''
          },
          customer_id: '',
          display_name: '',
          email: {},
          phone_number: {}
        },
        rejected_at: '',
        schedule_type: ''
      },
      shipment_details: {},
      status: '',
      type: ''
    }
  ],
  id: '',
  idempotency_key: '',
  line_items: [
    {
      applied_discounts: [],
      applied_taxes: [],
      id: '',
      item: '',
      modifiers: [],
      name: '',
      quantity: '',
      total_amount: 0,
      total_discount: 0,
      total_tax: 0,
      unit_price: ''
    }
  ],
  location_id: '',
  merchant_id: '',
  note: '',
  order_date: '',
  order_number: '',
  order_type_id: '',
  payment_status: '',
  payments: [
    {
      amount: 0,
      currency: '',
      id: ''
    }
  ],
  reference_id: '',
  refunded: false,
  refunds: [
    {
      amount: 0,
      currency: '',
      id: '',
      location_id: '',
      reason: '',
      status: '',
      tender_id: '',
      transaction_id: ''
    }
  ],
  seat: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  status: '',
  table: '',
  taxes: [],
  tenders: [
    {
      amount: '',
      buyer_tendered_cash_amount: 0,
      card: {
        billing_address: {},
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      },
      card_entry_method: '',
      card_status: '',
      change_back_cash_amount: 0,
      currency: '',
      id: '',
      location_id: '',
      name: '',
      note: '',
      payment_id: '',
      percentage: '',
      total_amount: 0,
      total_discount: 0,
      total_processing_fee: 0,
      total_refund: 0,
      total_service_charge: 0,
      total_tax: 0,
      total_tip: 0,
      transaction_id: '',
      type: ''
    }
  ],
  title: '',
  total_amount: 0,
  total_discount: 0,
  total_refund: 0,
  total_service_charge: 0,
  total_tax: 0,
  total_tip: 0,
  updated_at: '',
  updated_by: '',
  version: '',
  voided: false,
  voided_at: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/orders/:id/pay',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    closed_date: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    customers: [
      {
        emails: [{email: '', id: '', type: ''}],
        first_name: '',
        id: '',
        last_name: '',
        middle_name: '',
        phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
      }
    ],
    discounts: [
      {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
    ],
    employee_id: '',
    fulfillments: [
      {
        id: '',
        pickup_details: {
          accepted_at: '',
          auto_complete_duration: '',
          cancel_reason: '',
          canceled_at: '',
          curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
          expired_at: '',
          expires_at: '',
          is_curbside_pickup: false,
          note: '',
          picked_up_at: '',
          pickup_at: '',
          pickup_window_duration: '',
          placed_at: '',
          prep_time_duration: '',
          ready_at: '',
          recipient: {
            address: {
              city: '',
              contact_name: '',
              country: '',
              county: '',
              email: '',
              fax: '',
              id: '',
              latitude: '',
              line1: '',
              line2: '',
              line3: '',
              line4: '',
              longitude: '',
              name: '',
              phone_number: '',
              postal_code: '',
              row_version: '',
              salutation: '',
              state: '',
              street_number: '',
              string: '',
              type: '',
              website: ''
            },
            customer_id: '',
            display_name: '',
            email: {},
            phone_number: {}
          },
          rejected_at: '',
          schedule_type: ''
        },
        shipment_details: {},
        status: '',
        type: ''
      }
    ],
    id: '',
    idempotency_key: '',
    line_items: [
      {
        applied_discounts: [],
        applied_taxes: [],
        id: '',
        item: '',
        modifiers: [],
        name: '',
        quantity: '',
        total_amount: 0,
        total_discount: 0,
        total_tax: 0,
        unit_price: ''
      }
    ],
    location_id: '',
    merchant_id: '',
    note: '',
    order_date: '',
    order_number: '',
    order_type_id: '',
    payment_status: '',
    payments: [{amount: 0, currency: '', id: ''}],
    reference_id: '',
    refunded: false,
    refunds: [
      {
        amount: 0,
        currency: '',
        id: '',
        location_id: '',
        reason: '',
        status: '',
        tender_id: '',
        transaction_id: ''
      }
    ],
    seat: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    status: '',
    table: '',
    taxes: [],
    tenders: [
      {
        amount: '',
        buyer_tendered_cash_amount: 0,
        card: {
          billing_address: {},
          bin: '',
          card_brand: '',
          card_type: '',
          cardholder_name: '',
          customer_id: '',
          enabled: false,
          exp_month: 0,
          exp_year: 0,
          fingerprint: '',
          id: '',
          last_4: '',
          merchant_id: '',
          prepaid_type: '',
          reference_id: '',
          version: ''
        },
        card_entry_method: '',
        card_status: '',
        change_back_cash_amount: 0,
        currency: '',
        id: '',
        location_id: '',
        name: '',
        note: '',
        payment_id: '',
        percentage: '',
        total_amount: 0,
        total_discount: 0,
        total_processing_fee: 0,
        total_refund: 0,
        total_service_charge: 0,
        total_tax: 0,
        total_tip: 0,
        transaction_id: '',
        type: ''
      }
    ],
    title: '',
    total_amount: 0,
    total_discount: 0,
    total_refund: 0,
    total_service_charge: 0,
    total_tax: 0,
    total_tip: 0,
    updated_at: '',
    updated_by: '',
    version: '',
    voided: false,
    voided_at: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/orders/:id/pay';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"closed_date":"","created_at":"","created_by":"","currency":"","customer_id":"","customers":[{"emails":[{"email":"","id":"","type":""}],"first_name":"","id":"","last_name":"","middle_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}]}],"discounts":[{"amount":0,"currency":"","id":"","name":"","product_id":"","scope":"","type":""}],"employee_id":"","fulfillments":[{"id":"","pickup_details":{"accepted_at":"","auto_complete_duration":"","cancel_reason":"","canceled_at":"","curbside_pickup_details":{"buyer_arrived_at":"","curbside_details":""},"expired_at":"","expires_at":"","is_curbside_pickup":false,"note":"","picked_up_at":"","pickup_at":"","pickup_window_duration":"","placed_at":"","prep_time_duration":"","ready_at":"","recipient":{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"customer_id":"","display_name":"","email":{},"phone_number":{}},"rejected_at":"","schedule_type":""},"shipment_details":{},"status":"","type":""}],"id":"","idempotency_key":"","line_items":[{"applied_discounts":[],"applied_taxes":[],"id":"","item":"","modifiers":[],"name":"","quantity":"","total_amount":0,"total_discount":0,"total_tax":0,"unit_price":""}],"location_id":"","merchant_id":"","note":"","order_date":"","order_number":"","order_type_id":"","payment_status":"","payments":[{"amount":0,"currency":"","id":""}],"reference_id":"","refunded":false,"refunds":[{"amount":0,"currency":"","id":"","location_id":"","reason":"","status":"","tender_id":"","transaction_id":""}],"seat":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","status":"","table":"","taxes":[],"tenders":[{"amount":"","buyer_tendered_cash_amount":0,"card":{"billing_address":{},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""},"card_entry_method":"","card_status":"","change_back_cash_amount":0,"currency":"","id":"","location_id":"","name":"","note":"","payment_id":"","percentage":"","total_amount":0,"total_discount":0,"total_processing_fee":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"transaction_id":"","type":""}],"title":"","total_amount":0,"total_discount":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"updated_at":"","updated_by":"","version":"","voided":false,"voided_at":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"closed_date": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"customer_id": @"",
                              @"customers": @[ @{ @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ], @"first_name": @"", @"id": @"", @"last_name": @"", @"middle_name": @"", @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ] } ],
                              @"discounts": @[ @{ @"amount": @0, @"currency": @"", @"id": @"", @"name": @"", @"product_id": @"", @"scope": @"", @"type": @"" } ],
                              @"employee_id": @"",
                              @"fulfillments": @[ @{ @"id": @"", @"pickup_details": @{ @"accepted_at": @"", @"auto_complete_duration": @"", @"cancel_reason": @"", @"canceled_at": @"", @"curbside_pickup_details": @{ @"buyer_arrived_at": @"", @"curbside_details": @"" }, @"expired_at": @"", @"expires_at": @"", @"is_curbside_pickup": @NO, @"note": @"", @"picked_up_at": @"", @"pickup_at": @"", @"pickup_window_duration": @"", @"placed_at": @"", @"prep_time_duration": @"", @"ready_at": @"", @"recipient": @{ @"address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" }, @"customer_id": @"", @"display_name": @"", @"email": @{  }, @"phone_number": @{  } }, @"rejected_at": @"", @"schedule_type": @"" }, @"shipment_details": @{  }, @"status": @"", @"type": @"" } ],
                              @"id": @"",
                              @"idempotency_key": @"",
                              @"line_items": @[ @{ @"applied_discounts": @[  ], @"applied_taxes": @[  ], @"id": @"", @"item": @"", @"modifiers": @[  ], @"name": @"", @"quantity": @"", @"total_amount": @0, @"total_discount": @0, @"total_tax": @0, @"unit_price": @"" } ],
                              @"location_id": @"",
                              @"merchant_id": @"",
                              @"note": @"",
                              @"order_date": @"",
                              @"order_number": @"",
                              @"order_type_id": @"",
                              @"payment_status": @"",
                              @"payments": @[ @{ @"amount": @0, @"currency": @"", @"id": @"" } ],
                              @"reference_id": @"",
                              @"refunded": @NO,
                              @"refunds": @[ @{ @"amount": @0, @"currency": @"", @"id": @"", @"location_id": @"", @"reason": @"", @"status": @"", @"tender_id": @"", @"transaction_id": @"" } ],
                              @"seat": @"",
                              @"service_charges": @[ @{ @"active": @NO, @"amount": @"", @"currency": @"", @"id": @"", @"name": @"", @"percentage": @"", @"type": @"" } ],
                              @"source": @"",
                              @"status": @"",
                              @"table": @"",
                              @"taxes": @[  ],
                              @"tenders": @[ @{ @"amount": @"", @"buyer_tendered_cash_amount": @0, @"card": @{ @"billing_address": @{  }, @"bin": @"", @"card_brand": @"", @"card_type": @"", @"cardholder_name": @"", @"customer_id": @"", @"enabled": @NO, @"exp_month": @0, @"exp_year": @0, @"fingerprint": @"", @"id": @"", @"last_4": @"", @"merchant_id": @"", @"prepaid_type": @"", @"reference_id": @"", @"version": @"" }, @"card_entry_method": @"", @"card_status": @"", @"change_back_cash_amount": @0, @"currency": @"", @"id": @"", @"location_id": @"", @"name": @"", @"note": @"", @"payment_id": @"", @"percentage": @"", @"total_amount": @0, @"total_discount": @0, @"total_processing_fee": @0, @"total_refund": @0, @"total_service_charge": @0, @"total_tax": @0, @"total_tip": @0, @"transaction_id": @"", @"type": @"" } ],
                              @"title": @"",
                              @"total_amount": @0,
                              @"total_discount": @0,
                              @"total_refund": @0,
                              @"total_service_charge": @0,
                              @"total_tax": @0,
                              @"total_tip": @0,
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"version": @"",
                              @"voided": @NO,
                              @"voided_at": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/orders/:id/pay"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/orders/:id/pay" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/orders/:id/pay",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'closed_date' => '',
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'customer_id' => '',
    'customers' => [
        [
                'emails' => [
                                [
                                                                'email' => '',
                                                                'id' => '',
                                                                'type' => ''
                                ]
                ],
                'first_name' => '',
                'id' => '',
                'last_name' => '',
                'middle_name' => '',
                'phone_numbers' => [
                                [
                                                                'area_code' => '',
                                                                'country_code' => '',
                                                                'extension' => '',
                                                                'id' => '',
                                                                'number' => '',
                                                                'type' => ''
                                ]
                ]
        ]
    ],
    'discounts' => [
        [
                'amount' => 0,
                'currency' => '',
                'id' => '',
                'name' => '',
                'product_id' => '',
                'scope' => '',
                'type' => ''
        ]
    ],
    'employee_id' => '',
    'fulfillments' => [
        [
                'id' => '',
                'pickup_details' => [
                                'accepted_at' => '',
                                'auto_complete_duration' => '',
                                'cancel_reason' => '',
                                'canceled_at' => '',
                                'curbside_pickup_details' => [
                                                                'buyer_arrived_at' => '',
                                                                'curbside_details' => ''
                                ],
                                'expired_at' => '',
                                'expires_at' => '',
                                'is_curbside_pickup' => null,
                                'note' => '',
                                'picked_up_at' => '',
                                'pickup_at' => '',
                                'pickup_window_duration' => '',
                                'placed_at' => '',
                                'prep_time_duration' => '',
                                'ready_at' => '',
                                'recipient' => [
                                                                'address' => [
                                                                                                                                'city' => '',
                                                                                                                                'contact_name' => '',
                                                                                                                                'country' => '',
                                                                                                                                'county' => '',
                                                                                                                                'email' => '',
                                                                                                                                'fax' => '',
                                                                                                                                'id' => '',
                                                                                                                                'latitude' => '',
                                                                                                                                'line1' => '',
                                                                                                                                'line2' => '',
                                                                                                                                'line3' => '',
                                                                                                                                'line4' => '',
                                                                                                                                'longitude' => '',
                                                                                                                                'name' => '',
                                                                                                                                'phone_number' => '',
                                                                                                                                'postal_code' => '',
                                                                                                                                'row_version' => '',
                                                                                                                                'salutation' => '',
                                                                                                                                'state' => '',
                                                                                                                                'street_number' => '',
                                                                                                                                'string' => '',
                                                                                                                                'type' => '',
                                                                                                                                'website' => ''
                                                                ],
                                                                'customer_id' => '',
                                                                'display_name' => '',
                                                                'email' => [
                                                                                                                                
                                                                ],
                                                                'phone_number' => [
                                                                                                                                
                                                                ]
                                ],
                                'rejected_at' => '',
                                'schedule_type' => ''
                ],
                'shipment_details' => [
                                
                ],
                'status' => '',
                'type' => ''
        ]
    ],
    'id' => '',
    'idempotency_key' => '',
    'line_items' => [
        [
                'applied_discounts' => [
                                
                ],
                'applied_taxes' => [
                                
                ],
                'id' => '',
                'item' => '',
                'modifiers' => [
                                
                ],
                'name' => '',
                'quantity' => '',
                'total_amount' => 0,
                'total_discount' => 0,
                'total_tax' => 0,
                'unit_price' => ''
        ]
    ],
    'location_id' => '',
    'merchant_id' => '',
    'note' => '',
    'order_date' => '',
    'order_number' => '',
    'order_type_id' => '',
    'payment_status' => '',
    'payments' => [
        [
                'amount' => 0,
                'currency' => '',
                'id' => ''
        ]
    ],
    'reference_id' => '',
    'refunded' => null,
    'refunds' => [
        [
                'amount' => 0,
                'currency' => '',
                'id' => '',
                'location_id' => '',
                'reason' => '',
                'status' => '',
                'tender_id' => '',
                'transaction_id' => ''
        ]
    ],
    'seat' => '',
    'service_charges' => [
        [
                'active' => null,
                'amount' => '',
                'currency' => '',
                'id' => '',
                'name' => '',
                'percentage' => '',
                'type' => ''
        ]
    ],
    'source' => '',
    'status' => '',
    'table' => '',
    'taxes' => [
        
    ],
    'tenders' => [
        [
                'amount' => '',
                'buyer_tendered_cash_amount' => 0,
                'card' => [
                                'billing_address' => [
                                                                
                                ],
                                'bin' => '',
                                'card_brand' => '',
                                'card_type' => '',
                                'cardholder_name' => '',
                                'customer_id' => '',
                                'enabled' => null,
                                'exp_month' => 0,
                                'exp_year' => 0,
                                'fingerprint' => '',
                                'id' => '',
                                'last_4' => '',
                                'merchant_id' => '',
                                'prepaid_type' => '',
                                'reference_id' => '',
                                'version' => ''
                ],
                'card_entry_method' => '',
                'card_status' => '',
                'change_back_cash_amount' => 0,
                'currency' => '',
                'id' => '',
                'location_id' => '',
                'name' => '',
                'note' => '',
                'payment_id' => '',
                'percentage' => '',
                'total_amount' => 0,
                'total_discount' => 0,
                'total_processing_fee' => 0,
                'total_refund' => 0,
                'total_service_charge' => 0,
                'total_tax' => 0,
                'total_tip' => 0,
                'transaction_id' => '',
                'type' => ''
        ]
    ],
    'title' => '',
    'total_amount' => 0,
    'total_discount' => 0,
    'total_refund' => 0,
    'total_service_charge' => 0,
    'total_tax' => 0,
    'total_tip' => 0,
    'updated_at' => '',
    'updated_by' => '',
    'version' => '',
    'voided' => null,
    'voided_at' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/orders/:id/pay', [
  'body' => '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/orders/:id/pay');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'closed_date' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'customers' => [
    [
        'emails' => [
                [
                                'email' => '',
                                'id' => '',
                                'type' => ''
                ]
        ],
        'first_name' => '',
        'id' => '',
        'last_name' => '',
        'middle_name' => '',
        'phone_numbers' => [
                [
                                'area_code' => '',
                                'country_code' => '',
                                'extension' => '',
                                'id' => '',
                                'number' => '',
                                'type' => ''
                ]
        ]
    ]
  ],
  'discounts' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'name' => '',
        'product_id' => '',
        'scope' => '',
        'type' => ''
    ]
  ],
  'employee_id' => '',
  'fulfillments' => [
    [
        'id' => '',
        'pickup_details' => [
                'accepted_at' => '',
                'auto_complete_duration' => '',
                'cancel_reason' => '',
                'canceled_at' => '',
                'curbside_pickup_details' => [
                                'buyer_arrived_at' => '',
                                'curbside_details' => ''
                ],
                'expired_at' => '',
                'expires_at' => '',
                'is_curbside_pickup' => null,
                'note' => '',
                'picked_up_at' => '',
                'pickup_at' => '',
                'pickup_window_duration' => '',
                'placed_at' => '',
                'prep_time_duration' => '',
                'ready_at' => '',
                'recipient' => [
                                'address' => [
                                                                'city' => '',
                                                                'contact_name' => '',
                                                                'country' => '',
                                                                'county' => '',
                                                                'email' => '',
                                                                'fax' => '',
                                                                'id' => '',
                                                                'latitude' => '',
                                                                'line1' => '',
                                                                'line2' => '',
                                                                'line3' => '',
                                                                'line4' => '',
                                                                'longitude' => '',
                                                                'name' => '',
                                                                'phone_number' => '',
                                                                'postal_code' => '',
                                                                'row_version' => '',
                                                                'salutation' => '',
                                                                'state' => '',
                                                                'street_number' => '',
                                                                'string' => '',
                                                                'type' => '',
                                                                'website' => ''
                                ],
                                'customer_id' => '',
                                'display_name' => '',
                                'email' => [
                                                                
                                ],
                                'phone_number' => [
                                                                
                                ]
                ],
                'rejected_at' => '',
                'schedule_type' => ''
        ],
        'shipment_details' => [
                
        ],
        'status' => '',
        'type' => ''
    ]
  ],
  'id' => '',
  'idempotency_key' => '',
  'line_items' => [
    [
        'applied_discounts' => [
                
        ],
        'applied_taxes' => [
                
        ],
        'id' => '',
        'item' => '',
        'modifiers' => [
                
        ],
        'name' => '',
        'quantity' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_tax' => 0,
        'unit_price' => ''
    ]
  ],
  'location_id' => '',
  'merchant_id' => '',
  'note' => '',
  'order_date' => '',
  'order_number' => '',
  'order_type_id' => '',
  'payment_status' => '',
  'payments' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => ''
    ]
  ],
  'reference_id' => '',
  'refunded' => null,
  'refunds' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'reason' => '',
        'status' => '',
        'tender_id' => '',
        'transaction_id' => ''
    ]
  ],
  'seat' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'status' => '',
  'table' => '',
  'taxes' => [
    
  ],
  'tenders' => [
    [
        'amount' => '',
        'buyer_tendered_cash_amount' => 0,
        'card' => [
                'billing_address' => [
                                
                ],
                'bin' => '',
                'card_brand' => '',
                'card_type' => '',
                'cardholder_name' => '',
                'customer_id' => '',
                'enabled' => null,
                'exp_month' => 0,
                'exp_year' => 0,
                'fingerprint' => '',
                'id' => '',
                'last_4' => '',
                'merchant_id' => '',
                'prepaid_type' => '',
                'reference_id' => '',
                'version' => ''
        ],
        'card_entry_method' => '',
        'card_status' => '',
        'change_back_cash_amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'name' => '',
        'note' => '',
        'payment_id' => '',
        'percentage' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_processing_fee' => 0,
        'total_refund' => 0,
        'total_service_charge' => 0,
        'total_tax' => 0,
        'total_tip' => 0,
        'transaction_id' => '',
        'type' => ''
    ]
  ],
  'title' => '',
  'total_amount' => 0,
  'total_discount' => 0,
  'total_refund' => 0,
  'total_service_charge' => 0,
  'total_tax' => 0,
  'total_tip' => 0,
  'updated_at' => '',
  'updated_by' => '',
  'version' => '',
  'voided' => null,
  'voided_at' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'closed_date' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'customers' => [
    [
        'emails' => [
                [
                                'email' => '',
                                'id' => '',
                                'type' => ''
                ]
        ],
        'first_name' => '',
        'id' => '',
        'last_name' => '',
        'middle_name' => '',
        'phone_numbers' => [
                [
                                'area_code' => '',
                                'country_code' => '',
                                'extension' => '',
                                'id' => '',
                                'number' => '',
                                'type' => ''
                ]
        ]
    ]
  ],
  'discounts' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'name' => '',
        'product_id' => '',
        'scope' => '',
        'type' => ''
    ]
  ],
  'employee_id' => '',
  'fulfillments' => [
    [
        'id' => '',
        'pickup_details' => [
                'accepted_at' => '',
                'auto_complete_duration' => '',
                'cancel_reason' => '',
                'canceled_at' => '',
                'curbside_pickup_details' => [
                                'buyer_arrived_at' => '',
                                'curbside_details' => ''
                ],
                'expired_at' => '',
                'expires_at' => '',
                'is_curbside_pickup' => null,
                'note' => '',
                'picked_up_at' => '',
                'pickup_at' => '',
                'pickup_window_duration' => '',
                'placed_at' => '',
                'prep_time_duration' => '',
                'ready_at' => '',
                'recipient' => [
                                'address' => [
                                                                'city' => '',
                                                                'contact_name' => '',
                                                                'country' => '',
                                                                'county' => '',
                                                                'email' => '',
                                                                'fax' => '',
                                                                'id' => '',
                                                                'latitude' => '',
                                                                'line1' => '',
                                                                'line2' => '',
                                                                'line3' => '',
                                                                'line4' => '',
                                                                'longitude' => '',
                                                                'name' => '',
                                                                'phone_number' => '',
                                                                'postal_code' => '',
                                                                'row_version' => '',
                                                                'salutation' => '',
                                                                'state' => '',
                                                                'street_number' => '',
                                                                'string' => '',
                                                                'type' => '',
                                                                'website' => ''
                                ],
                                'customer_id' => '',
                                'display_name' => '',
                                'email' => [
                                                                
                                ],
                                'phone_number' => [
                                                                
                                ]
                ],
                'rejected_at' => '',
                'schedule_type' => ''
        ],
        'shipment_details' => [
                
        ],
        'status' => '',
        'type' => ''
    ]
  ],
  'id' => '',
  'idempotency_key' => '',
  'line_items' => [
    [
        'applied_discounts' => [
                
        ],
        'applied_taxes' => [
                
        ],
        'id' => '',
        'item' => '',
        'modifiers' => [
                
        ],
        'name' => '',
        'quantity' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_tax' => 0,
        'unit_price' => ''
    ]
  ],
  'location_id' => '',
  'merchant_id' => '',
  'note' => '',
  'order_date' => '',
  'order_number' => '',
  'order_type_id' => '',
  'payment_status' => '',
  'payments' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => ''
    ]
  ],
  'reference_id' => '',
  'refunded' => null,
  'refunds' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'reason' => '',
        'status' => '',
        'tender_id' => '',
        'transaction_id' => ''
    ]
  ],
  'seat' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'status' => '',
  'table' => '',
  'taxes' => [
    
  ],
  'tenders' => [
    [
        'amount' => '',
        'buyer_tendered_cash_amount' => 0,
        'card' => [
                'billing_address' => [
                                
                ],
                'bin' => '',
                'card_brand' => '',
                'card_type' => '',
                'cardholder_name' => '',
                'customer_id' => '',
                'enabled' => null,
                'exp_month' => 0,
                'exp_year' => 0,
                'fingerprint' => '',
                'id' => '',
                'last_4' => '',
                'merchant_id' => '',
                'prepaid_type' => '',
                'reference_id' => '',
                'version' => ''
        ],
        'card_entry_method' => '',
        'card_status' => '',
        'change_back_cash_amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'name' => '',
        'note' => '',
        'payment_id' => '',
        'percentage' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_processing_fee' => 0,
        'total_refund' => 0,
        'total_service_charge' => 0,
        'total_tax' => 0,
        'total_tip' => 0,
        'transaction_id' => '',
        'type' => ''
    ]
  ],
  'title' => '',
  'total_amount' => 0,
  'total_discount' => 0,
  'total_refund' => 0,
  'total_service_charge' => 0,
  'total_tax' => 0,
  'total_tip' => 0,
  'updated_at' => '',
  'updated_by' => '',
  'version' => '',
  'voided' => null,
  'voided_at' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/orders/:id/pay');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/orders/:id/pay' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/orders/:id/pay' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/orders/:id/pay", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/orders/:id/pay"

payload = {
    "closed_date": "",
    "created_at": "",
    "created_by": "",
    "currency": "",
    "customer_id": "",
    "customers": [
        {
            "emails": [
                {
                    "email": "",
                    "id": "",
                    "type": ""
                }
            ],
            "first_name": "",
            "id": "",
            "last_name": "",
            "middle_name": "",
            "phone_numbers": [
                {
                    "area_code": "",
                    "country_code": "",
                    "extension": "",
                    "id": "",
                    "number": "",
                    "type": ""
                }
            ]
        }
    ],
    "discounts": [
        {
            "amount": 0,
            "currency": "",
            "id": "",
            "name": "",
            "product_id": "",
            "scope": "",
            "type": ""
        }
    ],
    "employee_id": "",
    "fulfillments": [
        {
            "id": "",
            "pickup_details": {
                "accepted_at": "",
                "auto_complete_duration": "",
                "cancel_reason": "",
                "canceled_at": "",
                "curbside_pickup_details": {
                    "buyer_arrived_at": "",
                    "curbside_details": ""
                },
                "expired_at": "",
                "expires_at": "",
                "is_curbside_pickup": False,
                "note": "",
                "picked_up_at": "",
                "pickup_at": "",
                "pickup_window_duration": "",
                "placed_at": "",
                "prep_time_duration": "",
                "ready_at": "",
                "recipient": {
                    "address": {
                        "city": "",
                        "contact_name": "",
                        "country": "",
                        "county": "",
                        "email": "",
                        "fax": "",
                        "id": "",
                        "latitude": "",
                        "line1": "",
                        "line2": "",
                        "line3": "",
                        "line4": "",
                        "longitude": "",
                        "name": "",
                        "phone_number": "",
                        "postal_code": "",
                        "row_version": "",
                        "salutation": "",
                        "state": "",
                        "street_number": "",
                        "string": "",
                        "type": "",
                        "website": ""
                    },
                    "customer_id": "",
                    "display_name": "",
                    "email": {},
                    "phone_number": {}
                },
                "rejected_at": "",
                "schedule_type": ""
            },
            "shipment_details": {},
            "status": "",
            "type": ""
        }
    ],
    "id": "",
    "idempotency_key": "",
    "line_items": [
        {
            "applied_discounts": [],
            "applied_taxes": [],
            "id": "",
            "item": "",
            "modifiers": [],
            "name": "",
            "quantity": "",
            "total_amount": 0,
            "total_discount": 0,
            "total_tax": 0,
            "unit_price": ""
        }
    ],
    "location_id": "",
    "merchant_id": "",
    "note": "",
    "order_date": "",
    "order_number": "",
    "order_type_id": "",
    "payment_status": "",
    "payments": [
        {
            "amount": 0,
            "currency": "",
            "id": ""
        }
    ],
    "reference_id": "",
    "refunded": False,
    "refunds": [
        {
            "amount": 0,
            "currency": "",
            "id": "",
            "location_id": "",
            "reason": "",
            "status": "",
            "tender_id": "",
            "transaction_id": ""
        }
    ],
    "seat": "",
    "service_charges": [
        {
            "active": False,
            "amount": "",
            "currency": "",
            "id": "",
            "name": "",
            "percentage": "",
            "type": ""
        }
    ],
    "source": "",
    "status": "",
    "table": "",
    "taxes": [],
    "tenders": [
        {
            "amount": "",
            "buyer_tendered_cash_amount": 0,
            "card": {
                "billing_address": {},
                "bin": "",
                "card_brand": "",
                "card_type": "",
                "cardholder_name": "",
                "customer_id": "",
                "enabled": False,
                "exp_month": 0,
                "exp_year": 0,
                "fingerprint": "",
                "id": "",
                "last_4": "",
                "merchant_id": "",
                "prepaid_type": "",
                "reference_id": "",
                "version": ""
            },
            "card_entry_method": "",
            "card_status": "",
            "change_back_cash_amount": 0,
            "currency": "",
            "id": "",
            "location_id": "",
            "name": "",
            "note": "",
            "payment_id": "",
            "percentage": "",
            "total_amount": 0,
            "total_discount": 0,
            "total_processing_fee": 0,
            "total_refund": 0,
            "total_service_charge": 0,
            "total_tax": 0,
            "total_tip": 0,
            "transaction_id": "",
            "type": ""
        }
    ],
    "title": "",
    "total_amount": 0,
    "total_discount": 0,
    "total_refund": 0,
    "total_service_charge": 0,
    "total_tax": 0,
    "total_tip": 0,
    "updated_at": "",
    "updated_by": "",
    "version": "",
    "voided": False,
    "voided_at": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/orders/:id/pay"

payload <- "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/orders/:id/pay")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/orders/:id/pay') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/orders/:id/pay";

    let payload = json!({
        "closed_date": "",
        "created_at": "",
        "created_by": "",
        "currency": "",
        "customer_id": "",
        "customers": (
            json!({
                "emails": (
                    json!({
                        "email": "",
                        "id": "",
                        "type": ""
                    })
                ),
                "first_name": "",
                "id": "",
                "last_name": "",
                "middle_name": "",
                "phone_numbers": (
                    json!({
                        "area_code": "",
                        "country_code": "",
                        "extension": "",
                        "id": "",
                        "number": "",
                        "type": ""
                    })
                )
            })
        ),
        "discounts": (
            json!({
                "amount": 0,
                "currency": "",
                "id": "",
                "name": "",
                "product_id": "",
                "scope": "",
                "type": ""
            })
        ),
        "employee_id": "",
        "fulfillments": (
            json!({
                "id": "",
                "pickup_details": json!({
                    "accepted_at": "",
                    "auto_complete_duration": "",
                    "cancel_reason": "",
                    "canceled_at": "",
                    "curbside_pickup_details": json!({
                        "buyer_arrived_at": "",
                        "curbside_details": ""
                    }),
                    "expired_at": "",
                    "expires_at": "",
                    "is_curbside_pickup": false,
                    "note": "",
                    "picked_up_at": "",
                    "pickup_at": "",
                    "pickup_window_duration": "",
                    "placed_at": "",
                    "prep_time_duration": "",
                    "ready_at": "",
                    "recipient": json!({
                        "address": json!({
                            "city": "",
                            "contact_name": "",
                            "country": "",
                            "county": "",
                            "email": "",
                            "fax": "",
                            "id": "",
                            "latitude": "",
                            "line1": "",
                            "line2": "",
                            "line3": "",
                            "line4": "",
                            "longitude": "",
                            "name": "",
                            "phone_number": "",
                            "postal_code": "",
                            "row_version": "",
                            "salutation": "",
                            "state": "",
                            "street_number": "",
                            "string": "",
                            "type": "",
                            "website": ""
                        }),
                        "customer_id": "",
                        "display_name": "",
                        "email": json!({}),
                        "phone_number": json!({})
                    }),
                    "rejected_at": "",
                    "schedule_type": ""
                }),
                "shipment_details": json!({}),
                "status": "",
                "type": ""
            })
        ),
        "id": "",
        "idempotency_key": "",
        "line_items": (
            json!({
                "applied_discounts": (),
                "applied_taxes": (),
                "id": "",
                "item": "",
                "modifiers": (),
                "name": "",
                "quantity": "",
                "total_amount": 0,
                "total_discount": 0,
                "total_tax": 0,
                "unit_price": ""
            })
        ),
        "location_id": "",
        "merchant_id": "",
        "note": "",
        "order_date": "",
        "order_number": "",
        "order_type_id": "",
        "payment_status": "",
        "payments": (
            json!({
                "amount": 0,
                "currency": "",
                "id": ""
            })
        ),
        "reference_id": "",
        "refunded": false,
        "refunds": (
            json!({
                "amount": 0,
                "currency": "",
                "id": "",
                "location_id": "",
                "reason": "",
                "status": "",
                "tender_id": "",
                "transaction_id": ""
            })
        ),
        "seat": "",
        "service_charges": (
            json!({
                "active": false,
                "amount": "",
                "currency": "",
                "id": "",
                "name": "",
                "percentage": "",
                "type": ""
            })
        ),
        "source": "",
        "status": "",
        "table": "",
        "taxes": (),
        "tenders": (
            json!({
                "amount": "",
                "buyer_tendered_cash_amount": 0,
                "card": json!({
                    "billing_address": json!({}),
                    "bin": "",
                    "card_brand": "",
                    "card_type": "",
                    "cardholder_name": "",
                    "customer_id": "",
                    "enabled": false,
                    "exp_month": 0,
                    "exp_year": 0,
                    "fingerprint": "",
                    "id": "",
                    "last_4": "",
                    "merchant_id": "",
                    "prepaid_type": "",
                    "reference_id": "",
                    "version": ""
                }),
                "card_entry_method": "",
                "card_status": "",
                "change_back_cash_amount": 0,
                "currency": "",
                "id": "",
                "location_id": "",
                "name": "",
                "note": "",
                "payment_id": "",
                "percentage": "",
                "total_amount": 0,
                "total_discount": 0,
                "total_processing_fee": 0,
                "total_refund": 0,
                "total_service_charge": 0,
                "total_tax": 0,
                "total_tip": 0,
                "transaction_id": "",
                "type": ""
            })
        ),
        "title": "",
        "total_amount": 0,
        "total_discount": 0,
        "total_refund": 0,
        "total_service_charge": 0,
        "total_tax": 0,
        "total_tip": 0,
        "updated_at": "",
        "updated_by": "",
        "version": "",
        "voided": false,
        "voided_at": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/orders/:id/pay \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}'
echo '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}' |  \
  http POST {{baseUrl}}/pos/orders/:id/pay \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "closed_date": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "customers": [\n    {\n      "emails": [\n        {\n          "email": "",\n          "id": "",\n          "type": ""\n        }\n      ],\n      "first_name": "",\n      "id": "",\n      "last_name": "",\n      "middle_name": "",\n      "phone_numbers": [\n        {\n          "area_code": "",\n          "country_code": "",\n          "extension": "",\n          "id": "",\n          "number": "",\n          "type": ""\n        }\n      ]\n    }\n  ],\n  "discounts": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "name": "",\n      "product_id": "",\n      "scope": "",\n      "type": ""\n    }\n  ],\n  "employee_id": "",\n  "fulfillments": [\n    {\n      "id": "",\n      "pickup_details": {\n        "accepted_at": "",\n        "auto_complete_duration": "",\n        "cancel_reason": "",\n        "canceled_at": "",\n        "curbside_pickup_details": {\n          "buyer_arrived_at": "",\n          "curbside_details": ""\n        },\n        "expired_at": "",\n        "expires_at": "",\n        "is_curbside_pickup": false,\n        "note": "",\n        "picked_up_at": "",\n        "pickup_at": "",\n        "pickup_window_duration": "",\n        "placed_at": "",\n        "prep_time_duration": "",\n        "ready_at": "",\n        "recipient": {\n          "address": {\n            "city": "",\n            "contact_name": "",\n            "country": "",\n            "county": "",\n            "email": "",\n            "fax": "",\n            "id": "",\n            "latitude": "",\n            "line1": "",\n            "line2": "",\n            "line3": "",\n            "line4": "",\n            "longitude": "",\n            "name": "",\n            "phone_number": "",\n            "postal_code": "",\n            "row_version": "",\n            "salutation": "",\n            "state": "",\n            "street_number": "",\n            "string": "",\n            "type": "",\n            "website": ""\n          },\n          "customer_id": "",\n          "display_name": "",\n          "email": {},\n          "phone_number": {}\n        },\n        "rejected_at": "",\n        "schedule_type": ""\n      },\n      "shipment_details": {},\n      "status": "",\n      "type": ""\n    }\n  ],\n  "id": "",\n  "idempotency_key": "",\n  "line_items": [\n    {\n      "applied_discounts": [],\n      "applied_taxes": [],\n      "id": "",\n      "item": "",\n      "modifiers": [],\n      "name": "",\n      "quantity": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_tax": 0,\n      "unit_price": ""\n    }\n  ],\n  "location_id": "",\n  "merchant_id": "",\n  "note": "",\n  "order_date": "",\n  "order_number": "",\n  "order_type_id": "",\n  "payment_status": "",\n  "payments": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": ""\n    }\n  ],\n  "reference_id": "",\n  "refunded": false,\n  "refunds": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "reason": "",\n      "status": "",\n      "tender_id": "",\n      "transaction_id": ""\n    }\n  ],\n  "seat": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "status": "",\n  "table": "",\n  "taxes": [],\n  "tenders": [\n    {\n      "amount": "",\n      "buyer_tendered_cash_amount": 0,\n      "card": {\n        "billing_address": {},\n        "bin": "",\n        "card_brand": "",\n        "card_type": "",\n        "cardholder_name": "",\n        "customer_id": "",\n        "enabled": false,\n        "exp_month": 0,\n        "exp_year": 0,\n        "fingerprint": "",\n        "id": "",\n        "last_4": "",\n        "merchant_id": "",\n        "prepaid_type": "",\n        "reference_id": "",\n        "version": ""\n      },\n      "card_entry_method": "",\n      "card_status": "",\n      "change_back_cash_amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "name": "",\n      "note": "",\n      "payment_id": "",\n      "percentage": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_processing_fee": 0,\n      "total_refund": 0,\n      "total_service_charge": 0,\n      "total_tax": 0,\n      "total_tip": 0,\n      "transaction_id": "",\n      "type": ""\n    }\n  ],\n  "title": "",\n  "total_amount": 0,\n  "total_discount": 0,\n  "total_refund": 0,\n  "total_service_charge": 0,\n  "total_tax": 0,\n  "total_tip": 0,\n  "updated_at": "",\n  "updated_by": "",\n  "version": "",\n  "voided": false,\n  "voided_at": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/orders/:id/pay
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    [
      "emails": [
        [
          "email": "",
          "id": "",
          "type": ""
        ]
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        [
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        ]
      ]
    ]
  ],
  "discounts": [
    [
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    ]
  ],
  "employee_id": "",
  "fulfillments": [
    [
      "id": "",
      "pickup_details": [
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": [
          "buyer_arrived_at": "",
          "curbside_details": ""
        ],
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": [
          "address": [
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          ],
          "customer_id": "",
          "display_name": "",
          "email": [],
          "phone_number": []
        ],
        "rejected_at": "",
        "schedule_type": ""
      ],
      "shipment_details": [],
      "status": "",
      "type": ""
    ]
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    [
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    ]
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    [
      "amount": 0,
      "currency": "",
      "id": ""
    ]
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    [
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    ]
  ],
  "seat": "",
  "service_charges": [
    [
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    ]
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    [
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": [
        "billing_address": [],
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      ],
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    ]
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/orders/:id/pay")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "orders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update Order
{{baseUrl}}/pos/orders/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/orders/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/pos/orders/:id" {:headers {:x-apideck-consumer-id ""
                                                                      :x-apideck-app-id ""
                                                                      :authorization "{{apiKey}}"}
                                                            :content-type :json
                                                            :form-params {:closed_date ""
                                                                          :created_at ""
                                                                          :created_by ""
                                                                          :currency ""
                                                                          :customer_id ""
                                                                          :customers [{:emails [{:email ""
                                                                                                 :id ""
                                                                                                 :type ""}]
                                                                                       :first_name ""
                                                                                       :id ""
                                                                                       :last_name ""
                                                                                       :middle_name ""
                                                                                       :phone_numbers [{:area_code ""
                                                                                                        :country_code ""
                                                                                                        :extension ""
                                                                                                        :id ""
                                                                                                        :number ""
                                                                                                        :type ""}]}]
                                                                          :discounts [{:amount 0
                                                                                       :currency ""
                                                                                       :id ""
                                                                                       :name ""
                                                                                       :product_id ""
                                                                                       :scope ""
                                                                                       :type ""}]
                                                                          :employee_id ""
                                                                          :fulfillments [{:id ""
                                                                                          :pickup_details {:accepted_at ""
                                                                                                           :auto_complete_duration ""
                                                                                                           :cancel_reason ""
                                                                                                           :canceled_at ""
                                                                                                           :curbside_pickup_details {:buyer_arrived_at ""
                                                                                                                                     :curbside_details ""}
                                                                                                           :expired_at ""
                                                                                                           :expires_at ""
                                                                                                           :is_curbside_pickup false
                                                                                                           :note ""
                                                                                                           :picked_up_at ""
                                                                                                           :pickup_at ""
                                                                                                           :pickup_window_duration ""
                                                                                                           :placed_at ""
                                                                                                           :prep_time_duration ""
                                                                                                           :ready_at ""
                                                                                                           :recipient {:address {:city ""
                                                                                                                                 :contact_name ""
                                                                                                                                 :country ""
                                                                                                                                 :county ""
                                                                                                                                 :email ""
                                                                                                                                 :fax ""
                                                                                                                                 :id ""
                                                                                                                                 :latitude ""
                                                                                                                                 :line1 ""
                                                                                                                                 :line2 ""
                                                                                                                                 :line3 ""
                                                                                                                                 :line4 ""
                                                                                                                                 :longitude ""
                                                                                                                                 :name ""
                                                                                                                                 :phone_number ""
                                                                                                                                 :postal_code ""
                                                                                                                                 :row_version ""
                                                                                                                                 :salutation ""
                                                                                                                                 :state ""
                                                                                                                                 :street_number ""
                                                                                                                                 :string ""
                                                                                                                                 :type ""
                                                                                                                                 :website ""}
                                                                                                                       :customer_id ""
                                                                                                                       :display_name ""
                                                                                                                       :email {}
                                                                                                                       :phone_number {}}
                                                                                                           :rejected_at ""
                                                                                                           :schedule_type ""}
                                                                                          :shipment_details {}
                                                                                          :status ""
                                                                                          :type ""}]
                                                                          :id ""
                                                                          :idempotency_key ""
                                                                          :line_items [{:applied_discounts []
                                                                                        :applied_taxes []
                                                                                        :id ""
                                                                                        :item ""
                                                                                        :modifiers []
                                                                                        :name ""
                                                                                        :quantity ""
                                                                                        :total_amount 0
                                                                                        :total_discount 0
                                                                                        :total_tax 0
                                                                                        :unit_price ""}]
                                                                          :location_id ""
                                                                          :merchant_id ""
                                                                          :note ""
                                                                          :order_date ""
                                                                          :order_number ""
                                                                          :order_type_id ""
                                                                          :payment_status ""
                                                                          :payments [{:amount 0
                                                                                      :currency ""
                                                                                      :id ""}]
                                                                          :reference_id ""
                                                                          :refunded false
                                                                          :refunds [{:amount 0
                                                                                     :currency ""
                                                                                     :id ""
                                                                                     :location_id ""
                                                                                     :reason ""
                                                                                     :status ""
                                                                                     :tender_id ""
                                                                                     :transaction_id ""}]
                                                                          :seat ""
                                                                          :service_charges [{:active false
                                                                                             :amount ""
                                                                                             :currency ""
                                                                                             :id ""
                                                                                             :name ""
                                                                                             :percentage ""
                                                                                             :type ""}]
                                                                          :source ""
                                                                          :status ""
                                                                          :table ""
                                                                          :taxes []
                                                                          :tenders [{:amount ""
                                                                                     :buyer_tendered_cash_amount 0
                                                                                     :card {:billing_address {}
                                                                                            :bin ""
                                                                                            :card_brand ""
                                                                                            :card_type ""
                                                                                            :cardholder_name ""
                                                                                            :customer_id ""
                                                                                            :enabled false
                                                                                            :exp_month 0
                                                                                            :exp_year 0
                                                                                            :fingerprint ""
                                                                                            :id ""
                                                                                            :last_4 ""
                                                                                            :merchant_id ""
                                                                                            :prepaid_type ""
                                                                                            :reference_id ""
                                                                                            :version ""}
                                                                                     :card_entry_method ""
                                                                                     :card_status ""
                                                                                     :change_back_cash_amount 0
                                                                                     :currency ""
                                                                                     :id ""
                                                                                     :location_id ""
                                                                                     :name ""
                                                                                     :note ""
                                                                                     :payment_id ""
                                                                                     :percentage ""
                                                                                     :total_amount 0
                                                                                     :total_discount 0
                                                                                     :total_processing_fee 0
                                                                                     :total_refund 0
                                                                                     :total_service_charge 0
                                                                                     :total_tax 0
                                                                                     :total_tip 0
                                                                                     :transaction_id ""
                                                                                     :type ""}]
                                                                          :title ""
                                                                          :total_amount 0
                                                                          :total_discount 0
                                                                          :total_refund 0
                                                                          :total_service_charge 0
                                                                          :total_tax 0
                                                                          :total_tip 0
                                                                          :updated_at ""
                                                                          :updated_by ""
                                                                          :version ""
                                                                          :voided false
                                                                          :voided_at ""}})
require "http/client"

url = "{{baseUrl}}/pos/orders/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/pos/orders/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/orders/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/orders/:id"

	payload := strings.NewReader("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/pos/orders/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 4547

{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/pos/orders/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/orders/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/orders/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/pos/orders/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  closed_date: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  customers: [
    {
      emails: [
        {
          email: '',
          id: '',
          type: ''
        }
      ],
      first_name: '',
      id: '',
      last_name: '',
      middle_name: '',
      phone_numbers: [
        {
          area_code: '',
          country_code: '',
          extension: '',
          id: '',
          number: '',
          type: ''
        }
      ]
    }
  ],
  discounts: [
    {
      amount: 0,
      currency: '',
      id: '',
      name: '',
      product_id: '',
      scope: '',
      type: ''
    }
  ],
  employee_id: '',
  fulfillments: [
    {
      id: '',
      pickup_details: {
        accepted_at: '',
        auto_complete_duration: '',
        cancel_reason: '',
        canceled_at: '',
        curbside_pickup_details: {
          buyer_arrived_at: '',
          curbside_details: ''
        },
        expired_at: '',
        expires_at: '',
        is_curbside_pickup: false,
        note: '',
        picked_up_at: '',
        pickup_at: '',
        pickup_window_duration: '',
        placed_at: '',
        prep_time_duration: '',
        ready_at: '',
        recipient: {
          address: {
            city: '',
            contact_name: '',
            country: '',
            county: '',
            email: '',
            fax: '',
            id: '',
            latitude: '',
            line1: '',
            line2: '',
            line3: '',
            line4: '',
            longitude: '',
            name: '',
            phone_number: '',
            postal_code: '',
            row_version: '',
            salutation: '',
            state: '',
            street_number: '',
            string: '',
            type: '',
            website: ''
          },
          customer_id: '',
          display_name: '',
          email: {},
          phone_number: {}
        },
        rejected_at: '',
        schedule_type: ''
      },
      shipment_details: {},
      status: '',
      type: ''
    }
  ],
  id: '',
  idempotency_key: '',
  line_items: [
    {
      applied_discounts: [],
      applied_taxes: [],
      id: '',
      item: '',
      modifiers: [],
      name: '',
      quantity: '',
      total_amount: 0,
      total_discount: 0,
      total_tax: 0,
      unit_price: ''
    }
  ],
  location_id: '',
  merchant_id: '',
  note: '',
  order_date: '',
  order_number: '',
  order_type_id: '',
  payment_status: '',
  payments: [
    {
      amount: 0,
      currency: '',
      id: ''
    }
  ],
  reference_id: '',
  refunded: false,
  refunds: [
    {
      amount: 0,
      currency: '',
      id: '',
      location_id: '',
      reason: '',
      status: '',
      tender_id: '',
      transaction_id: ''
    }
  ],
  seat: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  status: '',
  table: '',
  taxes: [],
  tenders: [
    {
      amount: '',
      buyer_tendered_cash_amount: 0,
      card: {
        billing_address: {},
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      },
      card_entry_method: '',
      card_status: '',
      change_back_cash_amount: 0,
      currency: '',
      id: '',
      location_id: '',
      name: '',
      note: '',
      payment_id: '',
      percentage: '',
      total_amount: 0,
      total_discount: 0,
      total_processing_fee: 0,
      total_refund: 0,
      total_service_charge: 0,
      total_tax: 0,
      total_tip: 0,
      transaction_id: '',
      type: ''
    }
  ],
  title: '',
  total_amount: 0,
  total_discount: 0,
  total_refund: 0,
  total_service_charge: 0,
  total_tax: 0,
  total_tip: 0,
  updated_at: '',
  updated_by: '',
  version: '',
  voided: false,
  voided_at: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/pos/orders/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    closed_date: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    customers: [
      {
        emails: [{email: '', id: '', type: ''}],
        first_name: '',
        id: '',
        last_name: '',
        middle_name: '',
        phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
      }
    ],
    discounts: [
      {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
    ],
    employee_id: '',
    fulfillments: [
      {
        id: '',
        pickup_details: {
          accepted_at: '',
          auto_complete_duration: '',
          cancel_reason: '',
          canceled_at: '',
          curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
          expired_at: '',
          expires_at: '',
          is_curbside_pickup: false,
          note: '',
          picked_up_at: '',
          pickup_at: '',
          pickup_window_duration: '',
          placed_at: '',
          prep_time_duration: '',
          ready_at: '',
          recipient: {
            address: {
              city: '',
              contact_name: '',
              country: '',
              county: '',
              email: '',
              fax: '',
              id: '',
              latitude: '',
              line1: '',
              line2: '',
              line3: '',
              line4: '',
              longitude: '',
              name: '',
              phone_number: '',
              postal_code: '',
              row_version: '',
              salutation: '',
              state: '',
              street_number: '',
              string: '',
              type: '',
              website: ''
            },
            customer_id: '',
            display_name: '',
            email: {},
            phone_number: {}
          },
          rejected_at: '',
          schedule_type: ''
        },
        shipment_details: {},
        status: '',
        type: ''
      }
    ],
    id: '',
    idempotency_key: '',
    line_items: [
      {
        applied_discounts: [],
        applied_taxes: [],
        id: '',
        item: '',
        modifiers: [],
        name: '',
        quantity: '',
        total_amount: 0,
        total_discount: 0,
        total_tax: 0,
        unit_price: ''
      }
    ],
    location_id: '',
    merchant_id: '',
    note: '',
    order_date: '',
    order_number: '',
    order_type_id: '',
    payment_status: '',
    payments: [{amount: 0, currency: '', id: ''}],
    reference_id: '',
    refunded: false,
    refunds: [
      {
        amount: 0,
        currency: '',
        id: '',
        location_id: '',
        reason: '',
        status: '',
        tender_id: '',
        transaction_id: ''
      }
    ],
    seat: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    status: '',
    table: '',
    taxes: [],
    tenders: [
      {
        amount: '',
        buyer_tendered_cash_amount: 0,
        card: {
          billing_address: {},
          bin: '',
          card_brand: '',
          card_type: '',
          cardholder_name: '',
          customer_id: '',
          enabled: false,
          exp_month: 0,
          exp_year: 0,
          fingerprint: '',
          id: '',
          last_4: '',
          merchant_id: '',
          prepaid_type: '',
          reference_id: '',
          version: ''
        },
        card_entry_method: '',
        card_status: '',
        change_back_cash_amount: 0,
        currency: '',
        id: '',
        location_id: '',
        name: '',
        note: '',
        payment_id: '',
        percentage: '',
        total_amount: 0,
        total_discount: 0,
        total_processing_fee: 0,
        total_refund: 0,
        total_service_charge: 0,
        total_tax: 0,
        total_tip: 0,
        transaction_id: '',
        type: ''
      }
    ],
    title: '',
    total_amount: 0,
    total_discount: 0,
    total_refund: 0,
    total_service_charge: 0,
    total_tax: 0,
    total_tip: 0,
    updated_at: '',
    updated_by: '',
    version: '',
    voided: false,
    voided_at: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/orders/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"closed_date":"","created_at":"","created_by":"","currency":"","customer_id":"","customers":[{"emails":[{"email":"","id":"","type":""}],"first_name":"","id":"","last_name":"","middle_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}]}],"discounts":[{"amount":0,"currency":"","id":"","name":"","product_id":"","scope":"","type":""}],"employee_id":"","fulfillments":[{"id":"","pickup_details":{"accepted_at":"","auto_complete_duration":"","cancel_reason":"","canceled_at":"","curbside_pickup_details":{"buyer_arrived_at":"","curbside_details":""},"expired_at":"","expires_at":"","is_curbside_pickup":false,"note":"","picked_up_at":"","pickup_at":"","pickup_window_duration":"","placed_at":"","prep_time_duration":"","ready_at":"","recipient":{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"customer_id":"","display_name":"","email":{},"phone_number":{}},"rejected_at":"","schedule_type":""},"shipment_details":{},"status":"","type":""}],"id":"","idempotency_key":"","line_items":[{"applied_discounts":[],"applied_taxes":[],"id":"","item":"","modifiers":[],"name":"","quantity":"","total_amount":0,"total_discount":0,"total_tax":0,"unit_price":""}],"location_id":"","merchant_id":"","note":"","order_date":"","order_number":"","order_type_id":"","payment_status":"","payments":[{"amount":0,"currency":"","id":""}],"reference_id":"","refunded":false,"refunds":[{"amount":0,"currency":"","id":"","location_id":"","reason":"","status":"","tender_id":"","transaction_id":""}],"seat":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","status":"","table":"","taxes":[],"tenders":[{"amount":"","buyer_tendered_cash_amount":0,"card":{"billing_address":{},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""},"card_entry_method":"","card_status":"","change_back_cash_amount":0,"currency":"","id":"","location_id":"","name":"","note":"","payment_id":"","percentage":"","total_amount":0,"total_discount":0,"total_processing_fee":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"transaction_id":"","type":""}],"title":"","total_amount":0,"total_discount":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"updated_at":"","updated_by":"","version":"","voided":false,"voided_at":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/orders/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "closed_date": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "customers": [\n    {\n      "emails": [\n        {\n          "email": "",\n          "id": "",\n          "type": ""\n        }\n      ],\n      "first_name": "",\n      "id": "",\n      "last_name": "",\n      "middle_name": "",\n      "phone_numbers": [\n        {\n          "area_code": "",\n          "country_code": "",\n          "extension": "",\n          "id": "",\n          "number": "",\n          "type": ""\n        }\n      ]\n    }\n  ],\n  "discounts": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "name": "",\n      "product_id": "",\n      "scope": "",\n      "type": ""\n    }\n  ],\n  "employee_id": "",\n  "fulfillments": [\n    {\n      "id": "",\n      "pickup_details": {\n        "accepted_at": "",\n        "auto_complete_duration": "",\n        "cancel_reason": "",\n        "canceled_at": "",\n        "curbside_pickup_details": {\n          "buyer_arrived_at": "",\n          "curbside_details": ""\n        },\n        "expired_at": "",\n        "expires_at": "",\n        "is_curbside_pickup": false,\n        "note": "",\n        "picked_up_at": "",\n        "pickup_at": "",\n        "pickup_window_duration": "",\n        "placed_at": "",\n        "prep_time_duration": "",\n        "ready_at": "",\n        "recipient": {\n          "address": {\n            "city": "",\n            "contact_name": "",\n            "country": "",\n            "county": "",\n            "email": "",\n            "fax": "",\n            "id": "",\n            "latitude": "",\n            "line1": "",\n            "line2": "",\n            "line3": "",\n            "line4": "",\n            "longitude": "",\n            "name": "",\n            "phone_number": "",\n            "postal_code": "",\n            "row_version": "",\n            "salutation": "",\n            "state": "",\n            "street_number": "",\n            "string": "",\n            "type": "",\n            "website": ""\n          },\n          "customer_id": "",\n          "display_name": "",\n          "email": {},\n          "phone_number": {}\n        },\n        "rejected_at": "",\n        "schedule_type": ""\n      },\n      "shipment_details": {},\n      "status": "",\n      "type": ""\n    }\n  ],\n  "id": "",\n  "idempotency_key": "",\n  "line_items": [\n    {\n      "applied_discounts": [],\n      "applied_taxes": [],\n      "id": "",\n      "item": "",\n      "modifiers": [],\n      "name": "",\n      "quantity": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_tax": 0,\n      "unit_price": ""\n    }\n  ],\n  "location_id": "",\n  "merchant_id": "",\n  "note": "",\n  "order_date": "",\n  "order_number": "",\n  "order_type_id": "",\n  "payment_status": "",\n  "payments": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": ""\n    }\n  ],\n  "reference_id": "",\n  "refunded": false,\n  "refunds": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "reason": "",\n      "status": "",\n      "tender_id": "",\n      "transaction_id": ""\n    }\n  ],\n  "seat": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "status": "",\n  "table": "",\n  "taxes": [],\n  "tenders": [\n    {\n      "amount": "",\n      "buyer_tendered_cash_amount": 0,\n      "card": {\n        "billing_address": {},\n        "bin": "",\n        "card_brand": "",\n        "card_type": "",\n        "cardholder_name": "",\n        "customer_id": "",\n        "enabled": false,\n        "exp_month": 0,\n        "exp_year": 0,\n        "fingerprint": "",\n        "id": "",\n        "last_4": "",\n        "merchant_id": "",\n        "prepaid_type": "",\n        "reference_id": "",\n        "version": ""\n      },\n      "card_entry_method": "",\n      "card_status": "",\n      "change_back_cash_amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "name": "",\n      "note": "",\n      "payment_id": "",\n      "percentage": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_processing_fee": 0,\n      "total_refund": 0,\n      "total_service_charge": 0,\n      "total_tax": 0,\n      "total_tip": 0,\n      "transaction_id": "",\n      "type": ""\n    }\n  ],\n  "title": "",\n  "total_amount": 0,\n  "total_discount": 0,\n  "total_refund": 0,\n  "total_service_charge": 0,\n  "total_tax": 0,\n  "total_tip": 0,\n  "updated_at": "",\n  "updated_by": "",\n  "version": "",\n  "voided": false,\n  "voided_at": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/orders/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  closed_date: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  customers: [
    {
      emails: [{email: '', id: '', type: ''}],
      first_name: '',
      id: '',
      last_name: '',
      middle_name: '',
      phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
    }
  ],
  discounts: [
    {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
  ],
  employee_id: '',
  fulfillments: [
    {
      id: '',
      pickup_details: {
        accepted_at: '',
        auto_complete_duration: '',
        cancel_reason: '',
        canceled_at: '',
        curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
        expired_at: '',
        expires_at: '',
        is_curbside_pickup: false,
        note: '',
        picked_up_at: '',
        pickup_at: '',
        pickup_window_duration: '',
        placed_at: '',
        prep_time_duration: '',
        ready_at: '',
        recipient: {
          address: {
            city: '',
            contact_name: '',
            country: '',
            county: '',
            email: '',
            fax: '',
            id: '',
            latitude: '',
            line1: '',
            line2: '',
            line3: '',
            line4: '',
            longitude: '',
            name: '',
            phone_number: '',
            postal_code: '',
            row_version: '',
            salutation: '',
            state: '',
            street_number: '',
            string: '',
            type: '',
            website: ''
          },
          customer_id: '',
          display_name: '',
          email: {},
          phone_number: {}
        },
        rejected_at: '',
        schedule_type: ''
      },
      shipment_details: {},
      status: '',
      type: ''
    }
  ],
  id: '',
  idempotency_key: '',
  line_items: [
    {
      applied_discounts: [],
      applied_taxes: [],
      id: '',
      item: '',
      modifiers: [],
      name: '',
      quantity: '',
      total_amount: 0,
      total_discount: 0,
      total_tax: 0,
      unit_price: ''
    }
  ],
  location_id: '',
  merchant_id: '',
  note: '',
  order_date: '',
  order_number: '',
  order_type_id: '',
  payment_status: '',
  payments: [{amount: 0, currency: '', id: ''}],
  reference_id: '',
  refunded: false,
  refunds: [
    {
      amount: 0,
      currency: '',
      id: '',
      location_id: '',
      reason: '',
      status: '',
      tender_id: '',
      transaction_id: ''
    }
  ],
  seat: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  status: '',
  table: '',
  taxes: [],
  tenders: [
    {
      amount: '',
      buyer_tendered_cash_amount: 0,
      card: {
        billing_address: {},
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      },
      card_entry_method: '',
      card_status: '',
      change_back_cash_amount: 0,
      currency: '',
      id: '',
      location_id: '',
      name: '',
      note: '',
      payment_id: '',
      percentage: '',
      total_amount: 0,
      total_discount: 0,
      total_processing_fee: 0,
      total_refund: 0,
      total_service_charge: 0,
      total_tax: 0,
      total_tip: 0,
      transaction_id: '',
      type: ''
    }
  ],
  title: '',
  total_amount: 0,
  total_discount: 0,
  total_refund: 0,
  total_service_charge: 0,
  total_tax: 0,
  total_tip: 0,
  updated_at: '',
  updated_by: '',
  version: '',
  voided: false,
  voided_at: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    closed_date: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    customers: [
      {
        emails: [{email: '', id: '', type: ''}],
        first_name: '',
        id: '',
        last_name: '',
        middle_name: '',
        phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
      }
    ],
    discounts: [
      {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
    ],
    employee_id: '',
    fulfillments: [
      {
        id: '',
        pickup_details: {
          accepted_at: '',
          auto_complete_duration: '',
          cancel_reason: '',
          canceled_at: '',
          curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
          expired_at: '',
          expires_at: '',
          is_curbside_pickup: false,
          note: '',
          picked_up_at: '',
          pickup_at: '',
          pickup_window_duration: '',
          placed_at: '',
          prep_time_duration: '',
          ready_at: '',
          recipient: {
            address: {
              city: '',
              contact_name: '',
              country: '',
              county: '',
              email: '',
              fax: '',
              id: '',
              latitude: '',
              line1: '',
              line2: '',
              line3: '',
              line4: '',
              longitude: '',
              name: '',
              phone_number: '',
              postal_code: '',
              row_version: '',
              salutation: '',
              state: '',
              street_number: '',
              string: '',
              type: '',
              website: ''
            },
            customer_id: '',
            display_name: '',
            email: {},
            phone_number: {}
          },
          rejected_at: '',
          schedule_type: ''
        },
        shipment_details: {},
        status: '',
        type: ''
      }
    ],
    id: '',
    idempotency_key: '',
    line_items: [
      {
        applied_discounts: [],
        applied_taxes: [],
        id: '',
        item: '',
        modifiers: [],
        name: '',
        quantity: '',
        total_amount: 0,
        total_discount: 0,
        total_tax: 0,
        unit_price: ''
      }
    ],
    location_id: '',
    merchant_id: '',
    note: '',
    order_date: '',
    order_number: '',
    order_type_id: '',
    payment_status: '',
    payments: [{amount: 0, currency: '', id: ''}],
    reference_id: '',
    refunded: false,
    refunds: [
      {
        amount: 0,
        currency: '',
        id: '',
        location_id: '',
        reason: '',
        status: '',
        tender_id: '',
        transaction_id: ''
      }
    ],
    seat: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    status: '',
    table: '',
    taxes: [],
    tenders: [
      {
        amount: '',
        buyer_tendered_cash_amount: 0,
        card: {
          billing_address: {},
          bin: '',
          card_brand: '',
          card_type: '',
          cardholder_name: '',
          customer_id: '',
          enabled: false,
          exp_month: 0,
          exp_year: 0,
          fingerprint: '',
          id: '',
          last_4: '',
          merchant_id: '',
          prepaid_type: '',
          reference_id: '',
          version: ''
        },
        card_entry_method: '',
        card_status: '',
        change_back_cash_amount: 0,
        currency: '',
        id: '',
        location_id: '',
        name: '',
        note: '',
        payment_id: '',
        percentage: '',
        total_amount: 0,
        total_discount: 0,
        total_processing_fee: 0,
        total_refund: 0,
        total_service_charge: 0,
        total_tax: 0,
        total_tip: 0,
        transaction_id: '',
        type: ''
      }
    ],
    title: '',
    total_amount: 0,
    total_discount: 0,
    total_refund: 0,
    total_service_charge: 0,
    total_tax: 0,
    total_tip: 0,
    updated_at: '',
    updated_by: '',
    version: '',
    voided: false,
    voided_at: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/pos/orders/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  closed_date: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  customers: [
    {
      emails: [
        {
          email: '',
          id: '',
          type: ''
        }
      ],
      first_name: '',
      id: '',
      last_name: '',
      middle_name: '',
      phone_numbers: [
        {
          area_code: '',
          country_code: '',
          extension: '',
          id: '',
          number: '',
          type: ''
        }
      ]
    }
  ],
  discounts: [
    {
      amount: 0,
      currency: '',
      id: '',
      name: '',
      product_id: '',
      scope: '',
      type: ''
    }
  ],
  employee_id: '',
  fulfillments: [
    {
      id: '',
      pickup_details: {
        accepted_at: '',
        auto_complete_duration: '',
        cancel_reason: '',
        canceled_at: '',
        curbside_pickup_details: {
          buyer_arrived_at: '',
          curbside_details: ''
        },
        expired_at: '',
        expires_at: '',
        is_curbside_pickup: false,
        note: '',
        picked_up_at: '',
        pickup_at: '',
        pickup_window_duration: '',
        placed_at: '',
        prep_time_duration: '',
        ready_at: '',
        recipient: {
          address: {
            city: '',
            contact_name: '',
            country: '',
            county: '',
            email: '',
            fax: '',
            id: '',
            latitude: '',
            line1: '',
            line2: '',
            line3: '',
            line4: '',
            longitude: '',
            name: '',
            phone_number: '',
            postal_code: '',
            row_version: '',
            salutation: '',
            state: '',
            street_number: '',
            string: '',
            type: '',
            website: ''
          },
          customer_id: '',
          display_name: '',
          email: {},
          phone_number: {}
        },
        rejected_at: '',
        schedule_type: ''
      },
      shipment_details: {},
      status: '',
      type: ''
    }
  ],
  id: '',
  idempotency_key: '',
  line_items: [
    {
      applied_discounts: [],
      applied_taxes: [],
      id: '',
      item: '',
      modifiers: [],
      name: '',
      quantity: '',
      total_amount: 0,
      total_discount: 0,
      total_tax: 0,
      unit_price: ''
    }
  ],
  location_id: '',
  merchant_id: '',
  note: '',
  order_date: '',
  order_number: '',
  order_type_id: '',
  payment_status: '',
  payments: [
    {
      amount: 0,
      currency: '',
      id: ''
    }
  ],
  reference_id: '',
  refunded: false,
  refunds: [
    {
      amount: 0,
      currency: '',
      id: '',
      location_id: '',
      reason: '',
      status: '',
      tender_id: '',
      transaction_id: ''
    }
  ],
  seat: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  status: '',
  table: '',
  taxes: [],
  tenders: [
    {
      amount: '',
      buyer_tendered_cash_amount: 0,
      card: {
        billing_address: {},
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      },
      card_entry_method: '',
      card_status: '',
      change_back_cash_amount: 0,
      currency: '',
      id: '',
      location_id: '',
      name: '',
      note: '',
      payment_id: '',
      percentage: '',
      total_amount: 0,
      total_discount: 0,
      total_processing_fee: 0,
      total_refund: 0,
      total_service_charge: 0,
      total_tax: 0,
      total_tip: 0,
      transaction_id: '',
      type: ''
    }
  ],
  title: '',
  total_amount: 0,
  total_discount: 0,
  total_refund: 0,
  total_service_charge: 0,
  total_tax: 0,
  total_tip: 0,
  updated_at: '',
  updated_by: '',
  version: '',
  voided: false,
  voided_at: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/orders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    closed_date: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    customers: [
      {
        emails: [{email: '', id: '', type: ''}],
        first_name: '',
        id: '',
        last_name: '',
        middle_name: '',
        phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}]
      }
    ],
    discounts: [
      {amount: 0, currency: '', id: '', name: '', product_id: '', scope: '', type: ''}
    ],
    employee_id: '',
    fulfillments: [
      {
        id: '',
        pickup_details: {
          accepted_at: '',
          auto_complete_duration: '',
          cancel_reason: '',
          canceled_at: '',
          curbside_pickup_details: {buyer_arrived_at: '', curbside_details: ''},
          expired_at: '',
          expires_at: '',
          is_curbside_pickup: false,
          note: '',
          picked_up_at: '',
          pickup_at: '',
          pickup_window_duration: '',
          placed_at: '',
          prep_time_duration: '',
          ready_at: '',
          recipient: {
            address: {
              city: '',
              contact_name: '',
              country: '',
              county: '',
              email: '',
              fax: '',
              id: '',
              latitude: '',
              line1: '',
              line2: '',
              line3: '',
              line4: '',
              longitude: '',
              name: '',
              phone_number: '',
              postal_code: '',
              row_version: '',
              salutation: '',
              state: '',
              street_number: '',
              string: '',
              type: '',
              website: ''
            },
            customer_id: '',
            display_name: '',
            email: {},
            phone_number: {}
          },
          rejected_at: '',
          schedule_type: ''
        },
        shipment_details: {},
        status: '',
        type: ''
      }
    ],
    id: '',
    idempotency_key: '',
    line_items: [
      {
        applied_discounts: [],
        applied_taxes: [],
        id: '',
        item: '',
        modifiers: [],
        name: '',
        quantity: '',
        total_amount: 0,
        total_discount: 0,
        total_tax: 0,
        unit_price: ''
      }
    ],
    location_id: '',
    merchant_id: '',
    note: '',
    order_date: '',
    order_number: '',
    order_type_id: '',
    payment_status: '',
    payments: [{amount: 0, currency: '', id: ''}],
    reference_id: '',
    refunded: false,
    refunds: [
      {
        amount: 0,
        currency: '',
        id: '',
        location_id: '',
        reason: '',
        status: '',
        tender_id: '',
        transaction_id: ''
      }
    ],
    seat: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    status: '',
    table: '',
    taxes: [],
    tenders: [
      {
        amount: '',
        buyer_tendered_cash_amount: 0,
        card: {
          billing_address: {},
          bin: '',
          card_brand: '',
          card_type: '',
          cardholder_name: '',
          customer_id: '',
          enabled: false,
          exp_month: 0,
          exp_year: 0,
          fingerprint: '',
          id: '',
          last_4: '',
          merchant_id: '',
          prepaid_type: '',
          reference_id: '',
          version: ''
        },
        card_entry_method: '',
        card_status: '',
        change_back_cash_amount: 0,
        currency: '',
        id: '',
        location_id: '',
        name: '',
        note: '',
        payment_id: '',
        percentage: '',
        total_amount: 0,
        total_discount: 0,
        total_processing_fee: 0,
        total_refund: 0,
        total_service_charge: 0,
        total_tax: 0,
        total_tip: 0,
        transaction_id: '',
        type: ''
      }
    ],
    title: '',
    total_amount: 0,
    total_discount: 0,
    total_refund: 0,
    total_service_charge: 0,
    total_tax: 0,
    total_tip: 0,
    updated_at: '',
    updated_by: '',
    version: '',
    voided: false,
    voided_at: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/orders/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"closed_date":"","created_at":"","created_by":"","currency":"","customer_id":"","customers":[{"emails":[{"email":"","id":"","type":""}],"first_name":"","id":"","last_name":"","middle_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}]}],"discounts":[{"amount":0,"currency":"","id":"","name":"","product_id":"","scope":"","type":""}],"employee_id":"","fulfillments":[{"id":"","pickup_details":{"accepted_at":"","auto_complete_duration":"","cancel_reason":"","canceled_at":"","curbside_pickup_details":{"buyer_arrived_at":"","curbside_details":""},"expired_at":"","expires_at":"","is_curbside_pickup":false,"note":"","picked_up_at":"","pickup_at":"","pickup_window_duration":"","placed_at":"","prep_time_duration":"","ready_at":"","recipient":{"address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"customer_id":"","display_name":"","email":{},"phone_number":{}},"rejected_at":"","schedule_type":""},"shipment_details":{},"status":"","type":""}],"id":"","idempotency_key":"","line_items":[{"applied_discounts":[],"applied_taxes":[],"id":"","item":"","modifiers":[],"name":"","quantity":"","total_amount":0,"total_discount":0,"total_tax":0,"unit_price":""}],"location_id":"","merchant_id":"","note":"","order_date":"","order_number":"","order_type_id":"","payment_status":"","payments":[{"amount":0,"currency":"","id":""}],"reference_id":"","refunded":false,"refunds":[{"amount":0,"currency":"","id":"","location_id":"","reason":"","status":"","tender_id":"","transaction_id":""}],"seat":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","status":"","table":"","taxes":[],"tenders":[{"amount":"","buyer_tendered_cash_amount":0,"card":{"billing_address":{},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""},"card_entry_method":"","card_status":"","change_back_cash_amount":0,"currency":"","id":"","location_id":"","name":"","note":"","payment_id":"","percentage":"","total_amount":0,"total_discount":0,"total_processing_fee":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"transaction_id":"","type":""}],"title":"","total_amount":0,"total_discount":0,"total_refund":0,"total_service_charge":0,"total_tax":0,"total_tip":0,"updated_at":"","updated_by":"","version":"","voided":false,"voided_at":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"closed_date": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"customer_id": @"",
                              @"customers": @[ @{ @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ], @"first_name": @"", @"id": @"", @"last_name": @"", @"middle_name": @"", @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ] } ],
                              @"discounts": @[ @{ @"amount": @0, @"currency": @"", @"id": @"", @"name": @"", @"product_id": @"", @"scope": @"", @"type": @"" } ],
                              @"employee_id": @"",
                              @"fulfillments": @[ @{ @"id": @"", @"pickup_details": @{ @"accepted_at": @"", @"auto_complete_duration": @"", @"cancel_reason": @"", @"canceled_at": @"", @"curbside_pickup_details": @{ @"buyer_arrived_at": @"", @"curbside_details": @"" }, @"expired_at": @"", @"expires_at": @"", @"is_curbside_pickup": @NO, @"note": @"", @"picked_up_at": @"", @"pickup_at": @"", @"pickup_window_duration": @"", @"placed_at": @"", @"prep_time_duration": @"", @"ready_at": @"", @"recipient": @{ @"address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" }, @"customer_id": @"", @"display_name": @"", @"email": @{  }, @"phone_number": @{  } }, @"rejected_at": @"", @"schedule_type": @"" }, @"shipment_details": @{  }, @"status": @"", @"type": @"" } ],
                              @"id": @"",
                              @"idempotency_key": @"",
                              @"line_items": @[ @{ @"applied_discounts": @[  ], @"applied_taxes": @[  ], @"id": @"", @"item": @"", @"modifiers": @[  ], @"name": @"", @"quantity": @"", @"total_amount": @0, @"total_discount": @0, @"total_tax": @0, @"unit_price": @"" } ],
                              @"location_id": @"",
                              @"merchant_id": @"",
                              @"note": @"",
                              @"order_date": @"",
                              @"order_number": @"",
                              @"order_type_id": @"",
                              @"payment_status": @"",
                              @"payments": @[ @{ @"amount": @0, @"currency": @"", @"id": @"" } ],
                              @"reference_id": @"",
                              @"refunded": @NO,
                              @"refunds": @[ @{ @"amount": @0, @"currency": @"", @"id": @"", @"location_id": @"", @"reason": @"", @"status": @"", @"tender_id": @"", @"transaction_id": @"" } ],
                              @"seat": @"",
                              @"service_charges": @[ @{ @"active": @NO, @"amount": @"", @"currency": @"", @"id": @"", @"name": @"", @"percentage": @"", @"type": @"" } ],
                              @"source": @"",
                              @"status": @"",
                              @"table": @"",
                              @"taxes": @[  ],
                              @"tenders": @[ @{ @"amount": @"", @"buyer_tendered_cash_amount": @0, @"card": @{ @"billing_address": @{  }, @"bin": @"", @"card_brand": @"", @"card_type": @"", @"cardholder_name": @"", @"customer_id": @"", @"enabled": @NO, @"exp_month": @0, @"exp_year": @0, @"fingerprint": @"", @"id": @"", @"last_4": @"", @"merchant_id": @"", @"prepaid_type": @"", @"reference_id": @"", @"version": @"" }, @"card_entry_method": @"", @"card_status": @"", @"change_back_cash_amount": @0, @"currency": @"", @"id": @"", @"location_id": @"", @"name": @"", @"note": @"", @"payment_id": @"", @"percentage": @"", @"total_amount": @0, @"total_discount": @0, @"total_processing_fee": @0, @"total_refund": @0, @"total_service_charge": @0, @"total_tax": @0, @"total_tip": @0, @"transaction_id": @"", @"type": @"" } ],
                              @"title": @"",
                              @"total_amount": @0,
                              @"total_discount": @0,
                              @"total_refund": @0,
                              @"total_service_charge": @0,
                              @"total_tax": @0,
                              @"total_tip": @0,
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"version": @"",
                              @"voided": @NO,
                              @"voided_at": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/orders/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/orders/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/orders/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'closed_date' => '',
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'customer_id' => '',
    'customers' => [
        [
                'emails' => [
                                [
                                                                'email' => '',
                                                                'id' => '',
                                                                'type' => ''
                                ]
                ],
                'first_name' => '',
                'id' => '',
                'last_name' => '',
                'middle_name' => '',
                'phone_numbers' => [
                                [
                                                                'area_code' => '',
                                                                'country_code' => '',
                                                                'extension' => '',
                                                                'id' => '',
                                                                'number' => '',
                                                                'type' => ''
                                ]
                ]
        ]
    ],
    'discounts' => [
        [
                'amount' => 0,
                'currency' => '',
                'id' => '',
                'name' => '',
                'product_id' => '',
                'scope' => '',
                'type' => ''
        ]
    ],
    'employee_id' => '',
    'fulfillments' => [
        [
                'id' => '',
                'pickup_details' => [
                                'accepted_at' => '',
                                'auto_complete_duration' => '',
                                'cancel_reason' => '',
                                'canceled_at' => '',
                                'curbside_pickup_details' => [
                                                                'buyer_arrived_at' => '',
                                                                'curbside_details' => ''
                                ],
                                'expired_at' => '',
                                'expires_at' => '',
                                'is_curbside_pickup' => null,
                                'note' => '',
                                'picked_up_at' => '',
                                'pickup_at' => '',
                                'pickup_window_duration' => '',
                                'placed_at' => '',
                                'prep_time_duration' => '',
                                'ready_at' => '',
                                'recipient' => [
                                                                'address' => [
                                                                                                                                'city' => '',
                                                                                                                                'contact_name' => '',
                                                                                                                                'country' => '',
                                                                                                                                'county' => '',
                                                                                                                                'email' => '',
                                                                                                                                'fax' => '',
                                                                                                                                'id' => '',
                                                                                                                                'latitude' => '',
                                                                                                                                'line1' => '',
                                                                                                                                'line2' => '',
                                                                                                                                'line3' => '',
                                                                                                                                'line4' => '',
                                                                                                                                'longitude' => '',
                                                                                                                                'name' => '',
                                                                                                                                'phone_number' => '',
                                                                                                                                'postal_code' => '',
                                                                                                                                'row_version' => '',
                                                                                                                                'salutation' => '',
                                                                                                                                'state' => '',
                                                                                                                                'street_number' => '',
                                                                                                                                'string' => '',
                                                                                                                                'type' => '',
                                                                                                                                'website' => ''
                                                                ],
                                                                'customer_id' => '',
                                                                'display_name' => '',
                                                                'email' => [
                                                                                                                                
                                                                ],
                                                                'phone_number' => [
                                                                                                                                
                                                                ]
                                ],
                                'rejected_at' => '',
                                'schedule_type' => ''
                ],
                'shipment_details' => [
                                
                ],
                'status' => '',
                'type' => ''
        ]
    ],
    'id' => '',
    'idempotency_key' => '',
    'line_items' => [
        [
                'applied_discounts' => [
                                
                ],
                'applied_taxes' => [
                                
                ],
                'id' => '',
                'item' => '',
                'modifiers' => [
                                
                ],
                'name' => '',
                'quantity' => '',
                'total_amount' => 0,
                'total_discount' => 0,
                'total_tax' => 0,
                'unit_price' => ''
        ]
    ],
    'location_id' => '',
    'merchant_id' => '',
    'note' => '',
    'order_date' => '',
    'order_number' => '',
    'order_type_id' => '',
    'payment_status' => '',
    'payments' => [
        [
                'amount' => 0,
                'currency' => '',
                'id' => ''
        ]
    ],
    'reference_id' => '',
    'refunded' => null,
    'refunds' => [
        [
                'amount' => 0,
                'currency' => '',
                'id' => '',
                'location_id' => '',
                'reason' => '',
                'status' => '',
                'tender_id' => '',
                'transaction_id' => ''
        ]
    ],
    'seat' => '',
    'service_charges' => [
        [
                'active' => null,
                'amount' => '',
                'currency' => '',
                'id' => '',
                'name' => '',
                'percentage' => '',
                'type' => ''
        ]
    ],
    'source' => '',
    'status' => '',
    'table' => '',
    'taxes' => [
        
    ],
    'tenders' => [
        [
                'amount' => '',
                'buyer_tendered_cash_amount' => 0,
                'card' => [
                                'billing_address' => [
                                                                
                                ],
                                'bin' => '',
                                'card_brand' => '',
                                'card_type' => '',
                                'cardholder_name' => '',
                                'customer_id' => '',
                                'enabled' => null,
                                'exp_month' => 0,
                                'exp_year' => 0,
                                'fingerprint' => '',
                                'id' => '',
                                'last_4' => '',
                                'merchant_id' => '',
                                'prepaid_type' => '',
                                'reference_id' => '',
                                'version' => ''
                ],
                'card_entry_method' => '',
                'card_status' => '',
                'change_back_cash_amount' => 0,
                'currency' => '',
                'id' => '',
                'location_id' => '',
                'name' => '',
                'note' => '',
                'payment_id' => '',
                'percentage' => '',
                'total_amount' => 0,
                'total_discount' => 0,
                'total_processing_fee' => 0,
                'total_refund' => 0,
                'total_service_charge' => 0,
                'total_tax' => 0,
                'total_tip' => 0,
                'transaction_id' => '',
                'type' => ''
        ]
    ],
    'title' => '',
    'total_amount' => 0,
    'total_discount' => 0,
    'total_refund' => 0,
    'total_service_charge' => 0,
    'total_tax' => 0,
    'total_tip' => 0,
    'updated_at' => '',
    'updated_by' => '',
    'version' => '',
    'voided' => null,
    'voided_at' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/pos/orders/:id', [
  'body' => '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/orders/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'closed_date' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'customers' => [
    [
        'emails' => [
                [
                                'email' => '',
                                'id' => '',
                                'type' => ''
                ]
        ],
        'first_name' => '',
        'id' => '',
        'last_name' => '',
        'middle_name' => '',
        'phone_numbers' => [
                [
                                'area_code' => '',
                                'country_code' => '',
                                'extension' => '',
                                'id' => '',
                                'number' => '',
                                'type' => ''
                ]
        ]
    ]
  ],
  'discounts' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'name' => '',
        'product_id' => '',
        'scope' => '',
        'type' => ''
    ]
  ],
  'employee_id' => '',
  'fulfillments' => [
    [
        'id' => '',
        'pickup_details' => [
                'accepted_at' => '',
                'auto_complete_duration' => '',
                'cancel_reason' => '',
                'canceled_at' => '',
                'curbside_pickup_details' => [
                                'buyer_arrived_at' => '',
                                'curbside_details' => ''
                ],
                'expired_at' => '',
                'expires_at' => '',
                'is_curbside_pickup' => null,
                'note' => '',
                'picked_up_at' => '',
                'pickup_at' => '',
                'pickup_window_duration' => '',
                'placed_at' => '',
                'prep_time_duration' => '',
                'ready_at' => '',
                'recipient' => [
                                'address' => [
                                                                'city' => '',
                                                                'contact_name' => '',
                                                                'country' => '',
                                                                'county' => '',
                                                                'email' => '',
                                                                'fax' => '',
                                                                'id' => '',
                                                                'latitude' => '',
                                                                'line1' => '',
                                                                'line2' => '',
                                                                'line3' => '',
                                                                'line4' => '',
                                                                'longitude' => '',
                                                                'name' => '',
                                                                'phone_number' => '',
                                                                'postal_code' => '',
                                                                'row_version' => '',
                                                                'salutation' => '',
                                                                'state' => '',
                                                                'street_number' => '',
                                                                'string' => '',
                                                                'type' => '',
                                                                'website' => ''
                                ],
                                'customer_id' => '',
                                'display_name' => '',
                                'email' => [
                                                                
                                ],
                                'phone_number' => [
                                                                
                                ]
                ],
                'rejected_at' => '',
                'schedule_type' => ''
        ],
        'shipment_details' => [
                
        ],
        'status' => '',
        'type' => ''
    ]
  ],
  'id' => '',
  'idempotency_key' => '',
  'line_items' => [
    [
        'applied_discounts' => [
                
        ],
        'applied_taxes' => [
                
        ],
        'id' => '',
        'item' => '',
        'modifiers' => [
                
        ],
        'name' => '',
        'quantity' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_tax' => 0,
        'unit_price' => ''
    ]
  ],
  'location_id' => '',
  'merchant_id' => '',
  'note' => '',
  'order_date' => '',
  'order_number' => '',
  'order_type_id' => '',
  'payment_status' => '',
  'payments' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => ''
    ]
  ],
  'reference_id' => '',
  'refunded' => null,
  'refunds' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'reason' => '',
        'status' => '',
        'tender_id' => '',
        'transaction_id' => ''
    ]
  ],
  'seat' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'status' => '',
  'table' => '',
  'taxes' => [
    
  ],
  'tenders' => [
    [
        'amount' => '',
        'buyer_tendered_cash_amount' => 0,
        'card' => [
                'billing_address' => [
                                
                ],
                'bin' => '',
                'card_brand' => '',
                'card_type' => '',
                'cardholder_name' => '',
                'customer_id' => '',
                'enabled' => null,
                'exp_month' => 0,
                'exp_year' => 0,
                'fingerprint' => '',
                'id' => '',
                'last_4' => '',
                'merchant_id' => '',
                'prepaid_type' => '',
                'reference_id' => '',
                'version' => ''
        ],
        'card_entry_method' => '',
        'card_status' => '',
        'change_back_cash_amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'name' => '',
        'note' => '',
        'payment_id' => '',
        'percentage' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_processing_fee' => 0,
        'total_refund' => 0,
        'total_service_charge' => 0,
        'total_tax' => 0,
        'total_tip' => 0,
        'transaction_id' => '',
        'type' => ''
    ]
  ],
  'title' => '',
  'total_amount' => 0,
  'total_discount' => 0,
  'total_refund' => 0,
  'total_service_charge' => 0,
  'total_tax' => 0,
  'total_tip' => 0,
  'updated_at' => '',
  'updated_by' => '',
  'version' => '',
  'voided' => null,
  'voided_at' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'closed_date' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'customers' => [
    [
        'emails' => [
                [
                                'email' => '',
                                'id' => '',
                                'type' => ''
                ]
        ],
        'first_name' => '',
        'id' => '',
        'last_name' => '',
        'middle_name' => '',
        'phone_numbers' => [
                [
                                'area_code' => '',
                                'country_code' => '',
                                'extension' => '',
                                'id' => '',
                                'number' => '',
                                'type' => ''
                ]
        ]
    ]
  ],
  'discounts' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'name' => '',
        'product_id' => '',
        'scope' => '',
        'type' => ''
    ]
  ],
  'employee_id' => '',
  'fulfillments' => [
    [
        'id' => '',
        'pickup_details' => [
                'accepted_at' => '',
                'auto_complete_duration' => '',
                'cancel_reason' => '',
                'canceled_at' => '',
                'curbside_pickup_details' => [
                                'buyer_arrived_at' => '',
                                'curbside_details' => ''
                ],
                'expired_at' => '',
                'expires_at' => '',
                'is_curbside_pickup' => null,
                'note' => '',
                'picked_up_at' => '',
                'pickup_at' => '',
                'pickup_window_duration' => '',
                'placed_at' => '',
                'prep_time_duration' => '',
                'ready_at' => '',
                'recipient' => [
                                'address' => [
                                                                'city' => '',
                                                                'contact_name' => '',
                                                                'country' => '',
                                                                'county' => '',
                                                                'email' => '',
                                                                'fax' => '',
                                                                'id' => '',
                                                                'latitude' => '',
                                                                'line1' => '',
                                                                'line2' => '',
                                                                'line3' => '',
                                                                'line4' => '',
                                                                'longitude' => '',
                                                                'name' => '',
                                                                'phone_number' => '',
                                                                'postal_code' => '',
                                                                'row_version' => '',
                                                                'salutation' => '',
                                                                'state' => '',
                                                                'street_number' => '',
                                                                'string' => '',
                                                                'type' => '',
                                                                'website' => ''
                                ],
                                'customer_id' => '',
                                'display_name' => '',
                                'email' => [
                                                                
                                ],
                                'phone_number' => [
                                                                
                                ]
                ],
                'rejected_at' => '',
                'schedule_type' => ''
        ],
        'shipment_details' => [
                
        ],
        'status' => '',
        'type' => ''
    ]
  ],
  'id' => '',
  'idempotency_key' => '',
  'line_items' => [
    [
        'applied_discounts' => [
                
        ],
        'applied_taxes' => [
                
        ],
        'id' => '',
        'item' => '',
        'modifiers' => [
                
        ],
        'name' => '',
        'quantity' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_tax' => 0,
        'unit_price' => ''
    ]
  ],
  'location_id' => '',
  'merchant_id' => '',
  'note' => '',
  'order_date' => '',
  'order_number' => '',
  'order_type_id' => '',
  'payment_status' => '',
  'payments' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => ''
    ]
  ],
  'reference_id' => '',
  'refunded' => null,
  'refunds' => [
    [
        'amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'reason' => '',
        'status' => '',
        'tender_id' => '',
        'transaction_id' => ''
    ]
  ],
  'seat' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'status' => '',
  'table' => '',
  'taxes' => [
    
  ],
  'tenders' => [
    [
        'amount' => '',
        'buyer_tendered_cash_amount' => 0,
        'card' => [
                'billing_address' => [
                                
                ],
                'bin' => '',
                'card_brand' => '',
                'card_type' => '',
                'cardholder_name' => '',
                'customer_id' => '',
                'enabled' => null,
                'exp_month' => 0,
                'exp_year' => 0,
                'fingerprint' => '',
                'id' => '',
                'last_4' => '',
                'merchant_id' => '',
                'prepaid_type' => '',
                'reference_id' => '',
                'version' => ''
        ],
        'card_entry_method' => '',
        'card_status' => '',
        'change_back_cash_amount' => 0,
        'currency' => '',
        'id' => '',
        'location_id' => '',
        'name' => '',
        'note' => '',
        'payment_id' => '',
        'percentage' => '',
        'total_amount' => 0,
        'total_discount' => 0,
        'total_processing_fee' => 0,
        'total_refund' => 0,
        'total_service_charge' => 0,
        'total_tax' => 0,
        'total_tip' => 0,
        'transaction_id' => '',
        'type' => ''
    ]
  ],
  'title' => '',
  'total_amount' => 0,
  'total_discount' => 0,
  'total_refund' => 0,
  'total_service_charge' => 0,
  'total_tax' => 0,
  'total_tip' => 0,
  'updated_at' => '',
  'updated_by' => '',
  'version' => '',
  'voided' => null,
  'voided_at' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/orders/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/orders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/orders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/pos/orders/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/orders/:id"

payload = {
    "closed_date": "",
    "created_at": "",
    "created_by": "",
    "currency": "",
    "customer_id": "",
    "customers": [
        {
            "emails": [
                {
                    "email": "",
                    "id": "",
                    "type": ""
                }
            ],
            "first_name": "",
            "id": "",
            "last_name": "",
            "middle_name": "",
            "phone_numbers": [
                {
                    "area_code": "",
                    "country_code": "",
                    "extension": "",
                    "id": "",
                    "number": "",
                    "type": ""
                }
            ]
        }
    ],
    "discounts": [
        {
            "amount": 0,
            "currency": "",
            "id": "",
            "name": "",
            "product_id": "",
            "scope": "",
            "type": ""
        }
    ],
    "employee_id": "",
    "fulfillments": [
        {
            "id": "",
            "pickup_details": {
                "accepted_at": "",
                "auto_complete_duration": "",
                "cancel_reason": "",
                "canceled_at": "",
                "curbside_pickup_details": {
                    "buyer_arrived_at": "",
                    "curbside_details": ""
                },
                "expired_at": "",
                "expires_at": "",
                "is_curbside_pickup": False,
                "note": "",
                "picked_up_at": "",
                "pickup_at": "",
                "pickup_window_duration": "",
                "placed_at": "",
                "prep_time_duration": "",
                "ready_at": "",
                "recipient": {
                    "address": {
                        "city": "",
                        "contact_name": "",
                        "country": "",
                        "county": "",
                        "email": "",
                        "fax": "",
                        "id": "",
                        "latitude": "",
                        "line1": "",
                        "line2": "",
                        "line3": "",
                        "line4": "",
                        "longitude": "",
                        "name": "",
                        "phone_number": "",
                        "postal_code": "",
                        "row_version": "",
                        "salutation": "",
                        "state": "",
                        "street_number": "",
                        "string": "",
                        "type": "",
                        "website": ""
                    },
                    "customer_id": "",
                    "display_name": "",
                    "email": {},
                    "phone_number": {}
                },
                "rejected_at": "",
                "schedule_type": ""
            },
            "shipment_details": {},
            "status": "",
            "type": ""
        }
    ],
    "id": "",
    "idempotency_key": "",
    "line_items": [
        {
            "applied_discounts": [],
            "applied_taxes": [],
            "id": "",
            "item": "",
            "modifiers": [],
            "name": "",
            "quantity": "",
            "total_amount": 0,
            "total_discount": 0,
            "total_tax": 0,
            "unit_price": ""
        }
    ],
    "location_id": "",
    "merchant_id": "",
    "note": "",
    "order_date": "",
    "order_number": "",
    "order_type_id": "",
    "payment_status": "",
    "payments": [
        {
            "amount": 0,
            "currency": "",
            "id": ""
        }
    ],
    "reference_id": "",
    "refunded": False,
    "refunds": [
        {
            "amount": 0,
            "currency": "",
            "id": "",
            "location_id": "",
            "reason": "",
            "status": "",
            "tender_id": "",
            "transaction_id": ""
        }
    ],
    "seat": "",
    "service_charges": [
        {
            "active": False,
            "amount": "",
            "currency": "",
            "id": "",
            "name": "",
            "percentage": "",
            "type": ""
        }
    ],
    "source": "",
    "status": "",
    "table": "",
    "taxes": [],
    "tenders": [
        {
            "amount": "",
            "buyer_tendered_cash_amount": 0,
            "card": {
                "billing_address": {},
                "bin": "",
                "card_brand": "",
                "card_type": "",
                "cardholder_name": "",
                "customer_id": "",
                "enabled": False,
                "exp_month": 0,
                "exp_year": 0,
                "fingerprint": "",
                "id": "",
                "last_4": "",
                "merchant_id": "",
                "prepaid_type": "",
                "reference_id": "",
                "version": ""
            },
            "card_entry_method": "",
            "card_status": "",
            "change_back_cash_amount": 0,
            "currency": "",
            "id": "",
            "location_id": "",
            "name": "",
            "note": "",
            "payment_id": "",
            "percentage": "",
            "total_amount": 0,
            "total_discount": 0,
            "total_processing_fee": 0,
            "total_refund": 0,
            "total_service_charge": 0,
            "total_tax": 0,
            "total_tip": 0,
            "transaction_id": "",
            "type": ""
        }
    ],
    "title": "",
    "total_amount": 0,
    "total_discount": 0,
    "total_refund": 0,
    "total_service_charge": 0,
    "total_tax": 0,
    "total_tip": 0,
    "updated_at": "",
    "updated_by": "",
    "version": "",
    "voided": False,
    "voided_at": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/orders/:id"

payload <- "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/orders/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/pos/orders/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"closed_date\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"customers\": [\n    {\n      \"emails\": [\n        {\n          \"email\": \"\",\n          \"id\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"phone_numbers\": [\n        {\n          \"area_code\": \"\",\n          \"country_code\": \"\",\n          \"extension\": \"\",\n          \"id\": \"\",\n          \"number\": \"\",\n          \"type\": \"\"\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"product_id\": \"\",\n      \"scope\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_id\": \"\",\n  \"fulfillments\": [\n    {\n      \"id\": \"\",\n      \"pickup_details\": {\n        \"accepted_at\": \"\",\n        \"auto_complete_duration\": \"\",\n        \"cancel_reason\": \"\",\n        \"canceled_at\": \"\",\n        \"curbside_pickup_details\": {\n          \"buyer_arrived_at\": \"\",\n          \"curbside_details\": \"\"\n        },\n        \"expired_at\": \"\",\n        \"expires_at\": \"\",\n        \"is_curbside_pickup\": false,\n        \"note\": \"\",\n        \"picked_up_at\": \"\",\n        \"pickup_at\": \"\",\n        \"pickup_window_duration\": \"\",\n        \"placed_at\": \"\",\n        \"prep_time_duration\": \"\",\n        \"ready_at\": \"\",\n        \"recipient\": {\n          \"address\": {\n            \"city\": \"\",\n            \"contact_name\": \"\",\n            \"country\": \"\",\n            \"county\": \"\",\n            \"email\": \"\",\n            \"fax\": \"\",\n            \"id\": \"\",\n            \"latitude\": \"\",\n            \"line1\": \"\",\n            \"line2\": \"\",\n            \"line3\": \"\",\n            \"line4\": \"\",\n            \"longitude\": \"\",\n            \"name\": \"\",\n            \"phone_number\": \"\",\n            \"postal_code\": \"\",\n            \"row_version\": \"\",\n            \"salutation\": \"\",\n            \"state\": \"\",\n            \"street_number\": \"\",\n            \"string\": \"\",\n            \"type\": \"\",\n            \"website\": \"\"\n          },\n          \"customer_id\": \"\",\n          \"display_name\": \"\",\n          \"email\": {},\n          \"phone_number\": {}\n        },\n        \"rejected_at\": \"\",\n        \"schedule_type\": \"\"\n      },\n      \"shipment_details\": {},\n      \"status\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"line_items\": [\n    {\n      \"applied_discounts\": [],\n      \"applied_taxes\": [],\n      \"id\": \"\",\n      \"item\": \"\",\n      \"modifiers\": [],\n      \"name\": \"\",\n      \"quantity\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_tax\": 0,\n      \"unit_price\": \"\"\n    }\n  ],\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"note\": \"\",\n  \"order_date\": \"\",\n  \"order_number\": \"\",\n  \"order_type_id\": \"\",\n  \"payment_status\": \"\",\n  \"payments\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\"\n    }\n  ],\n  \"reference_id\": \"\",\n  \"refunded\": false,\n  \"refunds\": [\n    {\n      \"amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"reason\": \"\",\n      \"status\": \"\",\n      \"tender_id\": \"\",\n      \"transaction_id\": \"\"\n    }\n  ],\n  \"seat\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"status\": \"\",\n  \"table\": \"\",\n  \"taxes\": [],\n  \"tenders\": [\n    {\n      \"amount\": \"\",\n      \"buyer_tendered_cash_amount\": 0,\n      \"card\": {\n        \"billing_address\": {},\n        \"bin\": \"\",\n        \"card_brand\": \"\",\n        \"card_type\": \"\",\n        \"cardholder_name\": \"\",\n        \"customer_id\": \"\",\n        \"enabled\": false,\n        \"exp_month\": 0,\n        \"exp_year\": 0,\n        \"fingerprint\": \"\",\n        \"id\": \"\",\n        \"last_4\": \"\",\n        \"merchant_id\": \"\",\n        \"prepaid_type\": \"\",\n        \"reference_id\": \"\",\n        \"version\": \"\"\n      },\n      \"card_entry_method\": \"\",\n      \"card_status\": \"\",\n      \"change_back_cash_amount\": 0,\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"location_id\": \"\",\n      \"name\": \"\",\n      \"note\": \"\",\n      \"payment_id\": \"\",\n      \"percentage\": \"\",\n      \"total_amount\": 0,\n      \"total_discount\": 0,\n      \"total_processing_fee\": 0,\n      \"total_refund\": 0,\n      \"total_service_charge\": 0,\n      \"total_tax\": 0,\n      \"total_tip\": 0,\n      \"transaction_id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"title\": \"\",\n  \"total_amount\": 0,\n  \"total_discount\": 0,\n  \"total_refund\": 0,\n  \"total_service_charge\": 0,\n  \"total_tax\": 0,\n  \"total_tip\": 0,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"version\": \"\",\n  \"voided\": false,\n  \"voided_at\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/orders/:id";

    let payload = json!({
        "closed_date": "",
        "created_at": "",
        "created_by": "",
        "currency": "",
        "customer_id": "",
        "customers": (
            json!({
                "emails": (
                    json!({
                        "email": "",
                        "id": "",
                        "type": ""
                    })
                ),
                "first_name": "",
                "id": "",
                "last_name": "",
                "middle_name": "",
                "phone_numbers": (
                    json!({
                        "area_code": "",
                        "country_code": "",
                        "extension": "",
                        "id": "",
                        "number": "",
                        "type": ""
                    })
                )
            })
        ),
        "discounts": (
            json!({
                "amount": 0,
                "currency": "",
                "id": "",
                "name": "",
                "product_id": "",
                "scope": "",
                "type": ""
            })
        ),
        "employee_id": "",
        "fulfillments": (
            json!({
                "id": "",
                "pickup_details": json!({
                    "accepted_at": "",
                    "auto_complete_duration": "",
                    "cancel_reason": "",
                    "canceled_at": "",
                    "curbside_pickup_details": json!({
                        "buyer_arrived_at": "",
                        "curbside_details": ""
                    }),
                    "expired_at": "",
                    "expires_at": "",
                    "is_curbside_pickup": false,
                    "note": "",
                    "picked_up_at": "",
                    "pickup_at": "",
                    "pickup_window_duration": "",
                    "placed_at": "",
                    "prep_time_duration": "",
                    "ready_at": "",
                    "recipient": json!({
                        "address": json!({
                            "city": "",
                            "contact_name": "",
                            "country": "",
                            "county": "",
                            "email": "",
                            "fax": "",
                            "id": "",
                            "latitude": "",
                            "line1": "",
                            "line2": "",
                            "line3": "",
                            "line4": "",
                            "longitude": "",
                            "name": "",
                            "phone_number": "",
                            "postal_code": "",
                            "row_version": "",
                            "salutation": "",
                            "state": "",
                            "street_number": "",
                            "string": "",
                            "type": "",
                            "website": ""
                        }),
                        "customer_id": "",
                        "display_name": "",
                        "email": json!({}),
                        "phone_number": json!({})
                    }),
                    "rejected_at": "",
                    "schedule_type": ""
                }),
                "shipment_details": json!({}),
                "status": "",
                "type": ""
            })
        ),
        "id": "",
        "idempotency_key": "",
        "line_items": (
            json!({
                "applied_discounts": (),
                "applied_taxes": (),
                "id": "",
                "item": "",
                "modifiers": (),
                "name": "",
                "quantity": "",
                "total_amount": 0,
                "total_discount": 0,
                "total_tax": 0,
                "unit_price": ""
            })
        ),
        "location_id": "",
        "merchant_id": "",
        "note": "",
        "order_date": "",
        "order_number": "",
        "order_type_id": "",
        "payment_status": "",
        "payments": (
            json!({
                "amount": 0,
                "currency": "",
                "id": ""
            })
        ),
        "reference_id": "",
        "refunded": false,
        "refunds": (
            json!({
                "amount": 0,
                "currency": "",
                "id": "",
                "location_id": "",
                "reason": "",
                "status": "",
                "tender_id": "",
                "transaction_id": ""
            })
        ),
        "seat": "",
        "service_charges": (
            json!({
                "active": false,
                "amount": "",
                "currency": "",
                "id": "",
                "name": "",
                "percentage": "",
                "type": ""
            })
        ),
        "source": "",
        "status": "",
        "table": "",
        "taxes": (),
        "tenders": (
            json!({
                "amount": "",
                "buyer_tendered_cash_amount": 0,
                "card": json!({
                    "billing_address": json!({}),
                    "bin": "",
                    "card_brand": "",
                    "card_type": "",
                    "cardholder_name": "",
                    "customer_id": "",
                    "enabled": false,
                    "exp_month": 0,
                    "exp_year": 0,
                    "fingerprint": "",
                    "id": "",
                    "last_4": "",
                    "merchant_id": "",
                    "prepaid_type": "",
                    "reference_id": "",
                    "version": ""
                }),
                "card_entry_method": "",
                "card_status": "",
                "change_back_cash_amount": 0,
                "currency": "",
                "id": "",
                "location_id": "",
                "name": "",
                "note": "",
                "payment_id": "",
                "percentage": "",
                "total_amount": 0,
                "total_discount": 0,
                "total_processing_fee": 0,
                "total_refund": 0,
                "total_service_charge": 0,
                "total_tax": 0,
                "total_tip": 0,
                "transaction_id": "",
                "type": ""
            })
        ),
        "title": "",
        "total_amount": 0,
        "total_discount": 0,
        "total_refund": 0,
        "total_service_charge": 0,
        "total_tax": 0,
        "total_tip": 0,
        "updated_at": "",
        "updated_by": "",
        "version": "",
        "voided": false,
        "voided_at": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/pos/orders/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}'
echo '{
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    {
      "emails": [
        {
          "email": "",
          "id": "",
          "type": ""
        }
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        {
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        }
      ]
    }
  ],
  "discounts": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    }
  ],
  "employee_id": "",
  "fulfillments": [
    {
      "id": "",
      "pickup_details": {
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": {
          "buyer_arrived_at": "",
          "curbside_details": ""
        },
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": {
          "address": {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          },
          "customer_id": "",
          "display_name": "",
          "email": {},
          "phone_number": {}
        },
        "rejected_at": "",
        "schedule_type": ""
      },
      "shipment_details": {},
      "status": "",
      "type": ""
    }
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    {
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    }
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    {
      "amount": 0,
      "currency": "",
      "id": ""
    }
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    {
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    }
  ],
  "seat": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    {
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": {
        "billing_address": {},
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      },
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    }
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
}' |  \
  http PATCH {{baseUrl}}/pos/orders/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "closed_date": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "customers": [\n    {\n      "emails": [\n        {\n          "email": "",\n          "id": "",\n          "type": ""\n        }\n      ],\n      "first_name": "",\n      "id": "",\n      "last_name": "",\n      "middle_name": "",\n      "phone_numbers": [\n        {\n          "area_code": "",\n          "country_code": "",\n          "extension": "",\n          "id": "",\n          "number": "",\n          "type": ""\n        }\n      ]\n    }\n  ],\n  "discounts": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "name": "",\n      "product_id": "",\n      "scope": "",\n      "type": ""\n    }\n  ],\n  "employee_id": "",\n  "fulfillments": [\n    {\n      "id": "",\n      "pickup_details": {\n        "accepted_at": "",\n        "auto_complete_duration": "",\n        "cancel_reason": "",\n        "canceled_at": "",\n        "curbside_pickup_details": {\n          "buyer_arrived_at": "",\n          "curbside_details": ""\n        },\n        "expired_at": "",\n        "expires_at": "",\n        "is_curbside_pickup": false,\n        "note": "",\n        "picked_up_at": "",\n        "pickup_at": "",\n        "pickup_window_duration": "",\n        "placed_at": "",\n        "prep_time_duration": "",\n        "ready_at": "",\n        "recipient": {\n          "address": {\n            "city": "",\n            "contact_name": "",\n            "country": "",\n            "county": "",\n            "email": "",\n            "fax": "",\n            "id": "",\n            "latitude": "",\n            "line1": "",\n            "line2": "",\n            "line3": "",\n            "line4": "",\n            "longitude": "",\n            "name": "",\n            "phone_number": "",\n            "postal_code": "",\n            "row_version": "",\n            "salutation": "",\n            "state": "",\n            "street_number": "",\n            "string": "",\n            "type": "",\n            "website": ""\n          },\n          "customer_id": "",\n          "display_name": "",\n          "email": {},\n          "phone_number": {}\n        },\n        "rejected_at": "",\n        "schedule_type": ""\n      },\n      "shipment_details": {},\n      "status": "",\n      "type": ""\n    }\n  ],\n  "id": "",\n  "idempotency_key": "",\n  "line_items": [\n    {\n      "applied_discounts": [],\n      "applied_taxes": [],\n      "id": "",\n      "item": "",\n      "modifiers": [],\n      "name": "",\n      "quantity": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_tax": 0,\n      "unit_price": ""\n    }\n  ],\n  "location_id": "",\n  "merchant_id": "",\n  "note": "",\n  "order_date": "",\n  "order_number": "",\n  "order_type_id": "",\n  "payment_status": "",\n  "payments": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": ""\n    }\n  ],\n  "reference_id": "",\n  "refunded": false,\n  "refunds": [\n    {\n      "amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "reason": "",\n      "status": "",\n      "tender_id": "",\n      "transaction_id": ""\n    }\n  ],\n  "seat": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "status": "",\n  "table": "",\n  "taxes": [],\n  "tenders": [\n    {\n      "amount": "",\n      "buyer_tendered_cash_amount": 0,\n      "card": {\n        "billing_address": {},\n        "bin": "",\n        "card_brand": "",\n        "card_type": "",\n        "cardholder_name": "",\n        "customer_id": "",\n        "enabled": false,\n        "exp_month": 0,\n        "exp_year": 0,\n        "fingerprint": "",\n        "id": "",\n        "last_4": "",\n        "merchant_id": "",\n        "prepaid_type": "",\n        "reference_id": "",\n        "version": ""\n      },\n      "card_entry_method": "",\n      "card_status": "",\n      "change_back_cash_amount": 0,\n      "currency": "",\n      "id": "",\n      "location_id": "",\n      "name": "",\n      "note": "",\n      "payment_id": "",\n      "percentage": "",\n      "total_amount": 0,\n      "total_discount": 0,\n      "total_processing_fee": 0,\n      "total_refund": 0,\n      "total_service_charge": 0,\n      "total_tax": 0,\n      "total_tip": 0,\n      "transaction_id": "",\n      "type": ""\n    }\n  ],\n  "title": "",\n  "total_amount": 0,\n  "total_discount": 0,\n  "total_refund": 0,\n  "total_service_charge": 0,\n  "total_tax": 0,\n  "total_tip": 0,\n  "updated_at": "",\n  "updated_by": "",\n  "version": "",\n  "voided": false,\n  "voided_at": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/orders/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "closed_date": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "customers": [
    [
      "emails": [
        [
          "email": "",
          "id": "",
          "type": ""
        ]
      ],
      "first_name": "",
      "id": "",
      "last_name": "",
      "middle_name": "",
      "phone_numbers": [
        [
          "area_code": "",
          "country_code": "",
          "extension": "",
          "id": "",
          "number": "",
          "type": ""
        ]
      ]
    ]
  ],
  "discounts": [
    [
      "amount": 0,
      "currency": "",
      "id": "",
      "name": "",
      "product_id": "",
      "scope": "",
      "type": ""
    ]
  ],
  "employee_id": "",
  "fulfillments": [
    [
      "id": "",
      "pickup_details": [
        "accepted_at": "",
        "auto_complete_duration": "",
        "cancel_reason": "",
        "canceled_at": "",
        "curbside_pickup_details": [
          "buyer_arrived_at": "",
          "curbside_details": ""
        ],
        "expired_at": "",
        "expires_at": "",
        "is_curbside_pickup": false,
        "note": "",
        "picked_up_at": "",
        "pickup_at": "",
        "pickup_window_duration": "",
        "placed_at": "",
        "prep_time_duration": "",
        "ready_at": "",
        "recipient": [
          "address": [
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
          ],
          "customer_id": "",
          "display_name": "",
          "email": [],
          "phone_number": []
        ],
        "rejected_at": "",
        "schedule_type": ""
      ],
      "shipment_details": [],
      "status": "",
      "type": ""
    ]
  ],
  "id": "",
  "idempotency_key": "",
  "line_items": [
    [
      "applied_discounts": [],
      "applied_taxes": [],
      "id": "",
      "item": "",
      "modifiers": [],
      "name": "",
      "quantity": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_tax": 0,
      "unit_price": ""
    ]
  ],
  "location_id": "",
  "merchant_id": "",
  "note": "",
  "order_date": "",
  "order_number": "",
  "order_type_id": "",
  "payment_status": "",
  "payments": [
    [
      "amount": 0,
      "currency": "",
      "id": ""
    ]
  ],
  "reference_id": "",
  "refunded": false,
  "refunds": [
    [
      "amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "reason": "",
      "status": "",
      "tender_id": "",
      "transaction_id": ""
    ]
  ],
  "seat": "",
  "service_charges": [
    [
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    ]
  ],
  "source": "",
  "status": "",
  "table": "",
  "taxes": [],
  "tenders": [
    [
      "amount": "",
      "buyer_tendered_cash_amount": 0,
      "card": [
        "billing_address": [],
        "bin": "",
        "card_brand": "",
        "card_type": "",
        "cardholder_name": "",
        "customer_id": "",
        "enabled": false,
        "exp_month": 0,
        "exp_year": 0,
        "fingerprint": "",
        "id": "",
        "last_4": "",
        "merchant_id": "",
        "prepaid_type": "",
        "reference_id": "",
        "version": ""
      ],
      "card_entry_method": "",
      "card_status": "",
      "change_back_cash_amount": 0,
      "currency": "",
      "id": "",
      "location_id": "",
      "name": "",
      "note": "",
      "payment_id": "",
      "percentage": "",
      "total_amount": 0,
      "total_discount": 0,
      "total_processing_fee": 0,
      "total_refund": 0,
      "total_service_charge": 0,
      "total_tax": 0,
      "total_tip": 0,
      "transaction_id": "",
      "type": ""
    ]
  ],
  "title": "",
  "total_amount": 0,
  "total_discount": 0,
  "total_refund": 0,
  "total_service_charge": 0,
  "total_tax": 0,
  "total_tip": 0,
  "updated_at": "",
  "updated_by": "",
  "version": "",
  "voided": false,
  "voided_at": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/orders/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "orders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create Payment
{{baseUrl}}/pos/payments
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/payments");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/payments" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}
                                                         :content-type :json
                                                         :form-params {:amount ""
                                                                       :app_fee ""
                                                                       :approved ""
                                                                       :bank_account {:account_ownership_type ""
                                                                                      :ach_details {:account_number_suffix ""
                                                                                                    :account_type ""
                                                                                                    :routing_number ""}
                                                                                      :bank_name ""
                                                                                      :country ""
                                                                                      :fingerprint ""
                                                                                      :statement_description ""
                                                                                      :transfer_type ""}
                                                                       :card_details {:card {:billing_address {:city ""
                                                                                                               :contact_name ""
                                                                                                               :country ""
                                                                                                               :county ""
                                                                                                               :email ""
                                                                                                               :fax ""
                                                                                                               :id ""
                                                                                                               :latitude ""
                                                                                                               :line1 ""
                                                                                                               :line2 ""
                                                                                                               :line3 ""
                                                                                                               :line4 ""
                                                                                                               :longitude ""
                                                                                                               :name ""
                                                                                                               :phone_number ""
                                                                                                               :postal_code ""
                                                                                                               :row_version ""
                                                                                                               :salutation ""
                                                                                                               :state ""
                                                                                                               :street_number ""
                                                                                                               :string ""
                                                                                                               :type ""
                                                                                                               :website ""}
                                                                                             :bin ""
                                                                                             :card_brand ""
                                                                                             :card_type ""
                                                                                             :cardholder_name ""
                                                                                             :customer_id ""
                                                                                             :enabled false
                                                                                             :exp_month 0
                                                                                             :exp_year 0
                                                                                             :fingerprint ""
                                                                                             :id ""
                                                                                             :last_4 ""
                                                                                             :merchant_id ""
                                                                                             :prepaid_type ""
                                                                                             :reference_id ""
                                                                                             :version ""}}
                                                                       :cash {:amount ""
                                                                              :charge_back_amount ""}
                                                                       :change_back_cash_amount ""
                                                                       :created_at ""
                                                                       :created_by ""
                                                                       :currency ""
                                                                       :customer_id ""
                                                                       :device_id ""
                                                                       :employee_id ""
                                                                       :external_details {:source ""
                                                                                          :source_fee_amount ""
                                                                                          :source_id ""
                                                                                          :type ""}
                                                                       :external_payment_id ""
                                                                       :id ""
                                                                       :idempotency_key ""
                                                                       :location_id ""
                                                                       :merchant_id ""
                                                                       :order_id ""
                                                                       :processing_fees []
                                                                       :refunded ""
                                                                       :service_charges [{:active false
                                                                                          :amount ""
                                                                                          :currency ""
                                                                                          :id ""
                                                                                          :name ""
                                                                                          :percentage ""
                                                                                          :type ""}]
                                                                       :source ""
                                                                       :source_id ""
                                                                       :status ""
                                                                       :tax ""
                                                                       :tender_id ""
                                                                       :tip ""
                                                                       :total ""
                                                                       :updated_at ""
                                                                       :updated_by ""
                                                                       :wallet {:status ""}}})
require "http/client"

url = "{{baseUrl}}/pos/payments"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/payments"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/payments");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/payments"

	payload := strings.NewReader("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/payments HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 2162

{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/payments")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/payments"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/payments")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/payments")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  amount: '',
  app_fee: '',
  approved: '',
  bank_account: {
    account_ownership_type: '',
    ach_details: {
      account_number_suffix: '',
      account_type: '',
      routing_number: ''
    },
    bank_name: '',
    country: '',
    fingerprint: '',
    statement_description: '',
    transfer_type: ''
  },
  card_details: {
    card: {
      billing_address: {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      },
      bin: '',
      card_brand: '',
      card_type: '',
      cardholder_name: '',
      customer_id: '',
      enabled: false,
      exp_month: 0,
      exp_year: 0,
      fingerprint: '',
      id: '',
      last_4: '',
      merchant_id: '',
      prepaid_type: '',
      reference_id: '',
      version: ''
    }
  },
  cash: {
    amount: '',
    charge_back_amount: ''
  },
  change_back_cash_amount: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  device_id: '',
  employee_id: '',
  external_details: {
    source: '',
    source_fee_amount: '',
    source_id: '',
    type: ''
  },
  external_payment_id: '',
  id: '',
  idempotency_key: '',
  location_id: '',
  merchant_id: '',
  order_id: '',
  processing_fees: [],
  refunded: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  source_id: '',
  status: '',
  tax: '',
  tender_id: '',
  tip: '',
  total: '',
  updated_at: '',
  updated_by: '',
  wallet: {
    status: ''
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/payments');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/payments',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    amount: '',
    app_fee: '',
    approved: '',
    bank_account: {
      account_ownership_type: '',
      ach_details: {account_number_suffix: '', account_type: '', routing_number: ''},
      bank_name: '',
      country: '',
      fingerprint: '',
      statement_description: '',
      transfer_type: ''
    },
    card_details: {
      card: {
        billing_address: {
          city: '',
          contact_name: '',
          country: '',
          county: '',
          email: '',
          fax: '',
          id: '',
          latitude: '',
          line1: '',
          line2: '',
          line3: '',
          line4: '',
          longitude: '',
          name: '',
          phone_number: '',
          postal_code: '',
          row_version: '',
          salutation: '',
          state: '',
          street_number: '',
          string: '',
          type: '',
          website: ''
        },
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      }
    },
    cash: {amount: '', charge_back_amount: ''},
    change_back_cash_amount: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    device_id: '',
    employee_id: '',
    external_details: {source: '', source_fee_amount: '', source_id: '', type: ''},
    external_payment_id: '',
    id: '',
    idempotency_key: '',
    location_id: '',
    merchant_id: '',
    order_id: '',
    processing_fees: [],
    refunded: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    source_id: '',
    status: '',
    tax: '',
    tender_id: '',
    tip: '',
    total: '',
    updated_at: '',
    updated_by: '',
    wallet: {status: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/payments';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"amount":"","app_fee":"","approved":"","bank_account":{"account_ownership_type":"","ach_details":{"account_number_suffix":"","account_type":"","routing_number":""},"bank_name":"","country":"","fingerprint":"","statement_description":"","transfer_type":""},"card_details":{"card":{"billing_address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""}},"cash":{"amount":"","charge_back_amount":""},"change_back_cash_amount":"","created_at":"","created_by":"","currency":"","customer_id":"","device_id":"","employee_id":"","external_details":{"source":"","source_fee_amount":"","source_id":"","type":""},"external_payment_id":"","id":"","idempotency_key":"","location_id":"","merchant_id":"","order_id":"","processing_fees":[],"refunded":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","source_id":"","status":"","tax":"","tender_id":"","tip":"","total":"","updated_at":"","updated_by":"","wallet":{"status":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/payments',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "amount": "",\n  "app_fee": "",\n  "approved": "",\n  "bank_account": {\n    "account_ownership_type": "",\n    "ach_details": {\n      "account_number_suffix": "",\n      "account_type": "",\n      "routing_number": ""\n    },\n    "bank_name": "",\n    "country": "",\n    "fingerprint": "",\n    "statement_description": "",\n    "transfer_type": ""\n  },\n  "card_details": {\n    "card": {\n      "billing_address": {\n        "city": "",\n        "contact_name": "",\n        "country": "",\n        "county": "",\n        "email": "",\n        "fax": "",\n        "id": "",\n        "latitude": "",\n        "line1": "",\n        "line2": "",\n        "line3": "",\n        "line4": "",\n        "longitude": "",\n        "name": "",\n        "phone_number": "",\n        "postal_code": "",\n        "row_version": "",\n        "salutation": "",\n        "state": "",\n        "street_number": "",\n        "string": "",\n        "type": "",\n        "website": ""\n      },\n      "bin": "",\n      "card_brand": "",\n      "card_type": "",\n      "cardholder_name": "",\n      "customer_id": "",\n      "enabled": false,\n      "exp_month": 0,\n      "exp_year": 0,\n      "fingerprint": "",\n      "id": "",\n      "last_4": "",\n      "merchant_id": "",\n      "prepaid_type": "",\n      "reference_id": "",\n      "version": ""\n    }\n  },\n  "cash": {\n    "amount": "",\n    "charge_back_amount": ""\n  },\n  "change_back_cash_amount": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "device_id": "",\n  "employee_id": "",\n  "external_details": {\n    "source": "",\n    "source_fee_amount": "",\n    "source_id": "",\n    "type": ""\n  },\n  "external_payment_id": "",\n  "id": "",\n  "idempotency_key": "",\n  "location_id": "",\n  "merchant_id": "",\n  "order_id": "",\n  "processing_fees": [],\n  "refunded": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "source_id": "",\n  "status": "",\n  "tax": "",\n  "tender_id": "",\n  "tip": "",\n  "total": "",\n  "updated_at": "",\n  "updated_by": "",\n  "wallet": {\n    "status": ""\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/payments")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/payments',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  amount: '',
  app_fee: '',
  approved: '',
  bank_account: {
    account_ownership_type: '',
    ach_details: {account_number_suffix: '', account_type: '', routing_number: ''},
    bank_name: '',
    country: '',
    fingerprint: '',
    statement_description: '',
    transfer_type: ''
  },
  card_details: {
    card: {
      billing_address: {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      },
      bin: '',
      card_brand: '',
      card_type: '',
      cardholder_name: '',
      customer_id: '',
      enabled: false,
      exp_month: 0,
      exp_year: 0,
      fingerprint: '',
      id: '',
      last_4: '',
      merchant_id: '',
      prepaid_type: '',
      reference_id: '',
      version: ''
    }
  },
  cash: {amount: '', charge_back_amount: ''},
  change_back_cash_amount: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  device_id: '',
  employee_id: '',
  external_details: {source: '', source_fee_amount: '', source_id: '', type: ''},
  external_payment_id: '',
  id: '',
  idempotency_key: '',
  location_id: '',
  merchant_id: '',
  order_id: '',
  processing_fees: [],
  refunded: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  source_id: '',
  status: '',
  tax: '',
  tender_id: '',
  tip: '',
  total: '',
  updated_at: '',
  updated_by: '',
  wallet: {status: ''}
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/payments',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    amount: '',
    app_fee: '',
    approved: '',
    bank_account: {
      account_ownership_type: '',
      ach_details: {account_number_suffix: '', account_type: '', routing_number: ''},
      bank_name: '',
      country: '',
      fingerprint: '',
      statement_description: '',
      transfer_type: ''
    },
    card_details: {
      card: {
        billing_address: {
          city: '',
          contact_name: '',
          country: '',
          county: '',
          email: '',
          fax: '',
          id: '',
          latitude: '',
          line1: '',
          line2: '',
          line3: '',
          line4: '',
          longitude: '',
          name: '',
          phone_number: '',
          postal_code: '',
          row_version: '',
          salutation: '',
          state: '',
          street_number: '',
          string: '',
          type: '',
          website: ''
        },
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      }
    },
    cash: {amount: '', charge_back_amount: ''},
    change_back_cash_amount: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    device_id: '',
    employee_id: '',
    external_details: {source: '', source_fee_amount: '', source_id: '', type: ''},
    external_payment_id: '',
    id: '',
    idempotency_key: '',
    location_id: '',
    merchant_id: '',
    order_id: '',
    processing_fees: [],
    refunded: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    source_id: '',
    status: '',
    tax: '',
    tender_id: '',
    tip: '',
    total: '',
    updated_at: '',
    updated_by: '',
    wallet: {status: ''}
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/payments');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  amount: '',
  app_fee: '',
  approved: '',
  bank_account: {
    account_ownership_type: '',
    ach_details: {
      account_number_suffix: '',
      account_type: '',
      routing_number: ''
    },
    bank_name: '',
    country: '',
    fingerprint: '',
    statement_description: '',
    transfer_type: ''
  },
  card_details: {
    card: {
      billing_address: {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      },
      bin: '',
      card_brand: '',
      card_type: '',
      cardholder_name: '',
      customer_id: '',
      enabled: false,
      exp_month: 0,
      exp_year: 0,
      fingerprint: '',
      id: '',
      last_4: '',
      merchant_id: '',
      prepaid_type: '',
      reference_id: '',
      version: ''
    }
  },
  cash: {
    amount: '',
    charge_back_amount: ''
  },
  change_back_cash_amount: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  device_id: '',
  employee_id: '',
  external_details: {
    source: '',
    source_fee_amount: '',
    source_id: '',
    type: ''
  },
  external_payment_id: '',
  id: '',
  idempotency_key: '',
  location_id: '',
  merchant_id: '',
  order_id: '',
  processing_fees: [],
  refunded: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  source_id: '',
  status: '',
  tax: '',
  tender_id: '',
  tip: '',
  total: '',
  updated_at: '',
  updated_by: '',
  wallet: {
    status: ''
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/payments',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    amount: '',
    app_fee: '',
    approved: '',
    bank_account: {
      account_ownership_type: '',
      ach_details: {account_number_suffix: '', account_type: '', routing_number: ''},
      bank_name: '',
      country: '',
      fingerprint: '',
      statement_description: '',
      transfer_type: ''
    },
    card_details: {
      card: {
        billing_address: {
          city: '',
          contact_name: '',
          country: '',
          county: '',
          email: '',
          fax: '',
          id: '',
          latitude: '',
          line1: '',
          line2: '',
          line3: '',
          line4: '',
          longitude: '',
          name: '',
          phone_number: '',
          postal_code: '',
          row_version: '',
          salutation: '',
          state: '',
          street_number: '',
          string: '',
          type: '',
          website: ''
        },
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      }
    },
    cash: {amount: '', charge_back_amount: ''},
    change_back_cash_amount: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    device_id: '',
    employee_id: '',
    external_details: {source: '', source_fee_amount: '', source_id: '', type: ''},
    external_payment_id: '',
    id: '',
    idempotency_key: '',
    location_id: '',
    merchant_id: '',
    order_id: '',
    processing_fees: [],
    refunded: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    source_id: '',
    status: '',
    tax: '',
    tender_id: '',
    tip: '',
    total: '',
    updated_at: '',
    updated_by: '',
    wallet: {status: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/payments';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"amount":"","app_fee":"","approved":"","bank_account":{"account_ownership_type":"","ach_details":{"account_number_suffix":"","account_type":"","routing_number":""},"bank_name":"","country":"","fingerprint":"","statement_description":"","transfer_type":""},"card_details":{"card":{"billing_address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""}},"cash":{"amount":"","charge_back_amount":""},"change_back_cash_amount":"","created_at":"","created_by":"","currency":"","customer_id":"","device_id":"","employee_id":"","external_details":{"source":"","source_fee_amount":"","source_id":"","type":""},"external_payment_id":"","id":"","idempotency_key":"","location_id":"","merchant_id":"","order_id":"","processing_fees":[],"refunded":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","source_id":"","status":"","tax":"","tender_id":"","tip":"","total":"","updated_at":"","updated_by":"","wallet":{"status":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @"",
                              @"app_fee": @"",
                              @"approved": @"",
                              @"bank_account": @{ @"account_ownership_type": @"", @"ach_details": @{ @"account_number_suffix": @"", @"account_type": @"", @"routing_number": @"" }, @"bank_name": @"", @"country": @"", @"fingerprint": @"", @"statement_description": @"", @"transfer_type": @"" },
                              @"card_details": @{ @"card": @{ @"billing_address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" }, @"bin": @"", @"card_brand": @"", @"card_type": @"", @"cardholder_name": @"", @"customer_id": @"", @"enabled": @NO, @"exp_month": @0, @"exp_year": @0, @"fingerprint": @"", @"id": @"", @"last_4": @"", @"merchant_id": @"", @"prepaid_type": @"", @"reference_id": @"", @"version": @"" } },
                              @"cash": @{ @"amount": @"", @"charge_back_amount": @"" },
                              @"change_back_cash_amount": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"customer_id": @"",
                              @"device_id": @"",
                              @"employee_id": @"",
                              @"external_details": @{ @"source": @"", @"source_fee_amount": @"", @"source_id": @"", @"type": @"" },
                              @"external_payment_id": @"",
                              @"id": @"",
                              @"idempotency_key": @"",
                              @"location_id": @"",
                              @"merchant_id": @"",
                              @"order_id": @"",
                              @"processing_fees": @[  ],
                              @"refunded": @"",
                              @"service_charges": @[ @{ @"active": @NO, @"amount": @"", @"currency": @"", @"id": @"", @"name": @"", @"percentage": @"", @"type": @"" } ],
                              @"source": @"",
                              @"source_id": @"",
                              @"status": @"",
                              @"tax": @"",
                              @"tender_id": @"",
                              @"tip": @"",
                              @"total": @"",
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"wallet": @{ @"status": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/payments"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/payments" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/payments",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'amount' => '',
    'app_fee' => '',
    'approved' => '',
    'bank_account' => [
        'account_ownership_type' => '',
        'ach_details' => [
                'account_number_suffix' => '',
                'account_type' => '',
                'routing_number' => ''
        ],
        'bank_name' => '',
        'country' => '',
        'fingerprint' => '',
        'statement_description' => '',
        'transfer_type' => ''
    ],
    'card_details' => [
        'card' => [
                'billing_address' => [
                                'city' => '',
                                'contact_name' => '',
                                'country' => '',
                                'county' => '',
                                'email' => '',
                                'fax' => '',
                                'id' => '',
                                'latitude' => '',
                                'line1' => '',
                                'line2' => '',
                                'line3' => '',
                                'line4' => '',
                                'longitude' => '',
                                'name' => '',
                                'phone_number' => '',
                                'postal_code' => '',
                                'row_version' => '',
                                'salutation' => '',
                                'state' => '',
                                'street_number' => '',
                                'string' => '',
                                'type' => '',
                                'website' => ''
                ],
                'bin' => '',
                'card_brand' => '',
                'card_type' => '',
                'cardholder_name' => '',
                'customer_id' => '',
                'enabled' => null,
                'exp_month' => 0,
                'exp_year' => 0,
                'fingerprint' => '',
                'id' => '',
                'last_4' => '',
                'merchant_id' => '',
                'prepaid_type' => '',
                'reference_id' => '',
                'version' => ''
        ]
    ],
    'cash' => [
        'amount' => '',
        'charge_back_amount' => ''
    ],
    'change_back_cash_amount' => '',
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'customer_id' => '',
    'device_id' => '',
    'employee_id' => '',
    'external_details' => [
        'source' => '',
        'source_fee_amount' => '',
        'source_id' => '',
        'type' => ''
    ],
    'external_payment_id' => '',
    'id' => '',
    'idempotency_key' => '',
    'location_id' => '',
    'merchant_id' => '',
    'order_id' => '',
    'processing_fees' => [
        
    ],
    'refunded' => '',
    'service_charges' => [
        [
                'active' => null,
                'amount' => '',
                'currency' => '',
                'id' => '',
                'name' => '',
                'percentage' => '',
                'type' => ''
        ]
    ],
    'source' => '',
    'source_id' => '',
    'status' => '',
    'tax' => '',
    'tender_id' => '',
    'tip' => '',
    'total' => '',
    'updated_at' => '',
    'updated_by' => '',
    'wallet' => [
        'status' => ''
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/payments', [
  'body' => '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/payments');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'amount' => '',
  'app_fee' => '',
  'approved' => '',
  'bank_account' => [
    'account_ownership_type' => '',
    'ach_details' => [
        'account_number_suffix' => '',
        'account_type' => '',
        'routing_number' => ''
    ],
    'bank_name' => '',
    'country' => '',
    'fingerprint' => '',
    'statement_description' => '',
    'transfer_type' => ''
  ],
  'card_details' => [
    'card' => [
        'billing_address' => [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ],
        'bin' => '',
        'card_brand' => '',
        'card_type' => '',
        'cardholder_name' => '',
        'customer_id' => '',
        'enabled' => null,
        'exp_month' => 0,
        'exp_year' => 0,
        'fingerprint' => '',
        'id' => '',
        'last_4' => '',
        'merchant_id' => '',
        'prepaid_type' => '',
        'reference_id' => '',
        'version' => ''
    ]
  ],
  'cash' => [
    'amount' => '',
    'charge_back_amount' => ''
  ],
  'change_back_cash_amount' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'device_id' => '',
  'employee_id' => '',
  'external_details' => [
    'source' => '',
    'source_fee_amount' => '',
    'source_id' => '',
    'type' => ''
  ],
  'external_payment_id' => '',
  'id' => '',
  'idempotency_key' => '',
  'location_id' => '',
  'merchant_id' => '',
  'order_id' => '',
  'processing_fees' => [
    
  ],
  'refunded' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'source_id' => '',
  'status' => '',
  'tax' => '',
  'tender_id' => '',
  'tip' => '',
  'total' => '',
  'updated_at' => '',
  'updated_by' => '',
  'wallet' => [
    'status' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'amount' => '',
  'app_fee' => '',
  'approved' => '',
  'bank_account' => [
    'account_ownership_type' => '',
    'ach_details' => [
        'account_number_suffix' => '',
        'account_type' => '',
        'routing_number' => ''
    ],
    'bank_name' => '',
    'country' => '',
    'fingerprint' => '',
    'statement_description' => '',
    'transfer_type' => ''
  ],
  'card_details' => [
    'card' => [
        'billing_address' => [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ],
        'bin' => '',
        'card_brand' => '',
        'card_type' => '',
        'cardholder_name' => '',
        'customer_id' => '',
        'enabled' => null,
        'exp_month' => 0,
        'exp_year' => 0,
        'fingerprint' => '',
        'id' => '',
        'last_4' => '',
        'merchant_id' => '',
        'prepaid_type' => '',
        'reference_id' => '',
        'version' => ''
    ]
  ],
  'cash' => [
    'amount' => '',
    'charge_back_amount' => ''
  ],
  'change_back_cash_amount' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'device_id' => '',
  'employee_id' => '',
  'external_details' => [
    'source' => '',
    'source_fee_amount' => '',
    'source_id' => '',
    'type' => ''
  ],
  'external_payment_id' => '',
  'id' => '',
  'idempotency_key' => '',
  'location_id' => '',
  'merchant_id' => '',
  'order_id' => '',
  'processing_fees' => [
    
  ],
  'refunded' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'source_id' => '',
  'status' => '',
  'tax' => '',
  'tender_id' => '',
  'tip' => '',
  'total' => '',
  'updated_at' => '',
  'updated_by' => '',
  'wallet' => [
    'status' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/pos/payments');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/payments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/payments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/payments", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/payments"

payload = {
    "amount": "",
    "app_fee": "",
    "approved": "",
    "bank_account": {
        "account_ownership_type": "",
        "ach_details": {
            "account_number_suffix": "",
            "account_type": "",
            "routing_number": ""
        },
        "bank_name": "",
        "country": "",
        "fingerprint": "",
        "statement_description": "",
        "transfer_type": ""
    },
    "card_details": { "card": {
            "billing_address": {
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            },
            "bin": "",
            "card_brand": "",
            "card_type": "",
            "cardholder_name": "",
            "customer_id": "",
            "enabled": False,
            "exp_month": 0,
            "exp_year": 0,
            "fingerprint": "",
            "id": "",
            "last_4": "",
            "merchant_id": "",
            "prepaid_type": "",
            "reference_id": "",
            "version": ""
        } },
    "cash": {
        "amount": "",
        "charge_back_amount": ""
    },
    "change_back_cash_amount": "",
    "created_at": "",
    "created_by": "",
    "currency": "",
    "customer_id": "",
    "device_id": "",
    "employee_id": "",
    "external_details": {
        "source": "",
        "source_fee_amount": "",
        "source_id": "",
        "type": ""
    },
    "external_payment_id": "",
    "id": "",
    "idempotency_key": "",
    "location_id": "",
    "merchant_id": "",
    "order_id": "",
    "processing_fees": [],
    "refunded": "",
    "service_charges": [
        {
            "active": False,
            "amount": "",
            "currency": "",
            "id": "",
            "name": "",
            "percentage": "",
            "type": ""
        }
    ],
    "source": "",
    "source_id": "",
    "status": "",
    "tax": "",
    "tender_id": "",
    "tip": "",
    "total": "",
    "updated_at": "",
    "updated_by": "",
    "wallet": { "status": "" }
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/payments"

payload <- "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/payments")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/payments') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/payments";

    let payload = json!({
        "amount": "",
        "app_fee": "",
        "approved": "",
        "bank_account": json!({
            "account_ownership_type": "",
            "ach_details": json!({
                "account_number_suffix": "",
                "account_type": "",
                "routing_number": ""
            }),
            "bank_name": "",
            "country": "",
            "fingerprint": "",
            "statement_description": "",
            "transfer_type": ""
        }),
        "card_details": json!({"card": json!({
                "billing_address": json!({
                    "city": "",
                    "contact_name": "",
                    "country": "",
                    "county": "",
                    "email": "",
                    "fax": "",
                    "id": "",
                    "latitude": "",
                    "line1": "",
                    "line2": "",
                    "line3": "",
                    "line4": "",
                    "longitude": "",
                    "name": "",
                    "phone_number": "",
                    "postal_code": "",
                    "row_version": "",
                    "salutation": "",
                    "state": "",
                    "street_number": "",
                    "string": "",
                    "type": "",
                    "website": ""
                }),
                "bin": "",
                "card_brand": "",
                "card_type": "",
                "cardholder_name": "",
                "customer_id": "",
                "enabled": false,
                "exp_month": 0,
                "exp_year": 0,
                "fingerprint": "",
                "id": "",
                "last_4": "",
                "merchant_id": "",
                "prepaid_type": "",
                "reference_id": "",
                "version": ""
            })}),
        "cash": json!({
            "amount": "",
            "charge_back_amount": ""
        }),
        "change_back_cash_amount": "",
        "created_at": "",
        "created_by": "",
        "currency": "",
        "customer_id": "",
        "device_id": "",
        "employee_id": "",
        "external_details": json!({
            "source": "",
            "source_fee_amount": "",
            "source_id": "",
            "type": ""
        }),
        "external_payment_id": "",
        "id": "",
        "idempotency_key": "",
        "location_id": "",
        "merchant_id": "",
        "order_id": "",
        "processing_fees": (),
        "refunded": "",
        "service_charges": (
            json!({
                "active": false,
                "amount": "",
                "currency": "",
                "id": "",
                "name": "",
                "percentage": "",
                "type": ""
            })
        ),
        "source": "",
        "source_id": "",
        "status": "",
        "tax": "",
        "tender_id": "",
        "tip": "",
        "total": "",
        "updated_at": "",
        "updated_by": "",
        "wallet": json!({"status": ""})
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/payments \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}'
echo '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}' |  \
  http POST {{baseUrl}}/pos/payments \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "amount": "",\n  "app_fee": "",\n  "approved": "",\n  "bank_account": {\n    "account_ownership_type": "",\n    "ach_details": {\n      "account_number_suffix": "",\n      "account_type": "",\n      "routing_number": ""\n    },\n    "bank_name": "",\n    "country": "",\n    "fingerprint": "",\n    "statement_description": "",\n    "transfer_type": ""\n  },\n  "card_details": {\n    "card": {\n      "billing_address": {\n        "city": "",\n        "contact_name": "",\n        "country": "",\n        "county": "",\n        "email": "",\n        "fax": "",\n        "id": "",\n        "latitude": "",\n        "line1": "",\n        "line2": "",\n        "line3": "",\n        "line4": "",\n        "longitude": "",\n        "name": "",\n        "phone_number": "",\n        "postal_code": "",\n        "row_version": "",\n        "salutation": "",\n        "state": "",\n        "street_number": "",\n        "string": "",\n        "type": "",\n        "website": ""\n      },\n      "bin": "",\n      "card_brand": "",\n      "card_type": "",\n      "cardholder_name": "",\n      "customer_id": "",\n      "enabled": false,\n      "exp_month": 0,\n      "exp_year": 0,\n      "fingerprint": "",\n      "id": "",\n      "last_4": "",\n      "merchant_id": "",\n      "prepaid_type": "",\n      "reference_id": "",\n      "version": ""\n    }\n  },\n  "cash": {\n    "amount": "",\n    "charge_back_amount": ""\n  },\n  "change_back_cash_amount": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "device_id": "",\n  "employee_id": "",\n  "external_details": {\n    "source": "",\n    "source_fee_amount": "",\n    "source_id": "",\n    "type": ""\n  },\n  "external_payment_id": "",\n  "id": "",\n  "idempotency_key": "",\n  "location_id": "",\n  "merchant_id": "",\n  "order_id": "",\n  "processing_fees": [],\n  "refunded": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "source_id": "",\n  "status": "",\n  "tax": "",\n  "tender_id": "",\n  "tip": "",\n  "total": "",\n  "updated_at": "",\n  "updated_by": "",\n  "wallet": {\n    "status": ""\n  }\n}' \
  --output-document \
  - {{baseUrl}}/pos/payments
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": [
    "account_ownership_type": "",
    "ach_details": [
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    ],
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  ],
  "card_details": ["card": [
      "billing_address": [
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      ],
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    ]],
  "cash": [
    "amount": "",
    "charge_back_amount": ""
  ],
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": [
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  ],
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    [
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    ]
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": ["status": ""]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/payments")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "PosPayments",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete Payment
{{baseUrl}}/pos/payments/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/payments/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/pos/payments/:id" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/payments/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/pos/payments/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/payments/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/payments/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/pos/payments/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/pos/payments/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/payments/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/payments/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/pos/payments/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/pos/payments/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/payments/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/payments/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/payments/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/pos/payments/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/payments/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/payments/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/payments/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/payments/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/pos/payments/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/payments/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/payments/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/payments/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/payments/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/pos/payments/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/payments/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/payments/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/payments/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/pos/payments/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/payments/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/pos/payments/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/pos/payments/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/payments/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/payments/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "PosPayments",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get Payment
{{baseUrl}}/pos/payments/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/payments/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/payments/:id" {:headers {:x-apideck-consumer-id ""
                                                                      :x-apideck-app-id ""
                                                                      :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/payments/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/payments/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/payments/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/payments/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/payments/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/payments/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/payments/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/payments/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/payments/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/payments/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/payments/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/payments/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/payments/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/payments/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/payments/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/payments/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/payments/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/payments/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/payments/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/payments/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/payments/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/payments/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/payments/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/payments/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/payments/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/payments/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/payments/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/payments/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/payments/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/payments/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/payments/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/payments/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/payments/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "amount": 27.5,
    "app_fee": 3,
    "approved": 37.5,
    "change_back_cash_amount": 20,
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "currency": "USD",
    "customer_id": "12345",
    "device_id": "12345",
    "employee_id": "12345",
    "external_payment_id": "12345",
    "id": "12345",
    "idempotency_key": "random_string",
    "location_id": "12345",
    "merchant_id": "12345",
    "order_id": "12345",
    "processing_fees": [
      {
        "amount": 1.05,
        "effective_at": "2020-09-30T07:43:32.000Z",
        "processing_type": "initial"
      }
    ],
    "refunded": 37.5,
    "source": "external",
    "source_id": "12345",
    "status": "approved",
    "tax": 20,
    "tender_id": "12345",
    "tip": 7,
    "total": 37.5,
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345"
  },
  "operation": "one",
  "resource": "PosPayments",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List Payments
{{baseUrl}}/pos/payments
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/payments");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/payments" {:headers {:x-apideck-consumer-id ""
                                                                  :x-apideck-app-id ""
                                                                  :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/payments"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/payments"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/payments");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/payments"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/payments HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/payments")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/payments"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/payments")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/payments")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/payments');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/payments',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/payments';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/payments',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/payments")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/payments',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/payments',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/payments');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/payments',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/payments';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/payments"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/payments" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/payments",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/payments', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/payments');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/payments');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/payments' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/payments' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/payments", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/payments"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/payments"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/payments")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/payments') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/payments";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/payments \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/payments \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/payments
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/payments")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "PosPayments",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update Payment
{{baseUrl}}/pos/payments/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/payments/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/pos/payments/:id" {:headers {:x-apideck-consumer-id ""
                                                                        :x-apideck-app-id ""
                                                                        :authorization "{{apiKey}}"}
                                                              :content-type :json
                                                              :form-params {:amount ""
                                                                            :app_fee ""
                                                                            :approved ""
                                                                            :bank_account {:account_ownership_type ""
                                                                                           :ach_details {:account_number_suffix ""
                                                                                                         :account_type ""
                                                                                                         :routing_number ""}
                                                                                           :bank_name ""
                                                                                           :country ""
                                                                                           :fingerprint ""
                                                                                           :statement_description ""
                                                                                           :transfer_type ""}
                                                                            :card_details {:card {:billing_address {:city ""
                                                                                                                    :contact_name ""
                                                                                                                    :country ""
                                                                                                                    :county ""
                                                                                                                    :email ""
                                                                                                                    :fax ""
                                                                                                                    :id ""
                                                                                                                    :latitude ""
                                                                                                                    :line1 ""
                                                                                                                    :line2 ""
                                                                                                                    :line3 ""
                                                                                                                    :line4 ""
                                                                                                                    :longitude ""
                                                                                                                    :name ""
                                                                                                                    :phone_number ""
                                                                                                                    :postal_code ""
                                                                                                                    :row_version ""
                                                                                                                    :salutation ""
                                                                                                                    :state ""
                                                                                                                    :street_number ""
                                                                                                                    :string ""
                                                                                                                    :type ""
                                                                                                                    :website ""}
                                                                                                  :bin ""
                                                                                                  :card_brand ""
                                                                                                  :card_type ""
                                                                                                  :cardholder_name ""
                                                                                                  :customer_id ""
                                                                                                  :enabled false
                                                                                                  :exp_month 0
                                                                                                  :exp_year 0
                                                                                                  :fingerprint ""
                                                                                                  :id ""
                                                                                                  :last_4 ""
                                                                                                  :merchant_id ""
                                                                                                  :prepaid_type ""
                                                                                                  :reference_id ""
                                                                                                  :version ""}}
                                                                            :cash {:amount ""
                                                                                   :charge_back_amount ""}
                                                                            :change_back_cash_amount ""
                                                                            :created_at ""
                                                                            :created_by ""
                                                                            :currency ""
                                                                            :customer_id ""
                                                                            :device_id ""
                                                                            :employee_id ""
                                                                            :external_details {:source ""
                                                                                               :source_fee_amount ""
                                                                                               :source_id ""
                                                                                               :type ""}
                                                                            :external_payment_id ""
                                                                            :id ""
                                                                            :idempotency_key ""
                                                                            :location_id ""
                                                                            :merchant_id ""
                                                                            :order_id ""
                                                                            :processing_fees []
                                                                            :refunded ""
                                                                            :service_charges [{:active false
                                                                                               :amount ""
                                                                                               :currency ""
                                                                                               :id ""
                                                                                               :name ""
                                                                                               :percentage ""
                                                                                               :type ""}]
                                                                            :source ""
                                                                            :source_id ""
                                                                            :status ""
                                                                            :tax ""
                                                                            :tender_id ""
                                                                            :tip ""
                                                                            :total ""
                                                                            :updated_at ""
                                                                            :updated_by ""
                                                                            :wallet {:status ""}}})
require "http/client"

url = "{{baseUrl}}/pos/payments/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/pos/payments/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/payments/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/payments/:id"

	payload := strings.NewReader("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/pos/payments/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 2162

{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/pos/payments/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/payments/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/payments/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/pos/payments/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  amount: '',
  app_fee: '',
  approved: '',
  bank_account: {
    account_ownership_type: '',
    ach_details: {
      account_number_suffix: '',
      account_type: '',
      routing_number: ''
    },
    bank_name: '',
    country: '',
    fingerprint: '',
    statement_description: '',
    transfer_type: ''
  },
  card_details: {
    card: {
      billing_address: {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      },
      bin: '',
      card_brand: '',
      card_type: '',
      cardholder_name: '',
      customer_id: '',
      enabled: false,
      exp_month: 0,
      exp_year: 0,
      fingerprint: '',
      id: '',
      last_4: '',
      merchant_id: '',
      prepaid_type: '',
      reference_id: '',
      version: ''
    }
  },
  cash: {
    amount: '',
    charge_back_amount: ''
  },
  change_back_cash_amount: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  device_id: '',
  employee_id: '',
  external_details: {
    source: '',
    source_fee_amount: '',
    source_id: '',
    type: ''
  },
  external_payment_id: '',
  id: '',
  idempotency_key: '',
  location_id: '',
  merchant_id: '',
  order_id: '',
  processing_fees: [],
  refunded: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  source_id: '',
  status: '',
  tax: '',
  tender_id: '',
  tip: '',
  total: '',
  updated_at: '',
  updated_by: '',
  wallet: {
    status: ''
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/pos/payments/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    amount: '',
    app_fee: '',
    approved: '',
    bank_account: {
      account_ownership_type: '',
      ach_details: {account_number_suffix: '', account_type: '', routing_number: ''},
      bank_name: '',
      country: '',
      fingerprint: '',
      statement_description: '',
      transfer_type: ''
    },
    card_details: {
      card: {
        billing_address: {
          city: '',
          contact_name: '',
          country: '',
          county: '',
          email: '',
          fax: '',
          id: '',
          latitude: '',
          line1: '',
          line2: '',
          line3: '',
          line4: '',
          longitude: '',
          name: '',
          phone_number: '',
          postal_code: '',
          row_version: '',
          salutation: '',
          state: '',
          street_number: '',
          string: '',
          type: '',
          website: ''
        },
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      }
    },
    cash: {amount: '', charge_back_amount: ''},
    change_back_cash_amount: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    device_id: '',
    employee_id: '',
    external_details: {source: '', source_fee_amount: '', source_id: '', type: ''},
    external_payment_id: '',
    id: '',
    idempotency_key: '',
    location_id: '',
    merchant_id: '',
    order_id: '',
    processing_fees: [],
    refunded: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    source_id: '',
    status: '',
    tax: '',
    tender_id: '',
    tip: '',
    total: '',
    updated_at: '',
    updated_by: '',
    wallet: {status: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/payments/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"amount":"","app_fee":"","approved":"","bank_account":{"account_ownership_type":"","ach_details":{"account_number_suffix":"","account_type":"","routing_number":""},"bank_name":"","country":"","fingerprint":"","statement_description":"","transfer_type":""},"card_details":{"card":{"billing_address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""}},"cash":{"amount":"","charge_back_amount":""},"change_back_cash_amount":"","created_at":"","created_by":"","currency":"","customer_id":"","device_id":"","employee_id":"","external_details":{"source":"","source_fee_amount":"","source_id":"","type":""},"external_payment_id":"","id":"","idempotency_key":"","location_id":"","merchant_id":"","order_id":"","processing_fees":[],"refunded":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","source_id":"","status":"","tax":"","tender_id":"","tip":"","total":"","updated_at":"","updated_by":"","wallet":{"status":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/payments/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "amount": "",\n  "app_fee": "",\n  "approved": "",\n  "bank_account": {\n    "account_ownership_type": "",\n    "ach_details": {\n      "account_number_suffix": "",\n      "account_type": "",\n      "routing_number": ""\n    },\n    "bank_name": "",\n    "country": "",\n    "fingerprint": "",\n    "statement_description": "",\n    "transfer_type": ""\n  },\n  "card_details": {\n    "card": {\n      "billing_address": {\n        "city": "",\n        "contact_name": "",\n        "country": "",\n        "county": "",\n        "email": "",\n        "fax": "",\n        "id": "",\n        "latitude": "",\n        "line1": "",\n        "line2": "",\n        "line3": "",\n        "line4": "",\n        "longitude": "",\n        "name": "",\n        "phone_number": "",\n        "postal_code": "",\n        "row_version": "",\n        "salutation": "",\n        "state": "",\n        "street_number": "",\n        "string": "",\n        "type": "",\n        "website": ""\n      },\n      "bin": "",\n      "card_brand": "",\n      "card_type": "",\n      "cardholder_name": "",\n      "customer_id": "",\n      "enabled": false,\n      "exp_month": 0,\n      "exp_year": 0,\n      "fingerprint": "",\n      "id": "",\n      "last_4": "",\n      "merchant_id": "",\n      "prepaid_type": "",\n      "reference_id": "",\n      "version": ""\n    }\n  },\n  "cash": {\n    "amount": "",\n    "charge_back_amount": ""\n  },\n  "change_back_cash_amount": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "device_id": "",\n  "employee_id": "",\n  "external_details": {\n    "source": "",\n    "source_fee_amount": "",\n    "source_id": "",\n    "type": ""\n  },\n  "external_payment_id": "",\n  "id": "",\n  "idempotency_key": "",\n  "location_id": "",\n  "merchant_id": "",\n  "order_id": "",\n  "processing_fees": [],\n  "refunded": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "source_id": "",\n  "status": "",\n  "tax": "",\n  "tender_id": "",\n  "tip": "",\n  "total": "",\n  "updated_at": "",\n  "updated_by": "",\n  "wallet": {\n    "status": ""\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/payments/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  amount: '',
  app_fee: '',
  approved: '',
  bank_account: {
    account_ownership_type: '',
    ach_details: {account_number_suffix: '', account_type: '', routing_number: ''},
    bank_name: '',
    country: '',
    fingerprint: '',
    statement_description: '',
    transfer_type: ''
  },
  card_details: {
    card: {
      billing_address: {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      },
      bin: '',
      card_brand: '',
      card_type: '',
      cardholder_name: '',
      customer_id: '',
      enabled: false,
      exp_month: 0,
      exp_year: 0,
      fingerprint: '',
      id: '',
      last_4: '',
      merchant_id: '',
      prepaid_type: '',
      reference_id: '',
      version: ''
    }
  },
  cash: {amount: '', charge_back_amount: ''},
  change_back_cash_amount: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  device_id: '',
  employee_id: '',
  external_details: {source: '', source_fee_amount: '', source_id: '', type: ''},
  external_payment_id: '',
  id: '',
  idempotency_key: '',
  location_id: '',
  merchant_id: '',
  order_id: '',
  processing_fees: [],
  refunded: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  source_id: '',
  status: '',
  tax: '',
  tender_id: '',
  tip: '',
  total: '',
  updated_at: '',
  updated_by: '',
  wallet: {status: ''}
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    amount: '',
    app_fee: '',
    approved: '',
    bank_account: {
      account_ownership_type: '',
      ach_details: {account_number_suffix: '', account_type: '', routing_number: ''},
      bank_name: '',
      country: '',
      fingerprint: '',
      statement_description: '',
      transfer_type: ''
    },
    card_details: {
      card: {
        billing_address: {
          city: '',
          contact_name: '',
          country: '',
          county: '',
          email: '',
          fax: '',
          id: '',
          latitude: '',
          line1: '',
          line2: '',
          line3: '',
          line4: '',
          longitude: '',
          name: '',
          phone_number: '',
          postal_code: '',
          row_version: '',
          salutation: '',
          state: '',
          street_number: '',
          string: '',
          type: '',
          website: ''
        },
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      }
    },
    cash: {amount: '', charge_back_amount: ''},
    change_back_cash_amount: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    device_id: '',
    employee_id: '',
    external_details: {source: '', source_fee_amount: '', source_id: '', type: ''},
    external_payment_id: '',
    id: '',
    idempotency_key: '',
    location_id: '',
    merchant_id: '',
    order_id: '',
    processing_fees: [],
    refunded: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    source_id: '',
    status: '',
    tax: '',
    tender_id: '',
    tip: '',
    total: '',
    updated_at: '',
    updated_by: '',
    wallet: {status: ''}
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/pos/payments/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  amount: '',
  app_fee: '',
  approved: '',
  bank_account: {
    account_ownership_type: '',
    ach_details: {
      account_number_suffix: '',
      account_type: '',
      routing_number: ''
    },
    bank_name: '',
    country: '',
    fingerprint: '',
    statement_description: '',
    transfer_type: ''
  },
  card_details: {
    card: {
      billing_address: {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      },
      bin: '',
      card_brand: '',
      card_type: '',
      cardholder_name: '',
      customer_id: '',
      enabled: false,
      exp_month: 0,
      exp_year: 0,
      fingerprint: '',
      id: '',
      last_4: '',
      merchant_id: '',
      prepaid_type: '',
      reference_id: '',
      version: ''
    }
  },
  cash: {
    amount: '',
    charge_back_amount: ''
  },
  change_back_cash_amount: '',
  created_at: '',
  created_by: '',
  currency: '',
  customer_id: '',
  device_id: '',
  employee_id: '',
  external_details: {
    source: '',
    source_fee_amount: '',
    source_id: '',
    type: ''
  },
  external_payment_id: '',
  id: '',
  idempotency_key: '',
  location_id: '',
  merchant_id: '',
  order_id: '',
  processing_fees: [],
  refunded: '',
  service_charges: [
    {
      active: false,
      amount: '',
      currency: '',
      id: '',
      name: '',
      percentage: '',
      type: ''
    }
  ],
  source: '',
  source_id: '',
  status: '',
  tax: '',
  tender_id: '',
  tip: '',
  total: '',
  updated_at: '',
  updated_by: '',
  wallet: {
    status: ''
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/payments/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    amount: '',
    app_fee: '',
    approved: '',
    bank_account: {
      account_ownership_type: '',
      ach_details: {account_number_suffix: '', account_type: '', routing_number: ''},
      bank_name: '',
      country: '',
      fingerprint: '',
      statement_description: '',
      transfer_type: ''
    },
    card_details: {
      card: {
        billing_address: {
          city: '',
          contact_name: '',
          country: '',
          county: '',
          email: '',
          fax: '',
          id: '',
          latitude: '',
          line1: '',
          line2: '',
          line3: '',
          line4: '',
          longitude: '',
          name: '',
          phone_number: '',
          postal_code: '',
          row_version: '',
          salutation: '',
          state: '',
          street_number: '',
          string: '',
          type: '',
          website: ''
        },
        bin: '',
        card_brand: '',
        card_type: '',
        cardholder_name: '',
        customer_id: '',
        enabled: false,
        exp_month: 0,
        exp_year: 0,
        fingerprint: '',
        id: '',
        last_4: '',
        merchant_id: '',
        prepaid_type: '',
        reference_id: '',
        version: ''
      }
    },
    cash: {amount: '', charge_back_amount: ''},
    change_back_cash_amount: '',
    created_at: '',
    created_by: '',
    currency: '',
    customer_id: '',
    device_id: '',
    employee_id: '',
    external_details: {source: '', source_fee_amount: '', source_id: '', type: ''},
    external_payment_id: '',
    id: '',
    idempotency_key: '',
    location_id: '',
    merchant_id: '',
    order_id: '',
    processing_fees: [],
    refunded: '',
    service_charges: [
      {
        active: false,
        amount: '',
        currency: '',
        id: '',
        name: '',
        percentage: '',
        type: ''
      }
    ],
    source: '',
    source_id: '',
    status: '',
    tax: '',
    tender_id: '',
    tip: '',
    total: '',
    updated_at: '',
    updated_by: '',
    wallet: {status: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/payments/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"amount":"","app_fee":"","approved":"","bank_account":{"account_ownership_type":"","ach_details":{"account_number_suffix":"","account_type":"","routing_number":""},"bank_name":"","country":"","fingerprint":"","statement_description":"","transfer_type":""},"card_details":{"card":{"billing_address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"bin":"","card_brand":"","card_type":"","cardholder_name":"","customer_id":"","enabled":false,"exp_month":0,"exp_year":0,"fingerprint":"","id":"","last_4":"","merchant_id":"","prepaid_type":"","reference_id":"","version":""}},"cash":{"amount":"","charge_back_amount":""},"change_back_cash_amount":"","created_at":"","created_by":"","currency":"","customer_id":"","device_id":"","employee_id":"","external_details":{"source":"","source_fee_amount":"","source_id":"","type":""},"external_payment_id":"","id":"","idempotency_key":"","location_id":"","merchant_id":"","order_id":"","processing_fees":[],"refunded":"","service_charges":[{"active":false,"amount":"","currency":"","id":"","name":"","percentage":"","type":""}],"source":"","source_id":"","status":"","tax":"","tender_id":"","tip":"","total":"","updated_at":"","updated_by":"","wallet":{"status":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @"",
                              @"app_fee": @"",
                              @"approved": @"",
                              @"bank_account": @{ @"account_ownership_type": @"", @"ach_details": @{ @"account_number_suffix": @"", @"account_type": @"", @"routing_number": @"" }, @"bank_name": @"", @"country": @"", @"fingerprint": @"", @"statement_description": @"", @"transfer_type": @"" },
                              @"card_details": @{ @"card": @{ @"billing_address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" }, @"bin": @"", @"card_brand": @"", @"card_type": @"", @"cardholder_name": @"", @"customer_id": @"", @"enabled": @NO, @"exp_month": @0, @"exp_year": @0, @"fingerprint": @"", @"id": @"", @"last_4": @"", @"merchant_id": @"", @"prepaid_type": @"", @"reference_id": @"", @"version": @"" } },
                              @"cash": @{ @"amount": @"", @"charge_back_amount": @"" },
                              @"change_back_cash_amount": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"customer_id": @"",
                              @"device_id": @"",
                              @"employee_id": @"",
                              @"external_details": @{ @"source": @"", @"source_fee_amount": @"", @"source_id": @"", @"type": @"" },
                              @"external_payment_id": @"",
                              @"id": @"",
                              @"idempotency_key": @"",
                              @"location_id": @"",
                              @"merchant_id": @"",
                              @"order_id": @"",
                              @"processing_fees": @[  ],
                              @"refunded": @"",
                              @"service_charges": @[ @{ @"active": @NO, @"amount": @"", @"currency": @"", @"id": @"", @"name": @"", @"percentage": @"", @"type": @"" } ],
                              @"source": @"",
                              @"source_id": @"",
                              @"status": @"",
                              @"tax": @"",
                              @"tender_id": @"",
                              @"tip": @"",
                              @"total": @"",
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"wallet": @{ @"status": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/payments/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/payments/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/payments/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'amount' => '',
    'app_fee' => '',
    'approved' => '',
    'bank_account' => [
        'account_ownership_type' => '',
        'ach_details' => [
                'account_number_suffix' => '',
                'account_type' => '',
                'routing_number' => ''
        ],
        'bank_name' => '',
        'country' => '',
        'fingerprint' => '',
        'statement_description' => '',
        'transfer_type' => ''
    ],
    'card_details' => [
        'card' => [
                'billing_address' => [
                                'city' => '',
                                'contact_name' => '',
                                'country' => '',
                                'county' => '',
                                'email' => '',
                                'fax' => '',
                                'id' => '',
                                'latitude' => '',
                                'line1' => '',
                                'line2' => '',
                                'line3' => '',
                                'line4' => '',
                                'longitude' => '',
                                'name' => '',
                                'phone_number' => '',
                                'postal_code' => '',
                                'row_version' => '',
                                'salutation' => '',
                                'state' => '',
                                'street_number' => '',
                                'string' => '',
                                'type' => '',
                                'website' => ''
                ],
                'bin' => '',
                'card_brand' => '',
                'card_type' => '',
                'cardholder_name' => '',
                'customer_id' => '',
                'enabled' => null,
                'exp_month' => 0,
                'exp_year' => 0,
                'fingerprint' => '',
                'id' => '',
                'last_4' => '',
                'merchant_id' => '',
                'prepaid_type' => '',
                'reference_id' => '',
                'version' => ''
        ]
    ],
    'cash' => [
        'amount' => '',
        'charge_back_amount' => ''
    ],
    'change_back_cash_amount' => '',
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'customer_id' => '',
    'device_id' => '',
    'employee_id' => '',
    'external_details' => [
        'source' => '',
        'source_fee_amount' => '',
        'source_id' => '',
        'type' => ''
    ],
    'external_payment_id' => '',
    'id' => '',
    'idempotency_key' => '',
    'location_id' => '',
    'merchant_id' => '',
    'order_id' => '',
    'processing_fees' => [
        
    ],
    'refunded' => '',
    'service_charges' => [
        [
                'active' => null,
                'amount' => '',
                'currency' => '',
                'id' => '',
                'name' => '',
                'percentage' => '',
                'type' => ''
        ]
    ],
    'source' => '',
    'source_id' => '',
    'status' => '',
    'tax' => '',
    'tender_id' => '',
    'tip' => '',
    'total' => '',
    'updated_at' => '',
    'updated_by' => '',
    'wallet' => [
        'status' => ''
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/pos/payments/:id', [
  'body' => '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/payments/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'amount' => '',
  'app_fee' => '',
  'approved' => '',
  'bank_account' => [
    'account_ownership_type' => '',
    'ach_details' => [
        'account_number_suffix' => '',
        'account_type' => '',
        'routing_number' => ''
    ],
    'bank_name' => '',
    'country' => '',
    'fingerprint' => '',
    'statement_description' => '',
    'transfer_type' => ''
  ],
  'card_details' => [
    'card' => [
        'billing_address' => [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ],
        'bin' => '',
        'card_brand' => '',
        'card_type' => '',
        'cardholder_name' => '',
        'customer_id' => '',
        'enabled' => null,
        'exp_month' => 0,
        'exp_year' => 0,
        'fingerprint' => '',
        'id' => '',
        'last_4' => '',
        'merchant_id' => '',
        'prepaid_type' => '',
        'reference_id' => '',
        'version' => ''
    ]
  ],
  'cash' => [
    'amount' => '',
    'charge_back_amount' => ''
  ],
  'change_back_cash_amount' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'device_id' => '',
  'employee_id' => '',
  'external_details' => [
    'source' => '',
    'source_fee_amount' => '',
    'source_id' => '',
    'type' => ''
  ],
  'external_payment_id' => '',
  'id' => '',
  'idempotency_key' => '',
  'location_id' => '',
  'merchant_id' => '',
  'order_id' => '',
  'processing_fees' => [
    
  ],
  'refunded' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'source_id' => '',
  'status' => '',
  'tax' => '',
  'tender_id' => '',
  'tip' => '',
  'total' => '',
  'updated_at' => '',
  'updated_by' => '',
  'wallet' => [
    'status' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'amount' => '',
  'app_fee' => '',
  'approved' => '',
  'bank_account' => [
    'account_ownership_type' => '',
    'ach_details' => [
        'account_number_suffix' => '',
        'account_type' => '',
        'routing_number' => ''
    ],
    'bank_name' => '',
    'country' => '',
    'fingerprint' => '',
    'statement_description' => '',
    'transfer_type' => ''
  ],
  'card_details' => [
    'card' => [
        'billing_address' => [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ],
        'bin' => '',
        'card_brand' => '',
        'card_type' => '',
        'cardholder_name' => '',
        'customer_id' => '',
        'enabled' => null,
        'exp_month' => 0,
        'exp_year' => 0,
        'fingerprint' => '',
        'id' => '',
        'last_4' => '',
        'merchant_id' => '',
        'prepaid_type' => '',
        'reference_id' => '',
        'version' => ''
    ]
  ],
  'cash' => [
    'amount' => '',
    'charge_back_amount' => ''
  ],
  'change_back_cash_amount' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'customer_id' => '',
  'device_id' => '',
  'employee_id' => '',
  'external_details' => [
    'source' => '',
    'source_fee_amount' => '',
    'source_id' => '',
    'type' => ''
  ],
  'external_payment_id' => '',
  'id' => '',
  'idempotency_key' => '',
  'location_id' => '',
  'merchant_id' => '',
  'order_id' => '',
  'processing_fees' => [
    
  ],
  'refunded' => '',
  'service_charges' => [
    [
        'active' => null,
        'amount' => '',
        'currency' => '',
        'id' => '',
        'name' => '',
        'percentage' => '',
        'type' => ''
    ]
  ],
  'source' => '',
  'source_id' => '',
  'status' => '',
  'tax' => '',
  'tender_id' => '',
  'tip' => '',
  'total' => '',
  'updated_at' => '',
  'updated_by' => '',
  'wallet' => [
    'status' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/pos/payments/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/payments/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/payments/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/pos/payments/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/payments/:id"

payload = {
    "amount": "",
    "app_fee": "",
    "approved": "",
    "bank_account": {
        "account_ownership_type": "",
        "ach_details": {
            "account_number_suffix": "",
            "account_type": "",
            "routing_number": ""
        },
        "bank_name": "",
        "country": "",
        "fingerprint": "",
        "statement_description": "",
        "transfer_type": ""
    },
    "card_details": { "card": {
            "billing_address": {
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            },
            "bin": "",
            "card_brand": "",
            "card_type": "",
            "cardholder_name": "",
            "customer_id": "",
            "enabled": False,
            "exp_month": 0,
            "exp_year": 0,
            "fingerprint": "",
            "id": "",
            "last_4": "",
            "merchant_id": "",
            "prepaid_type": "",
            "reference_id": "",
            "version": ""
        } },
    "cash": {
        "amount": "",
        "charge_back_amount": ""
    },
    "change_back_cash_amount": "",
    "created_at": "",
    "created_by": "",
    "currency": "",
    "customer_id": "",
    "device_id": "",
    "employee_id": "",
    "external_details": {
        "source": "",
        "source_fee_amount": "",
        "source_id": "",
        "type": ""
    },
    "external_payment_id": "",
    "id": "",
    "idempotency_key": "",
    "location_id": "",
    "merchant_id": "",
    "order_id": "",
    "processing_fees": [],
    "refunded": "",
    "service_charges": [
        {
            "active": False,
            "amount": "",
            "currency": "",
            "id": "",
            "name": "",
            "percentage": "",
            "type": ""
        }
    ],
    "source": "",
    "source_id": "",
    "status": "",
    "tax": "",
    "tender_id": "",
    "tip": "",
    "total": "",
    "updated_at": "",
    "updated_by": "",
    "wallet": { "status": "" }
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/payments/:id"

payload <- "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/payments/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/pos/payments/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"amount\": \"\",\n  \"app_fee\": \"\",\n  \"approved\": \"\",\n  \"bank_account\": {\n    \"account_ownership_type\": \"\",\n    \"ach_details\": {\n      \"account_number_suffix\": \"\",\n      \"account_type\": \"\",\n      \"routing_number\": \"\"\n    },\n    \"bank_name\": \"\",\n    \"country\": \"\",\n    \"fingerprint\": \"\",\n    \"statement_description\": \"\",\n    \"transfer_type\": \"\"\n  },\n  \"card_details\": {\n    \"card\": {\n      \"billing_address\": {\n        \"city\": \"\",\n        \"contact_name\": \"\",\n        \"country\": \"\",\n        \"county\": \"\",\n        \"email\": \"\",\n        \"fax\": \"\",\n        \"id\": \"\",\n        \"latitude\": \"\",\n        \"line1\": \"\",\n        \"line2\": \"\",\n        \"line3\": \"\",\n        \"line4\": \"\",\n        \"longitude\": \"\",\n        \"name\": \"\",\n        \"phone_number\": \"\",\n        \"postal_code\": \"\",\n        \"row_version\": \"\",\n        \"salutation\": \"\",\n        \"state\": \"\",\n        \"street_number\": \"\",\n        \"string\": \"\",\n        \"type\": \"\",\n        \"website\": \"\"\n      },\n      \"bin\": \"\",\n      \"card_brand\": \"\",\n      \"card_type\": \"\",\n      \"cardholder_name\": \"\",\n      \"customer_id\": \"\",\n      \"enabled\": false,\n      \"exp_month\": 0,\n      \"exp_year\": 0,\n      \"fingerprint\": \"\",\n      \"id\": \"\",\n      \"last_4\": \"\",\n      \"merchant_id\": \"\",\n      \"prepaid_type\": \"\",\n      \"reference_id\": \"\",\n      \"version\": \"\"\n    }\n  },\n  \"cash\": {\n    \"amount\": \"\",\n    \"charge_back_amount\": \"\"\n  },\n  \"change_back_cash_amount\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"customer_id\": \"\",\n  \"device_id\": \"\",\n  \"employee_id\": \"\",\n  \"external_details\": {\n    \"source\": \"\",\n    \"source_fee_amount\": \"\",\n    \"source_id\": \"\",\n    \"type\": \"\"\n  },\n  \"external_payment_id\": \"\",\n  \"id\": \"\",\n  \"idempotency_key\": \"\",\n  \"location_id\": \"\",\n  \"merchant_id\": \"\",\n  \"order_id\": \"\",\n  \"processing_fees\": [],\n  \"refunded\": \"\",\n  \"service_charges\": [\n    {\n      \"active\": false,\n      \"amount\": \"\",\n      \"currency\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"percentage\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"source\": \"\",\n  \"source_id\": \"\",\n  \"status\": \"\",\n  \"tax\": \"\",\n  \"tender_id\": \"\",\n  \"tip\": \"\",\n  \"total\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"wallet\": {\n    \"status\": \"\"\n  }\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/payments/:id";

    let payload = json!({
        "amount": "",
        "app_fee": "",
        "approved": "",
        "bank_account": json!({
            "account_ownership_type": "",
            "ach_details": json!({
                "account_number_suffix": "",
                "account_type": "",
                "routing_number": ""
            }),
            "bank_name": "",
            "country": "",
            "fingerprint": "",
            "statement_description": "",
            "transfer_type": ""
        }),
        "card_details": json!({"card": json!({
                "billing_address": json!({
                    "city": "",
                    "contact_name": "",
                    "country": "",
                    "county": "",
                    "email": "",
                    "fax": "",
                    "id": "",
                    "latitude": "",
                    "line1": "",
                    "line2": "",
                    "line3": "",
                    "line4": "",
                    "longitude": "",
                    "name": "",
                    "phone_number": "",
                    "postal_code": "",
                    "row_version": "",
                    "salutation": "",
                    "state": "",
                    "street_number": "",
                    "string": "",
                    "type": "",
                    "website": ""
                }),
                "bin": "",
                "card_brand": "",
                "card_type": "",
                "cardholder_name": "",
                "customer_id": "",
                "enabled": false,
                "exp_month": 0,
                "exp_year": 0,
                "fingerprint": "",
                "id": "",
                "last_4": "",
                "merchant_id": "",
                "prepaid_type": "",
                "reference_id": "",
                "version": ""
            })}),
        "cash": json!({
            "amount": "",
            "charge_back_amount": ""
        }),
        "change_back_cash_amount": "",
        "created_at": "",
        "created_by": "",
        "currency": "",
        "customer_id": "",
        "device_id": "",
        "employee_id": "",
        "external_details": json!({
            "source": "",
            "source_fee_amount": "",
            "source_id": "",
            "type": ""
        }),
        "external_payment_id": "",
        "id": "",
        "idempotency_key": "",
        "location_id": "",
        "merchant_id": "",
        "order_id": "",
        "processing_fees": (),
        "refunded": "",
        "service_charges": (
            json!({
                "active": false,
                "amount": "",
                "currency": "",
                "id": "",
                "name": "",
                "percentage": "",
                "type": ""
            })
        ),
        "source": "",
        "source_id": "",
        "status": "",
        "tax": "",
        "tender_id": "",
        "tip": "",
        "total": "",
        "updated_at": "",
        "updated_by": "",
        "wallet": json!({"status": ""})
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/pos/payments/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}'
echo '{
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": {
    "account_ownership_type": "",
    "ach_details": {
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    },
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  },
  "card_details": {
    "card": {
      "billing_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      },
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    }
  },
  "cash": {
    "amount": "",
    "charge_back_amount": ""
  },
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": {
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  },
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    {
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    }
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": {
    "status": ""
  }
}' |  \
  http PATCH {{baseUrl}}/pos/payments/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "amount": "",\n  "app_fee": "",\n  "approved": "",\n  "bank_account": {\n    "account_ownership_type": "",\n    "ach_details": {\n      "account_number_suffix": "",\n      "account_type": "",\n      "routing_number": ""\n    },\n    "bank_name": "",\n    "country": "",\n    "fingerprint": "",\n    "statement_description": "",\n    "transfer_type": ""\n  },\n  "card_details": {\n    "card": {\n      "billing_address": {\n        "city": "",\n        "contact_name": "",\n        "country": "",\n        "county": "",\n        "email": "",\n        "fax": "",\n        "id": "",\n        "latitude": "",\n        "line1": "",\n        "line2": "",\n        "line3": "",\n        "line4": "",\n        "longitude": "",\n        "name": "",\n        "phone_number": "",\n        "postal_code": "",\n        "row_version": "",\n        "salutation": "",\n        "state": "",\n        "street_number": "",\n        "string": "",\n        "type": "",\n        "website": ""\n      },\n      "bin": "",\n      "card_brand": "",\n      "card_type": "",\n      "cardholder_name": "",\n      "customer_id": "",\n      "enabled": false,\n      "exp_month": 0,\n      "exp_year": 0,\n      "fingerprint": "",\n      "id": "",\n      "last_4": "",\n      "merchant_id": "",\n      "prepaid_type": "",\n      "reference_id": "",\n      "version": ""\n    }\n  },\n  "cash": {\n    "amount": "",\n    "charge_back_amount": ""\n  },\n  "change_back_cash_amount": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "customer_id": "",\n  "device_id": "",\n  "employee_id": "",\n  "external_details": {\n    "source": "",\n    "source_fee_amount": "",\n    "source_id": "",\n    "type": ""\n  },\n  "external_payment_id": "",\n  "id": "",\n  "idempotency_key": "",\n  "location_id": "",\n  "merchant_id": "",\n  "order_id": "",\n  "processing_fees": [],\n  "refunded": "",\n  "service_charges": [\n    {\n      "active": false,\n      "amount": "",\n      "currency": "",\n      "id": "",\n      "name": "",\n      "percentage": "",\n      "type": ""\n    }\n  ],\n  "source": "",\n  "source_id": "",\n  "status": "",\n  "tax": "",\n  "tender_id": "",\n  "tip": "",\n  "total": "",\n  "updated_at": "",\n  "updated_by": "",\n  "wallet": {\n    "status": ""\n  }\n}' \
  --output-document \
  - {{baseUrl}}/pos/payments/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "amount": "",
  "app_fee": "",
  "approved": "",
  "bank_account": [
    "account_ownership_type": "",
    "ach_details": [
      "account_number_suffix": "",
      "account_type": "",
      "routing_number": ""
    ],
    "bank_name": "",
    "country": "",
    "fingerprint": "",
    "statement_description": "",
    "transfer_type": ""
  ],
  "card_details": ["card": [
      "billing_address": [
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
      ],
      "bin": "",
      "card_brand": "",
      "card_type": "",
      "cardholder_name": "",
      "customer_id": "",
      "enabled": false,
      "exp_month": 0,
      "exp_year": 0,
      "fingerprint": "",
      "id": "",
      "last_4": "",
      "merchant_id": "",
      "prepaid_type": "",
      "reference_id": "",
      "version": ""
    ]],
  "cash": [
    "amount": "",
    "charge_back_amount": ""
  ],
  "change_back_cash_amount": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "customer_id": "",
  "device_id": "",
  "employee_id": "",
  "external_details": [
    "source": "",
    "source_fee_amount": "",
    "source_id": "",
    "type": ""
  ],
  "external_payment_id": "",
  "id": "",
  "idempotency_key": "",
  "location_id": "",
  "merchant_id": "",
  "order_id": "",
  "processing_fees": [],
  "refunded": "",
  "service_charges": [
    [
      "active": false,
      "amount": "",
      "currency": "",
      "id": "",
      "name": "",
      "percentage": "",
      "type": ""
    ]
  ],
  "source": "",
  "source_id": "",
  "status": "",
  "tax": "",
  "tender_id": "",
  "tip": "",
  "total": "",
  "updated_at": "",
  "updated_by": "",
  "wallet": ["status": ""]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/payments/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "PosPayments",
  "service": "square",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create Tender
{{baseUrl}}/pos/tenders
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/tenders");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/pos/tenders" {:headers {:x-apideck-consumer-id ""
                                                                  :x-apideck-app-id ""
                                                                  :authorization "{{apiKey}}"}
                                                        :content-type :json
                                                        :form-params {:active false
                                                                      :allows_tipping false
                                                                      :created_at ""
                                                                      :created_by ""
                                                                      :editable false
                                                                      :hidden false
                                                                      :id ""
                                                                      :key ""
                                                                      :label ""
                                                                      :opens_cash_drawer false
                                                                      :updated_at ""
                                                                      :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/tenders"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/pos/tenders"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/tenders");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/tenders"

	payload := strings.NewReader("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/pos/tenders HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 238

{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pos/tenders")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/tenders"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/tenders")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pos/tenders")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  active: false,
  allows_tipping: false,
  created_at: '',
  created_by: '',
  editable: false,
  hidden: false,
  id: '',
  key: '',
  label: '',
  opens_cash_drawer: false,
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/pos/tenders');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/tenders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    allows_tipping: false,
    created_at: '',
    created_by: '',
    editable: false,
    hidden: false,
    id: '',
    key: '',
    label: '',
    opens_cash_drawer: false,
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/tenders';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"allows_tipping":false,"created_at":"","created_by":"","editable":false,"hidden":false,"id":"","key":"","label":"","opens_cash_drawer":false,"updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/tenders',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "active": false,\n  "allows_tipping": false,\n  "created_at": "",\n  "created_by": "",\n  "editable": false,\n  "hidden": false,\n  "id": "",\n  "key": "",\n  "label": "",\n  "opens_cash_drawer": false,\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/tenders")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/tenders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  active: false,
  allows_tipping: false,
  created_at: '',
  created_by: '',
  editable: false,
  hidden: false,
  id: '',
  key: '',
  label: '',
  opens_cash_drawer: false,
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/tenders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    active: false,
    allows_tipping: false,
    created_at: '',
    created_by: '',
    editable: false,
    hidden: false,
    id: '',
    key: '',
    label: '',
    opens_cash_drawer: false,
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/pos/tenders');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  active: false,
  allows_tipping: false,
  created_at: '',
  created_by: '',
  editable: false,
  hidden: false,
  id: '',
  key: '',
  label: '',
  opens_cash_drawer: false,
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/pos/tenders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    allows_tipping: false,
    created_at: '',
    created_by: '',
    editable: false,
    hidden: false,
    id: '',
    key: '',
    label: '',
    opens_cash_drawer: false,
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/tenders';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"allows_tipping":false,"created_at":"","created_by":"","editable":false,"hidden":false,"id":"","key":"","label":"","opens_cash_drawer":false,"updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"active": @NO,
                              @"allows_tipping": @NO,
                              @"created_at": @"",
                              @"created_by": @"",
                              @"editable": @NO,
                              @"hidden": @NO,
                              @"id": @"",
                              @"key": @"",
                              @"label": @"",
                              @"opens_cash_drawer": @NO,
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/tenders"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/tenders" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/tenders",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'active' => null,
    'allows_tipping' => null,
    'created_at' => '',
    'created_by' => '',
    'editable' => null,
    'hidden' => null,
    'id' => '',
    'key' => '',
    'label' => '',
    'opens_cash_drawer' => null,
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/pos/tenders', [
  'body' => '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/tenders');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'active' => null,
  'allows_tipping' => null,
  'created_at' => '',
  'created_by' => '',
  'editable' => null,
  'hidden' => null,
  'id' => '',
  'key' => '',
  'label' => '',
  'opens_cash_drawer' => null,
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'active' => null,
  'allows_tipping' => null,
  'created_at' => '',
  'created_by' => '',
  'editable' => null,
  'hidden' => null,
  'id' => '',
  'key' => '',
  'label' => '',
  'opens_cash_drawer' => null,
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/tenders');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/tenders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/tenders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/pos/tenders", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/tenders"

payload = {
    "active": False,
    "allows_tipping": False,
    "created_at": "",
    "created_by": "",
    "editable": False,
    "hidden": False,
    "id": "",
    "key": "",
    "label": "",
    "opens_cash_drawer": False,
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/tenders"

payload <- "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/tenders")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/pos/tenders') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/tenders";

    let payload = json!({
        "active": false,
        "allows_tipping": false,
        "created_at": "",
        "created_by": "",
        "editable": false,
        "hidden": false,
        "id": "",
        "key": "",
        "label": "",
        "opens_cash_drawer": false,
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/pos/tenders \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}' |  \
  http POST {{baseUrl}}/pos/tenders \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "active": false,\n  "allows_tipping": false,\n  "created_at": "",\n  "created_by": "",\n  "editable": false,\n  "hidden": false,\n  "id": "",\n  "key": "",\n  "label": "",\n  "opens_cash_drawer": false,\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/tenders
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/tenders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "Tenders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete Tender
{{baseUrl}}/pos/tenders/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/tenders/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/pos/tenders/:id" {:headers {:x-apideck-consumer-id ""
                                                                        :x-apideck-app-id ""
                                                                        :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/tenders/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/pos/tenders/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/tenders/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/tenders/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/pos/tenders/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/pos/tenders/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/tenders/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/tenders/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/pos/tenders/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/pos/tenders/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/tenders/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/tenders/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/tenders/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/pos/tenders/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/tenders/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/tenders/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/tenders/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/tenders/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/pos/tenders/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/tenders/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/tenders/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/tenders/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/tenders/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/pos/tenders/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/tenders/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/tenders/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/tenders/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/pos/tenders/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/tenders/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/pos/tenders/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/pos/tenders/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/tenders/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/tenders/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "Tenders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get Tender
{{baseUrl}}/pos/tenders/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/tenders/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/tenders/:id" {:headers {:x-apideck-consumer-id ""
                                                                     :x-apideck-app-id ""
                                                                     :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/tenders/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/tenders/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/tenders/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/tenders/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/tenders/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/tenders/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/tenders/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/tenders/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/tenders/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/tenders/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/tenders/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/tenders/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/tenders/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/tenders/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/tenders/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/tenders/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/tenders/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/tenders/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/tenders/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/tenders/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/tenders/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/tenders/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/tenders/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/tenders/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/tenders/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/tenders/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/tenders/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/tenders/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/tenders/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/tenders/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/tenders/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/tenders/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/tenders/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "active": true,
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "editable": true,
    "hidden": true,
    "id": "12345",
    "key": "com.clover.tender.cash",
    "label": "Cash",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345"
  },
  "operation": "one",
  "resource": "Tenders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List Tenders
{{baseUrl}}/pos/tenders
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/tenders");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/pos/tenders" {:headers {:x-apideck-consumer-id ""
                                                                 :x-apideck-app-id ""
                                                                 :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/pos/tenders"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/pos/tenders"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/tenders");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/tenders"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/pos/tenders HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/pos/tenders")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/tenders"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/tenders")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/pos/tenders")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/pos/tenders');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/tenders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/tenders';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/tenders',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/pos/tenders")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/tenders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/tenders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/pos/tenders');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/pos/tenders',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/tenders';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/tenders"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/tenders" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/tenders",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/pos/tenders', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/tenders');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/pos/tenders');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/tenders' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/tenders' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/pos/tenders", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/tenders"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/tenders"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/tenders")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/pos/tenders') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/tenders";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/pos/tenders \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/pos/tenders \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/pos/tenders
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/tenders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "Tenders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update Tender
{{baseUrl}}/pos/tenders/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pos/tenders/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/pos/tenders/:id" {:headers {:x-apideck-consumer-id ""
                                                                       :x-apideck-app-id ""
                                                                       :authorization "{{apiKey}}"}
                                                             :content-type :json
                                                             :form-params {:active false
                                                                           :allows_tipping false
                                                                           :created_at ""
                                                                           :created_by ""
                                                                           :editable false
                                                                           :hidden false
                                                                           :id ""
                                                                           :key ""
                                                                           :label ""
                                                                           :opens_cash_drawer false
                                                                           :updated_at ""
                                                                           :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/pos/tenders/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/pos/tenders/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pos/tenders/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/pos/tenders/:id"

	payload := strings.NewReader("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/pos/tenders/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 238

{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/pos/tenders/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/pos/tenders/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/pos/tenders/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/pos/tenders/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  active: false,
  allows_tipping: false,
  created_at: '',
  created_by: '',
  editable: false,
  hidden: false,
  id: '',
  key: '',
  label: '',
  opens_cash_drawer: false,
  updated_at: '',
  updated_by: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/pos/tenders/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    allows_tipping: false,
    created_at: '',
    created_by: '',
    editable: false,
    hidden: false,
    id: '',
    key: '',
    label: '',
    opens_cash_drawer: false,
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/pos/tenders/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"allows_tipping":false,"created_at":"","created_by":"","editable":false,"hidden":false,"id":"","key":"","label":"","opens_cash_drawer":false,"updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/pos/tenders/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "active": false,\n  "allows_tipping": false,\n  "created_at": "",\n  "created_by": "",\n  "editable": false,\n  "hidden": false,\n  "id": "",\n  "key": "",\n  "label": "",\n  "opens_cash_drawer": false,\n  "updated_at": "",\n  "updated_by": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/pos/tenders/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({
  active: false,
  allows_tipping: false,
  created_at: '',
  created_by: '',
  editable: false,
  hidden: false,
  id: '',
  key: '',
  label: '',
  opens_cash_drawer: false,
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    active: false,
    allows_tipping: false,
    created_at: '',
    created_by: '',
    editable: false,
    hidden: false,
    id: '',
    key: '',
    label: '',
    opens_cash_drawer: false,
    updated_at: '',
    updated_by: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/pos/tenders/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  active: false,
  allows_tipping: false,
  created_at: '',
  created_by: '',
  editable: false,
  hidden: false,
  id: '',
  key: '',
  label: '',
  opens_cash_drawer: false,
  updated_at: '',
  updated_by: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/pos/tenders/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    allows_tipping: false,
    created_at: '',
    created_by: '',
    editable: false,
    hidden: false,
    id: '',
    key: '',
    label: '',
    opens_cash_drawer: false,
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/pos/tenders/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"allows_tipping":false,"created_at":"","created_by":"","editable":false,"hidden":false,"id":"","key":"","label":"","opens_cash_drawer":false,"updated_at":"","updated_by":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"active": @NO,
                              @"allows_tipping": @NO,
                              @"created_at": @"",
                              @"created_by": @"",
                              @"editable": @NO,
                              @"hidden": @NO,
                              @"id": @"",
                              @"key": @"",
                              @"label": @"",
                              @"opens_cash_drawer": @NO,
                              @"updated_at": @"",
                              @"updated_by": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pos/tenders/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/pos/tenders/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/pos/tenders/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'active' => null,
    'allows_tipping' => null,
    'created_at' => '',
    'created_by' => '',
    'editable' => null,
    'hidden' => null,
    'id' => '',
    'key' => '',
    'label' => '',
    'opens_cash_drawer' => null,
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/pos/tenders/:id', [
  'body' => '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/pos/tenders/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'active' => null,
  'allows_tipping' => null,
  'created_at' => '',
  'created_by' => '',
  'editable' => null,
  'hidden' => null,
  'id' => '',
  'key' => '',
  'label' => '',
  'opens_cash_drawer' => null,
  'updated_at' => '',
  'updated_by' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'active' => null,
  'allows_tipping' => null,
  'created_at' => '',
  'created_by' => '',
  'editable' => null,
  'hidden' => null,
  'id' => '',
  'key' => '',
  'label' => '',
  'opens_cash_drawer' => null,
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pos/tenders/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/pos/tenders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pos/tenders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/pos/tenders/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/pos/tenders/:id"

payload = {
    "active": False,
    "allows_tipping": False,
    "created_at": "",
    "created_by": "",
    "editable": False,
    "hidden": False,
    "id": "",
    "key": "",
    "label": "",
    "opens_cash_drawer": False,
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/pos/tenders/:id"

payload <- "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/pos/tenders/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/pos/tenders/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"active\": false,\n  \"allows_tipping\": false,\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"editable\": false,\n  \"hidden\": false,\n  \"id\": \"\",\n  \"key\": \"\",\n  \"label\": \"\",\n  \"opens_cash_drawer\": false,\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/pos/tenders/:id";

    let payload = json!({
        "active": false,
        "allows_tipping": false,
        "created_at": "",
        "created_by": "",
        "editable": false,
        "hidden": false,
        "id": "",
        "key": "",
        "label": "",
        "opens_cash_drawer": false,
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/pos/tenders/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
}' |  \
  http PATCH {{baseUrl}}/pos/tenders/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "active": false,\n  "allows_tipping": false,\n  "created_at": "",\n  "created_by": "",\n  "editable": false,\n  "hidden": false,\n  "id": "",\n  "key": "",\n  "label": "",\n  "opens_cash_drawer": false,\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/pos/tenders/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "active": false,
  "allows_tipping": false,
  "created_at": "",
  "created_by": "",
  "editable": false,
  "hidden": false,
  "id": "",
  "key": "",
  "label": "",
  "opens_cash_drawer": false,
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pos/tenders/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "Tenders",
  "service": "clover",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}