Hanzo Developer Hub

Hanzo Developer Hub

Welcome to to Hanzo! You'll find comprehensive guides and documentation to help you start working with Hanzo as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

/chain/{chainName}/{blockNumber}

 

get

Returns a requested block in a specific chain.

 
gethttps://api.hanzo.io/chain/chainName/blockNumber
curl --request GET \
  --url https://api.hanzo.io/chain/chainName/blockNumber
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/chain/chainName/blockNumber' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/chain/chainName/blockNumber"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/chain/chainName/blockNumber")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/chain/chainName/blockNumber",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/chain/chainName/blockNumber"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/chain/chainName/blockNumber")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/chain/chainName/blockNumber")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

chainName
string
required
blockNumber
string
required

Query Params

token
string

Headers

Accept
string

Response

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

idstring

The hanzo-assigned guid to identify this item.

blockNumberinteger

The block number from the parent chain.

blockHashstring

The stringified hash of the entire block.

blockTimeinteger

The timestamp when the block took to publish.

blockMedianTimeinteger

The median time blocks are taking to publish on the whole chain at this point.

blockNonceinteger

The nonce used in the block.

blockDifficultyinteger

The block's issued difficulty.

/chainaddress/{chainName}/{address}

 

get

Returns information about a specific address on the requested block chain.

 
gethttps://api.hanzo.io/chainaddress/chainName/address
curl --request GET \
  --url https://api.hanzo.io/chainaddress/chainName/address
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/chainaddress/chainName/address' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/chainaddress/chainName/address"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/chainaddress/chainName/address")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/chainaddress/chainName/address",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/chainaddress/chainName/address"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/chainaddress/chainName/address")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/chainaddress/chainName/address")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

chainName
string
required
address
string
required

Query Params

token
string

Headers

Accept
string

Response

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

walletIdstring

The hanzo-assigned guid to identify this item.

addressstring

The address used by the wallet on its parent blockchain.

typestring

The name of the host blockchain ('bitcoin', 'ethereum', etc).

/chaintransaction/{chainName}/{transaction}

 

get

Returns information about a specific transaction on the requested block chain.

 
gethttps://api.hanzo.io/chaintransaction/chainName/transaction
curl --request GET \
  --url https://api.hanzo.io/chaintransaction/chainName/transaction
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/chaintransaction/chainName/transaction' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/chaintransaction/chainName/transaction"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/chaintransaction/chainName/transaction")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/chaintransaction/chainName/transaction",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/chaintransaction/chainName/transaction"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/chaintransaction/chainName/transaction")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/chaintransaction/chainName/transaction")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

chainName
string
required
transaction
string
required

Query Params

token
string

Headers

Accept
string

Response

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

walletIdstring

The hanzo-assigned guid to identify this item.

addressstring

The address used by the wallet on its parent blockchain.

typestring

The name of the host blockchain ('bitcoin', 'ethereum', etc).

/smartcontract/{id}

 

delete

Completely deletes the associated Smart Contract on Hanzo's servers. Cannot be undone. Does NOT delete a deployed Smart Contract from the block chain!!

 
deletehttps://api.hanzo.io/smartcontract/id
curl --request DELETE \
  --url https://api.hanzo.io/smartcontract/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.hanzo.io/smartcontract/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/smartcontract/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/smartcontract/id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/smartcontract/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/smartcontract/id"

response = requests.request("DELETE", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/smartcontract/id")

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

request = Net::HTTP::Delete.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/smartcontract/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

Path Params

id
string
required

Query Params

token
string

Headers

Accept
string

Response

Everything is OK.

get

Returns a specified smart contract.

 
gethttps://api.hanzo.io/smartcontract/id
curl --request GET \
  --url https://api.hanzo.io/smartcontract/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/smartcontract/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/smartcontract/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/smartcontract/id")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/smartcontract/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/smartcontract/id"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/smartcontract/id")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/smartcontract/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Headers

Accept
string

Response

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

idstring

The hanzo-assigned guid to identify this item.

namestring

The human-friendly name for this smart contract instance.

templatestring

An identifier for the smart contract template being used.

bodystring

Extra data required for the template to function. This is processed on a template by template basis, based upon the requirements.

liveboolean

Whether or not the smart contract is live on the block chain.

addressstring

The smart contract's address (null if not live).

patch

Updates the specified Smart Contract object piecemeal. Any fields not included are not updated.

 
patchhttps://api.hanzo.io/smartcontract/id
curl --request PATCH \
  --url https://api.hanzo.io/smartcontract/id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.hanzo.io/smartcontract/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/smartcontract/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/smartcontract/id")
  .patch(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/smartcontract/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/smartcontract/id"

response = requests.request("PATCH", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/smartcontract/id")

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

request = Net::HTTP::Patch.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/smartcontract/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Body Params

createdAt
string

The time this object was created. Conforms to RFCE3339.

updatedAt
string

The time this object was last updated. Conforms to RFCE3339.

id
string

The hanzo-assigned guid to identify this item.

name
string

The human-friendly name for this smart contract instance.

template
string

An identifier for the smart contract template being used.

body
string

Extra data required for the template to function. This is processed on a template by template basis, based upon the requirements.

live
boolean

Whether or not the smart contract is live on the block chain.

address
string

The smart contract's address (null if not live).

Response

Everything is OK.

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

idstring

The hanzo-assigned guid to identify this item.

namestring

The human-friendly name for this smart contract instance.

templatestring

An identifier for the smart contract template being used.

bodystring

Extra data required for the template to function. This is processed on a template by template basis, based upon the requirements.

liveboolean

Whether or not the smart contract is live on the block chain.

addressstring

The smart contract's address (null if not live).

put

Wholly replaces the specified Smart Contract object in-place. Any fields not included will be blanked.

 
puthttps://api.hanzo.io/smartcontract/id
curl --request PUT \
  --url https://api.hanzo.io/smartcontract/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.hanzo.io/smartcontract/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/smartcontract/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/smartcontract/id")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/smartcontract/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/smartcontract/id"

response = requests.request("PUT", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/smartcontract/id")

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

request = Net::HTTP::Put.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/smartcontract/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Response

Everything is OK.

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

idstring

The hanzo-assigned guid to identify this item.

namestring

The human-friendly name for this smart contract instance.

templatestring

An identifier for the smart contract template being used.

bodystring

Extra data required for the template to function. This is processed on a template by template basis, based upon the requirements.

liveboolean

Whether or not the smart contract is live on the block chain.

addressstring

The smart contract's address (null if not live).

/smartcontract

 

post

Creates a new Smart Contract on Hanzo's servers. Does not automatically deploy it.

 
posthttps://api.hanzo.io/smartcontract
curl --request POST \
  --url https://api.hanzo.io/smartcontract
var request = require("request");

var options = { method: 'POST', url: 'https://api.hanzo.io/smartcontract' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/smartcontract"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/smartcontract")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/smartcontract",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/smartcontract"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/smartcontract")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/smartcontract")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Body Params

createdAt
string

The time this object was created. Conforms to RFCE3339.

updatedAt
string

The time this object was last updated. Conforms to RFCE3339.

id
string

The hanzo-assigned guid to identify this item.

name
string

The human-friendly name for this smart contract instance.

template
string

An identifier for the smart contract template being used.

body
string

Extra data required for the template to function. This is processed on a template by template basis, based upon the requirements.

live
boolean

Whether or not the smart contract is live on the block chain.

address
string

The smart contract's address (null if not live).

Response

Everything is OK. New smartcontract created.

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

idstring

The hanzo-assigned guid to identify this item.

namestring

The human-friendly name for this smart contract instance.

templatestring

An identifier for the smart contract template being used.

bodystring

Extra data required for the template to function. This is processed on a template by template basis, based upon the requirements.

liveboolean

Whether or not the smart contract is live on the block chain.

addressstring

The smart contract's address (null if not live).

get

Returns a list of all available smart contracts.

 
gethttps://api.hanzo.io/smartcontract
curl --request GET \
  --url https://api.hanzo.io/smartcontract
var request = require("request");

var options = { method: 'GET', url: 'https://api.hanzo.io/smartcontract' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/smartcontract"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/smartcontract")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/smartcontract",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/smartcontract"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/smartcontract")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/smartcontract")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Headers

Accept
string

Response

/smartcontract/{id}/deploy

 

get

Deploys a smart contract to its associated block chain. Cannot be undone.

 
gethttps://api.hanzo.io/smartcontract/id/deploy
curl --request GET \
  --url https://api.hanzo.io/smartcontract/id/deploy
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/smartcontract/id/deploy' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/smartcontract/id/deploy"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/smartcontract/id/deploy")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/smartcontract/id/deploy",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/smartcontract/id/deploy"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/smartcontract/id/deploy")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/smartcontract/id/deploy")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Body Params

id
string
amount
integer

Headers

Accept
string
Content-Type
string

Response

Everything is OK.

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

idstring

The hanzo-assigned guid to identify this item.

namestring

The human-friendly name for this smart contract instance.

templatestring

An identifier for the smart contract template being used.

bodystring

Extra data required for the template to function. This is processed on a template by template basis, based upon the requirements.

liveboolean

Whether or not the smart contract is live on the block chain.

addressstring

The smart contract's address (null if not live).

/wallet/{id}

 

delete

Deletes the requested wallet. Cannot be undone.

 
deletehttps://api.hanzo.io/wallet/id
curl --request DELETE \
  --url https://api.hanzo.io/wallet/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.hanzo.io/wallet/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/wallet/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/wallet/id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/wallet/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/wallet/id"

response = requests.request("DELETE", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/wallet/id")

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

request = Net::HTTP::Delete.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/wallet/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

The unique identifier for the Store.

Headers

Accept
string

Response

put

Replaces the specified wallet wholly. Any fields not passed are blanked.

 
puthttps://api.hanzo.io/wallet/id
curl --request PUT \
  --url https://api.hanzo.io/wallet/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.hanzo.io/wallet/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/wallet/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/wallet/id")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/wallet/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/wallet/id"

response = requests.request("PUT", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/wallet/id")

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

request = Net::HTTP::Put.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/wallet/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Variant was created. Conforms to RFC3339.

updatedAt
string

The time this Variant was last updated. Conforms to RFC3339.

accounts
array of objects

An array of Accounts

Response

Everything is OK

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Variant was created. Conforms to RFC3339.

updatedAtstring

The time this Variant was last updated. Conforms to RFC3339.

accountsarray

An array of Accounts

patch

Replaces a wallet object piecemeal. Any fields not passed are not changed.

 
patchhttps://api.hanzo.io/wallet/id
curl --request PATCH \
  --url https://api.hanzo.io/wallet/id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.hanzo.io/wallet/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/wallet/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/wallet/id")
  .patch(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/wallet/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/wallet/id"

response = requests.request("PATCH", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/wallet/id")

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

request = Net::HTTP::Patch.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/wallet/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Variant was created. Conforms to RFC3339.

updatedAt
string

The time this Variant was last updated. Conforms to RFC3339.

accounts
array of objects

An array of Accounts

Response

Everything is OK

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Variant was created. Conforms to RFC3339.

updatedAtstring

The time this Variant was last updated. Conforms to RFC3339.

accountsarray

An array of Accounts

get

Returns the specified Wallet.

 
gethttps://api.hanzo.io/wallet/id
curl --request GET \
  --url https://api.hanzo.io/wallet/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/wallet/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/wallet/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/wallet/id")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/wallet/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/wallet/id"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/wallet/id")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/wallet/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Response

Everything is OK

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Variant was created. Conforms to RFC3339.

updatedAtstring

The time this Variant was last updated. Conforms to RFC3339.

accountsarray

An array of Accounts

/wallet

 

post

Creates a new Wallet.

 
posthttps://api.hanzo.io/wallet
curl --request POST \
  --url https://api.hanzo.io/wallet
var request = require("request");

var options = { method: 'POST', url: 'https://api.hanzo.io/wallet' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/wallet"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/wallet")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/wallet",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/wallet"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/wallet")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/wallet")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Variant was created. Conforms to RFC3339.

updatedAt
string

The time this Variant was last updated. Conforms to RFC3339.

accounts
array of objects

An array of Accounts

Response

Everything is OK. New wallet created.

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Variant was created. Conforms to RFC3339.

updatedAtstring

The time this Variant was last updated. Conforms to RFC3339.

accountsarray

An array of Accounts

get

Returns a list of all available Wallets.

 
gethttps://api.hanzo.io/wallet
curl --request GET \
  --url https://api.hanzo.io/wallet
var request = require("request");

var options = { method: 'GET', url: 'https://api.hanzo.io/wallet' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/wallet"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/wallet")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/wallet",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/wallet"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/wallet")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/wallet")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Headers

accept
string

Response

Everything is OK.

/cart

 

post

Creates a new Cart

 
posthttps://api.hanzo.io/cart
curl --request POST \
  --url https://api.hanzo.io/cart
var request = require("request");

var options = { method: 'POST', url: 'https://api.hanzo.io/cart' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/cart"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/cart")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/cart",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/cart"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/cart")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/cart")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Cart was created. Conforms to RFC3339.

updatedAt
string

The time this Cart was last updated. Conforms to RFC3339.

userId
string

The user ID that this Cart belings to.

email
string

The email of the user (or someone else, if no user ID exists)

orderId
string

The associated order ID (if one's created)

currency
string

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotal
int64

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discount
int64

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotal
int64

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shipping
int64

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

tax
int64

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

total
int64

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

company
string

The company name associated with this cart.

billingAddress
object

The location the charges are billed to.

shippingAddress
object

The location any items are to be shipped to.

items
array of objects

Individual line items for the cart.

coupons
array of objects

Individual coupons applied to the cart.

gift
boolean

Denotes whether or not the cart is for a gift purchase.

giftMessage
string

The message to be used on a gift.

giftEmail
string

The email to be used with a gift.

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Cart was created. Conforms to RFC3339.

updatedAtstring

The time this Cart was last updated. Conforms to RFC3339.

userIdstring

The user ID that this Cart belings to.

emailstring

The email of the user (or someone else, if no user ID exists)

orderIdstring

The associated order ID (if one's created)

currencystring

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotalinteger

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discountinteger

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotalinteger

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shippinginteger

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

taxinteger

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

totalinteger

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

companystring

The company name associated with this cart.

billingAddressobject

The location the charges are billed to.

shippingAddressobject

The location any items are to be shipped to.

itemsarray

Individual line items for the cart.

couponsarray

Individual coupons applied to the cart.

giftboolean

Denotes whether or not the cart is for a gift purchase.

giftMessagestring

The message to be used on a gift.

giftEmailstring

The email to be used with a gift.

get

Gets a list of all available carts.

 
gethttps://api.hanzo.io/cart
curl --request GET \
  --url https://api.hanzo.io/cart
var request = require("request");

var options = { method: 'GET', url: 'https://api.hanzo.io/cart' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/cart"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/cart")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/cart",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/cart"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/cart")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/cart")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Headers

Accept
string

Response

/cart/{id}

 

patch

Replaces a cart piecemeal. Parameters not passed are not updated.

 
patchhttps://api.hanzo.io/cart/id
curl --request PATCH \
  --url https://api.hanzo.io/cart/id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.hanzo.io/cart/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/cart/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/cart/id")
  .patch(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/cart/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/cart/id"

response = requests.request("PATCH", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/cart/id")

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

request = Net::HTTP::Patch.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/cart/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Cart was created. Conforms to RFC3339.

updatedAt
string

The time this Cart was last updated. Conforms to RFC3339.

userId
string

The user ID that this Cart belings to.

email
string

The email of the user (or someone else, if no user ID exists)

orderId
string

The associated order ID (if one's created)

currency
string

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotal
int64

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discount
int64

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotal
int64

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shipping
int64

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

tax
int64

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

total
int64

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

company
string

The company name associated with this cart.

billingAddress
object

The location the charges are billed to.

shippingAddress
object

The location any items are to be shipped to.

items
array of objects

Individual line items for the cart.

coupons
array of objects

Individual coupons applied to the cart.

gift
boolean

Denotes whether or not the cart is for a gift purchase.

giftMessage
string

The message to be used on a gift.

giftEmail
string

The email to be used with a gift.

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Cart was created. Conforms to RFC3339.

updatedAtstring

The time this Cart was last updated. Conforms to RFC3339.

userIdstring

The user ID that this Cart belings to.

emailstring

The email of the user (or someone else, if no user ID exists)

orderIdstring

The associated order ID (if one's created)

currencystring

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotalinteger

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discountinteger

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotalinteger

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shippinginteger

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

taxinteger

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

totalinteger

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

companystring

The company name associated with this cart.

billingAddressobject

The location the charges are billed to.

shippingAddressobject

The location any items are to be shipped to.

itemsarray

Individual line items for the cart.

couponsarray

Individual coupons applied to the cart.

giftboolean

Denotes whether or not the cart is for a gift purchase.

giftMessagestring

The message to be used on a gift.

giftEmailstring

The email to be used with a gift.

get

Retrieves a specified cart

 
gethttps://api.hanzo.io/cart/id
curl --request GET \
  --url https://api.hanzo.io/cart/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/cart/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/cart/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/cart/id")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/cart/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/cart/id"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/cart/id")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/cart/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Headers

Accept
string

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Cart was created. Conforms to RFC3339.

updatedAtstring

The time this Cart was last updated. Conforms to RFC3339.

userIdstring

The user ID that this Cart belings to.

emailstring

The email of the user (or someone else, if no user ID exists)

orderIdstring

The associated order ID (if one's created)

currencystring

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotalinteger

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discountinteger

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotalinteger

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shippinginteger

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

taxinteger

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

totalinteger

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

companystring

The company name associated with this cart.

billingAddressobject

The location the charges are billed to.

shippingAddressobject

The location any items are to be shipped to.

itemsarray

Individual line items for the cart.

couponsarray

Individual coupons applied to the cart.

giftboolean

Denotes whether or not the cart is for a gift purchase.

giftMessagestring

The message to be used on a gift.

giftEmailstring

The email to be used with a gift.

delete

Permanently deletes a specified cart. Cannot be undone.

 
deletehttps://api.hanzo.io/cart/id
curl --request DELETE \
  --url https://api.hanzo.io/cart/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.hanzo.io/cart/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/cart/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/cart/id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/cart/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/cart/id"

response = requests.request("DELETE", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/cart/id")

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

request = Net::HTTP::Delete.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/cart/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

Path Params

id
string
required

Query Params

token
string

Headers

Accept
string

Response

put

Wholly replaces a given cart. Parameters not passed are blanked.

 
puthttps://api.hanzo.io/cart/id
curl --request PUT \
  --url https://api.hanzo.io/cart/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.hanzo.io/cart/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/cart/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/cart/id")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/cart/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/cart/id"

response = requests.request("PUT", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/cart/id")

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

request = Net::HTTP::Put.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/cart/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Cart was created. Conforms to RFC3339.

updatedAt
string

The time this Cart was last updated. Conforms to RFC3339.

userId
string

The user ID that this Cart belings to.

email
string

The email of the user (or someone else, if no user ID exists)

orderId
string

The associated order ID (if one's created)

currency
string

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotal
int64

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discount
int64

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotal
int64

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shipping
int64

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

tax
int64

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

total
int64

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

company
string

The company name associated with this cart.

billingAddress
object

The location the charges are billed to.

shippingAddress
object

The location any items are to be shipped to.

items
array of objects

Individual line items for the cart.

coupons
array of objects

Individual coupons applied to the cart.

gift
boolean

Denotes whether or not the cart is for a gift purchase.

giftMessage
string

The message to be used on a gift.

giftEmail
string

The email to be used with a gift.

Headers

Accept
string

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Cart was created. Conforms to RFC3339.

updatedAtstring

The time this Cart was last updated. Conforms to RFC3339.

userIdstring

The user ID that this Cart belings to.

emailstring

The email of the user (or someone else, if no user ID exists)

orderIdstring

The associated order ID (if one's created)

currencystring

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotalinteger

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discountinteger

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotalinteger

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shippinginteger

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

taxinteger

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

totalinteger

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

companystring

The company name associated with this cart.

billingAddressobject

The location the charges are billed to.

shippingAddressobject

The location any items are to be shipped to.

itemsarray

Individual line items for the cart.

couponsarray

Individual coupons applied to the cart.

giftboolean

Denotes whether or not the cart is for a gift purchase.

giftMessagestring

The message to be used on a gift.

giftEmailstring

The email to be used with a gift.

/cart/{id}/set

 

post

Sets a given quantity of a given product or variant to a cart.

 
posthttps://api.hanzo.io/cart/id/set
curl --request POST \
  --url https://api.hanzo.io/cart/id/set
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.hanzo.io/cart/id/set' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/cart/id/set"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/cart/id/set")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/cart/id/set",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/cart/id/set"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/cart/id/set")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/cart/id/set")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Cart was created. Conforms to RFC3339.

updatedAt
string

The time this Cart was last updated. Conforms to RFC3339.

userId
string

The user ID that this Cart belings to.

email
string

The email of the user (or someone else, if no user ID exists)

orderId
string

The associated order ID (if one's created)

currency
string

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotal
int64

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discount
int64

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotal
int64

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shipping
int64

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

tax
int64

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

total
int64

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

company
string

The company name associated with this cart.

billingAddress
object

The location the charges are billed to.

shippingAddress
object

The location any items are to be shipped to.

items
array of objects

Individual line items for the cart.

coupons
array of objects

Individual coupons applied to the cart.

gift
boolean

Denotes whether or not the cart is for a gift purchase.

giftMessage
string

The message to be used on a gift.

giftEmail
string

The email to be used with a gift.

Headers

Accept
string

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Cart was created. Conforms to RFC3339.

updatedAtstring

The time this Cart was last updated. Conforms to RFC3339.

userIdstring

The user ID that this Cart belings to.

emailstring

The email of the user (or someone else, if no user ID exists)

orderIdstring

The associated order ID (if one's created)

currencystring

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotalinteger

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discountinteger

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotalinteger

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shippinginteger

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

taxinteger

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

totalinteger

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

companystring

The company name associated with this cart.

billingAddressobject

The location the charges are billed to.

shippingAddressobject

The location any items are to be shipped to.

itemsarray

Individual line items for the cart.

couponsarray

Individual coupons applied to the cart.

giftboolean

Denotes whether or not the cart is for a gift purchase.

giftMessagestring

The message to be used on a gift.

giftEmailstring

The email to be used with a gift.

/cart/{id}/discard

 

get

Marks a cart as discarded.

 
gethttps://api.hanzo.io/cart/id/discard
curl --request GET \
  --url https://api.hanzo.io/cart/id/discard
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/cart/id/discard' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/cart/id/discard"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/cart/id/discard")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/cart/id/discard",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/cart/id/discard"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/cart/id/discard")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/cart/id/discard")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Headers

Accept
string

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Cart was created. Conforms to RFC3339.

updatedAtstring

The time this Cart was last updated. Conforms to RFC3339.

userIdstring

The user ID that this Cart belings to.

emailstring

The email of the user (or someone else, if no user ID exists)

orderIdstring

The associated order ID (if one's created)

currencystring

The three-digit identifier for the currency the payment was made in. USD = United States Dollar, JPY = Japanese Yen, etc.

lineTotalinteger

Sum of line item amounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

discountinteger

Sum of any discounts applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

subtotalinteger

Line item totals, less discounts. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

shippinginteger

Shipping costs applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

taxinteger

Sales tax applied. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

totalinteger

Subtotal + shipping + taxes + adjustments. Represented in the least significant unit in the associated currency (so cent for USD, which has partial Dollars, but Yen for JPY, which has no concept of partial Yen.)

companystring

The company name associated with this cart.

billingAddressobject

The location the charges are billed to.

shippingAddressobject

The location any items are to be shipped to.

itemsarray

Individual line items for the cart.

couponsarray

Individual coupons applied to the cart.

giftboolean

Denotes whether or not the cart is for a gift purchase.

giftMessagestring

The message to be used on a gift.

giftEmailstring

The email to be used with a gift.

/checkout/capture/{id}

 

post

Captures a specified order. Second step in the two-step payment process.

 
posthttps://api.hanzo.io/checkout/capture/id
curl --request POST \
  --url https://api.hanzo.io/checkout/capture/id
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.hanzo.io/checkout/capture/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/checkout/capture/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/checkout/capture/id")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/checkout/capture/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/checkout/capture/id"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/checkout/capture/id")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/checkout/capture/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Body Params

orderId
string

Headers

Accept
string
Content-Type
string

Response

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

idstring

The hanzo-assigned guid to identify this item.

userIdstring

The ID of the user responsible for creating this order.

shippinginteger

A monetary measure of shipping charges. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

taxinteger

A monetary measure of all taxes assessed on the order. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

subtotalinteger

A monetary measure of the order's line items, without any extra charges such as shipping or tax. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

totalinteger

A monetary measure of the order's grand total, including extra charges such as shipping or tax. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

itemsarray

An array of Line Items

balanceinteger

The amount currently due on this order. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

paidinteger

The amount that has been paid on this order. Represented in the least significant measure of the store's setcurrency (so cents for USD, yen for JPY, etc).

refundedinteger

The amount that has been refunded on this order. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

billingAddressobject

The location the charges are billed to.

shippingAddressobject

The location any items are to be shipped to.

discountsarray

A listing of non-payment adjustments that have been applied to this order.

paymentsarray

A listing of charges collected for this order.

fulfillmentobject

Details on delivery of the order.

cancelledboolean

Whether or not the order has been cancelled.

shippedboolean

Whether or not the order has been shipped.

testboolean

Whether or not the order is a test.

/checkout/charge

 

post

Authorizes and charges an included order in a one-step process.

 
posthttps://api.hanzo.io/checkout/charge
curl --request POST \
  --url https://api.hanzo.io/checkout/charge
var request = require("request");

var options = { method: 'POST', url: 'https://api.hanzo.io/checkout/charge' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/checkout/charge"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/checkout/charge")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/checkout/charge",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/checkout/charge"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/checkout/charge")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/checkout/charge")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Headers

Accept
string
Content-Type
string

Response

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

idstring

The hanzo-assigned guid to identify this item.

userIdstring

The ID of the user responsible for creating this order.

shippinginteger

A monetary measure of shipping charges. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

taxinteger

A monetary measure of all taxes assessed on the order. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

subtotalinteger

A monetary measure of the order's line items, without any extra charges such as shipping or tax. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

totalinteger

A monetary measure of the order's grand total, including extra charges such as shipping or tax. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

itemsarray

An array of Line Items

balanceinteger

The amount currently due on this order. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

paidinteger

The amount that has been paid on this order. Represented in the least significant measure of the store's setcurrency (so cents for USD, yen for JPY, etc).

refundedinteger

The amount that has been refunded on this order. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

billingAddressobject

The location the charges are billed to.

shippingAddressobject

The location any items are to be shipped to.

discountsarray

A listing of non-payment adjustments that have been applied to this order.

paymentsarray

A listing of charges collected for this order.

fulfillmentobject

Details on delivery of the order.

cancelledboolean

Whether or not the order has been cancelled.

shippedboolean

Whether or not the order has been shipped.

testboolean

Whether or not the order is a test.

/checkout/authorize

 

post

Captures a specified order. First step in the two-step payment process.

 
posthttps://api.hanzo.io/checkout/authorize
curl --request POST \
  --url https://api.hanzo.io/checkout/authorize
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.hanzo.io/checkout/authorize' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/checkout/authorize"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/checkout/authorize")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/checkout/authorize",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/checkout/authorize"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/checkout/authorize")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/checkout/authorize")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Headers

Content-Type
string
Accept
string

Response

createdAtstring

The time this object was created. Conforms to RFCE3339.

updatedAtstring

The time this object was last updated. Conforms to RFCE3339.

idstring

The hanzo-assigned guid to identify this item.

userIdstring

The ID of the user responsible for creating this order.

shippinginteger

A monetary measure of shipping charges. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

taxinteger

A monetary measure of all taxes assessed on the order. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

subtotalinteger

A monetary measure of the order's line items, without any extra charges such as shipping or tax. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

totalinteger

A monetary measure of the order's grand total, including extra charges such as shipping or tax. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

itemsarray

An array of Line Items

balanceinteger

The amount currently due on this order. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

paidinteger

The amount that has been paid on this order. Represented in the least significant measure of the store's setcurrency (so cents for USD, yen for JPY, etc).

refundedinteger

The amount that has been refunded on this order. Represented in the least significant measure of the store's set currency (so cents for USD, yen for JPY, etc).

billingAddressobject

The location the charges are billed to.

shippingAddressobject

The location any items are to be shipped to.

discountsarray

A listing of non-payment adjustments that have been applied to this order.

paymentsarray

A listing of charges collected for this order.

fulfillmentobject

Details on delivery of the order.

cancelledboolean

Whether or not the order has been cancelled.

shippedboolean

Whether or not the order has been shipped.

testboolean

Whether or not the order is a test.

/collection/{id}

 

patch

Updates the Collection piecemeal. Parameters not included in the request are not updated.

 
patchhttps://api.hanzo.io/collection/id
curl --request PATCH \
  --url https://api.hanzo.io/collection/id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.hanzo.io/collection/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/collection/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/collection/id")
  .patch(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/collection/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/collection/id"

response = requests.request("PATCH", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/collection/id")

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

request = Net::HTTP::Patch.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/collection/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Variant was created. Conforms to RFC3339.

updatedAt
string

The time this Variant was last updated. Conforms to RFC3339.

slug
string

The human-readable unique identifier for use in URLs.

name
string

A short name for the collection.

description
string

The long-form description of what the collection is.

productIds
string

A list of IDs relating to Products included in the Collection.

variantIds
string

A list of IDs relating to Variants include in the Collection.

Response

Everything is okay!

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Variant was created. Conforms to RFC3339.

updatedAtstring

The time this Variant was last updated. Conforms to RFC3339.

slugstring

The human-readable unique identifier for use in URLs.

namestring

A short name for the collection.

descriptionstring

The long-form description of what the collection is.

productIdsstring

A list of IDs relating to Products included in the Collection.

variantIdsstring

A list of IDs relating to Variants include in the Collection.

delete

Deletes a Collection. Cannot be undone.

 
deletehttps://api.hanzo.io/collection/id
curl --request DELETE \
  --url https://api.hanzo.io/collection/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.hanzo.io/collection/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/collection/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/collection/id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/collection/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/collection/id"

response = requests.request("DELETE", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/collection/id")

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

request = Net::HTTP::Delete.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/collection/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Response

get

Returns a given Collection.

 
gethttps://api.hanzo.io/collection/id
curl --request GET \
  --url https://api.hanzo.io/collection/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/collection/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/collection/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/collection/id")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/collection/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/collection/id"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/collection/id")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/collection/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Headers

Accept
string

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Variant was created. Conforms to RFC3339.

updatedAtstring

The time this Variant was last updated. Conforms to RFC3339.

slugstring

The human-readable unique identifier for use in URLs.

namestring

A short name for the collection.

descriptionstring

The long-form description of what the collection is.

productIdsstring

A list of IDs relating to Products included in the Collection.

variantIdsstring

A list of IDs relating to Variants include in the Collection.

put

Entirely replaces the given Collection with what is passed. Any unpassed parameters will be blanked.

 
puthttps://api.hanzo.io/collection/id
curl --request PUT \
  --url https://api.hanzo.io/collection/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.hanzo.io/collection/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/collection/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/collection/id")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/collection/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/collection/id"

response = requests.request("PUT", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/collection/id")

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

request = Net::HTTP::Put.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/collection/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Variant was created. Conforms to RFC3339.

updatedAt
string

The time this Variant was last updated. Conforms to RFC3339.

slug
string

The human-readable unique identifier for use in URLs.

name
string

A short name for the collection.

description
string

The long-form description of what the collection is.

productIds
string

A list of IDs relating to Products included in the Collection.

variantIds
string

A list of IDs relating to Variants include in the Collection.

Response

Everything is OK.

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Variant was created. Conforms to RFC3339.

updatedAtstring

The time this Variant was last updated. Conforms to RFC3339.

slugstring

The human-readable unique identifier for use in URLs.

namestring

A short name for the collection.

descriptionstring

The long-form description of what the collection is.

productIdsstring

A list of IDs relating to Products included in the Collection.

variantIdsstring

A list of IDs relating to Variants include in the Collection.

/collection

 

get

 
gethttps://api.hanzo.io/collection
curl --request GET \
  --url https://api.hanzo.io/collection
var request = require("request");

var options = { method: 'GET', url: 'https://api.hanzo.io/collection' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/collection"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/collection")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/collection",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/collection"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/collection")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/collection")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Headers

Accept
string

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Variant was created. Conforms to RFC3339.

updatedAtstring

The time this Variant was last updated. Conforms to RFC3339.

slugstring

The human-readable unique identifier for use in URLs.

namestring

A short name for the collection.

descriptionstring

The long-form description of what the collection is.

productIdsstring

A list of IDs relating to Products included in the Collection.

variantIdsstring

A list of IDs relating to Variants include in the Collection.

post

 
posthttps://api.hanzo.io/collection
curl --request POST \
  --url https://api.hanzo.io/collection
var request = require("request");

var options = { method: 'POST', url: 'https://api.hanzo.io/collection' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/collection"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/collection")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/collection",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/collection"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/collection")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/collection")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Variant was created. Conforms to RFC3339.

updatedAt
string

The time this Variant was last updated. Conforms to RFC3339.

slug
string

The human-readable unique identifier for use in URLs.

name
string

A short name for the collection.

description
string

The long-form description of what the collection is.

productIds
string

A list of IDs relating to Products included in the Collection.

variantIds
string

A list of IDs relating to Variants include in the Collection.

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Variant was created. Conforms to RFC3339.

updatedAtstring

The time this Variant was last updated. Conforms to RFC3339.

slugstring

The human-readable unique identifier for use in URLs.

namestring

A short name for the collection.

descriptionstring

The long-form description of what the collection is.

productIdsstring

A list of IDs relating to Products included in the Collection.

variantIdsstring

A list of IDs relating to Variants include in the Collection.

/coupon

 

get

Returns all available coupons.

 
gethttps://api.hanzo.io/coupon
curl --request GET \
  --url https://api.hanzo.io/coupon
var request = require("request");

var options = { method: 'GET', url: 'https://api.hanzo.io/coupon' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/coupon"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/coupon")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/coupon",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/coupon"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/coupon")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/coupon")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Headers

Accept
string

Response

post

Creates a new coupon.

 
posthttps://api.hanzo.io/coupon
curl --request POST \
  --url https://api.hanzo.io/coupon
var request = require("request");

var options = { method: 'POST', url: 'https://api.hanzo.io/coupon' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/coupon"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/coupon")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/coupon",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/coupon"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/coupon")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/coupon")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Coupon was created. Conforms to RFC3339.

updatedAt
string

The time this Coupon was last updated. Conforms to RFC3339.

name
string

The human-friendly identifier for the coupon.

type
string

The general class of Coupon, such as a discount, free shipping, etc.

code
string

The unique key, preferably human friendly, that users will enter to use the coupon on your store.

startDate
string

The time the Coupon becomes valid. Conforms to RFC3339.

endDate
string

The time the Coupon stops being valid. Conforms to RFC3339.

filter
string
once
boolean

A switch indicating whether this is a one-use coupon or not.

productId
string

The hanzo-provided unique product ID that this coupon applies to.

enabled
boolean

Whether or not the coupon is active.

amount
int64

The monetary value the coupon is good for. Represented in least valuable denomination available (so cents for USD, yen for JPY, etc)

used
int64

How many times the coupon has been redeemed.

Response

Everything is OK - new coupon created.

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Coupon was created. Conforms to RFC3339.

updatedAtstring

The time this Coupon was last updated. Conforms to RFC3339.

namestring

The human-friendly identifier for the coupon.

typestring

The general class of Coupon, such as a discount, free shipping, etc.

codestring

The unique key, preferably human friendly, that users will enter to use the coupon on your store.

startDatestring

The time the Coupon becomes valid. Conforms to RFC3339.

endDatestring

The time the Coupon stops being valid. Conforms to RFC3339.

filterstring
onceboolean

A switch indicating whether this is a one-use coupon or not.

productIdstring

The hanzo-provided unique product ID that this coupon applies to.

enabledboolean

Whether or not the coupon is active.

amountinteger

The monetary value the coupon is good for. Represented in least valuable denomination available (so cents for USD, yen for JPY, etc)

usedinteger

How many times the coupon has been redeemed.

/coupon/{id}

 

put

Wholly replaces the requested coupon. Any fields not provided are blanked.

 
puthttps://api.hanzo.io/coupon/id
curl --request PUT \
  --url https://api.hanzo.io/coupon/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.hanzo.io/coupon/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/coupon/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/coupon/id")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/coupon/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/coupon/id"

response = requests.request("PUT", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/coupon/id")

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

request = Net::HTTP::Put.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/coupon/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Coupon was created. Conforms to RFC3339.

updatedAt
string

The time this Coupon was last updated. Conforms to RFC3339.

name
string

The human-friendly identifier for the coupon.

type
string

The general class of Coupon, such as a discount, free shipping, etc.

code
string

The unique key, preferably human friendly, that users will enter to use the coupon on your store.

startDate
string

The time the Coupon becomes valid. Conforms to RFC3339.

endDate
string

The time the Coupon stops being valid. Conforms to RFC3339.

filter
string
once
boolean

A switch indicating whether this is a one-use coupon or not.

productId
string

The hanzo-provided unique product ID that this coupon applies to.

enabled
boolean

Whether or not the coupon is active.

amount
int64

The monetary value the coupon is good for. Represented in least valuable denomination available (so cents for USD, yen for JPY, etc)

used
int64

How many times the coupon has been redeemed.

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Coupon was created. Conforms to RFC3339.

updatedAtstring

The time this Coupon was last updated. Conforms to RFC3339.

namestring

The human-friendly identifier for the coupon.

typestring

The general class of Coupon, such as a discount, free shipping, etc.

codestring

The unique key, preferably human friendly, that users will enter to use the coupon on your store.

startDatestring

The time the Coupon becomes valid. Conforms to RFC3339.

endDatestring

The time the Coupon stops being valid. Conforms to RFC3339.

filterstring
onceboolean

A switch indicating whether this is a one-use coupon or not.

productIdstring

The hanzo-provided unique product ID that this coupon applies to.

enabledboolean

Whether or not the coupon is active.

amountinteger

The monetary value the coupon is good for. Represented in least valuable denomination available (so cents for USD, yen for JPY, etc)

usedinteger

How many times the coupon has been redeemed.

patch

Replaces the requested coupon piecemeal. Any fields not provided are not changed.

 
patchhttps://api.hanzo.io/coupon/id
curl --request PATCH \
  --url https://api.hanzo.io/coupon/id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.hanzo.io/coupon/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/coupon/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/coupon/id")
  .patch(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/coupon/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/coupon/id"

response = requests.request("PATCH", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/coupon/id")

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

request = Net::HTTP::Patch.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/coupon/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Coupon was created. Conforms to RFC3339.

updatedAt
string

The time this Coupon was last updated. Conforms to RFC3339.

name
string

The human-friendly identifier for the coupon.

type
string

The general class of Coupon, such as a discount, free shipping, etc.

code
string

The unique key, preferably human friendly, that users will enter to use the coupon on your store.

startDate
string

The time the Coupon becomes valid. Conforms to RFC3339.

endDate
string

The time the Coupon stops being valid. Conforms to RFC3339.

filter
string
once
boolean

A switch indicating whether this is a one-use coupon or not.

productId
string

The hanzo-provided unique product ID that this coupon applies to.

enabled
boolean

Whether or not the coupon is active.

amount
int64

The monetary value the coupon is good for. Represented in least valuable denomination available (so cents for USD, yen for JPY, etc)

used
int64

How many times the coupon has been redeemed.

Response

Everything is OK

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Coupon was created. Conforms to RFC3339.

updatedAtstring

The time this Coupon was last updated. Conforms to RFC3339.

namestring

The human-friendly identifier for the coupon.

typestring

The general class of Coupon, such as a discount, free shipping, etc.

codestring

The unique key, preferably human friendly, that users will enter to use the coupon on your store.

startDatestring

The time the Coupon becomes valid. Conforms to RFC3339.

endDatestring

The time the Coupon stops being valid. Conforms to RFC3339.

filterstring
onceboolean

A switch indicating whether this is a one-use coupon or not.

productIdstring

The hanzo-provided unique product ID that this coupon applies to.

enabledboolean

Whether or not the coupon is active.

amountinteger

The monetary value the coupon is good for. Represented in least valuable denomination available (so cents for USD, yen for JPY, etc)

usedinteger

How many times the coupon has been redeemed.

delete

Deletes the specified coupon. Cannot be undone.

 
deletehttps://api.hanzo.io/coupon/id
curl --request DELETE \
  --url https://api.hanzo.io/coupon/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.hanzo.io/coupon/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/coupon/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/coupon/id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/coupon/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/coupon/id"

response = requests.request("DELETE", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/coupon/id")

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

request = Net::HTTP::Delete.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/coupon/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Response

Everything is OK.

get

Returns the specified coupon.

 
gethttps://api.hanzo.io/coupon/id
curl --request GET \
  --url https://api.hanzo.io/coupon/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.hanzo.io/coupon/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/coupon/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/coupon/id")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/coupon/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/coupon/id"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/coupon/id")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/coupon/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Headers

Accept
string

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Coupon was created. Conforms to RFC3339.

updatedAtstring

The time this Coupon was last updated. Conforms to RFC3339.

namestring

The human-friendly identifier for the coupon.

typestring

The general class of Coupon, such as a discount, free shipping, etc.

codestring

The unique key, preferably human friendly, that users will enter to use the coupon on your store.

startDatestring

The time the Coupon becomes valid. Conforms to RFC3339.

endDatestring

The time the Coupon stops being valid. Conforms to RFC3339.

filterstring
onceboolean

A switch indicating whether this is a one-use coupon or not.

productIdstring

The hanzo-provided unique product ID that this coupon applies to.

enabledboolean

Whether or not the coupon is active.

amountinteger

The monetary value the coupon is good for. Represented in least valuable denomination available (so cents for USD, yen for JPY, etc)

usedinteger

How many times the coupon has been redeemed.

/discount

 

get

Returns all available discounts.

 
gethttps://api.hanzo.io/discount
curl --request GET \
  --url https://api.hanzo.io/discount
var request = require("request");

var options = { method: 'GET', url: 'https://api.hanzo.io/discount' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/discount"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/discount")
  .get()
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/discount",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/discount"

response = requests.request("GET", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/discount")

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

request = Net::HTTP::Get.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/discount")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Headers

Accept
string

Response

post

Creates a new discount.

 
posthttps://api.hanzo.io/discount
curl --request POST \
  --url https://api.hanzo.io/discount
var request = require("request");

var options = { method: 'POST', url: 'https://api.hanzo.io/discount' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/discount"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/discount")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/discount",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/discount"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/discount")

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

request = Net::HTTP::Post.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/discount")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Discount was created. Conforms to RFC3339.

updatedAt
string

The time this Discount was last updated. Conforms to RFC3339.

startDate
string

The date the Discount begins being valid. Conforms to RFC3339.

endDate
string

The date the Discount ceases being valid. Conforms to RFC3339.

scope
object

How broadly a discount applies.

scope.type
string

The scope of the rules to qualify against.

scope.storeId
string

The store ID to scope to.

scope.collectionId
string

The collection ID to scope to.

scope.productId
string

The product ID to scope to.

scope.variantId
string

The variant ID to scope to.

target
object

The intended object for the Discount.

target.type
string

The scope of the rules to qualify against.

target.productId
string

The product ID to scope to.

target.variantId
string

The variant ID to scope to.

type
string

The general class of Discount: one of 'flat', 'percent', 'free-shipping', 'free-item', and 'bulk'.

enabled
boolean

Whether or not the discount is active.

rules
array of objects

An array of Rules

Response

Everything is OK - new discount created.

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Discount was created. Conforms to RFC3339.

updatedAtstring

The time this Discount was last updated. Conforms to RFC3339.

startDatestring

The date the Discount begins being valid. Conforms to RFC3339.

endDatestring

The date the Discount ceases being valid. Conforms to RFC3339.

scopeobject

How broadly a discount applies.

scope.typestring

The scope of the rules to qualify against.

scope.storeIdstring

The store ID to scope to.

scope.collectionIdstring

The collection ID to scope to.

scope.productIdstring

The product ID to scope to.

scope.variantIdstring

The variant ID to scope to.

targetobject

The intended object for the Discount.

target.typestring

The scope of the rules to qualify against.

target.productIdstring

The product ID to scope to.

target.variantIdstring

The variant ID to scope to.

typestring

The general class of Discount: one of 'flat', 'percent', 'free-shipping', 'free-item', and 'bulk'.

enabledboolean

Whether or not the discount is active.

rulesarray

An array of Rules

/discount/{id}

 

put

Wholly replaces the requested discount. Any fields not provided are blanked.

 
puthttps://api.hanzo.io/discount/id
curl --request PUT \
  --url https://api.hanzo.io/discount/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.hanzo.io/discount/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/discount/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/discount/id")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/discount/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/discount/id"

response = requests.request("PUT", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/discount/id")

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

request = Net::HTTP::Put.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/discount/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Discount was created. Conforms to RFC3339.

updatedAt
string

The time this Discount was last updated. Conforms to RFC3339.

startDate
string

The date the Discount begins being valid. Conforms to RFC3339.

endDate
string

The date the Discount ceases being valid. Conforms to RFC3339.

scope
object

How broadly a discount applies.

scope.type
string

The scope of the rules to qualify against.

scope.storeId
string

The store ID to scope to.

scope.collectionId
string

The collection ID to scope to.

scope.productId
string

The product ID to scope to.

scope.variantId
string

The variant ID to scope to.

target
object

The intended object for the Discount.

target.type
string

The scope of the rules to qualify against.

target.productId
string

The product ID to scope to.

target.variantId
string

The variant ID to scope to.

type
string

The general class of Discount: one of 'flat', 'percent', 'free-shipping', 'free-item', and 'bulk'.

enabled
boolean

Whether or not the discount is active.

rules
array of objects

An array of Rules

Response

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Discount was created. Conforms to RFC3339.

updatedAtstring

The time this Discount was last updated. Conforms to RFC3339.

startDatestring

The date the Discount begins being valid. Conforms to RFC3339.

endDatestring

The date the Discount ceases being valid. Conforms to RFC3339.

scopeobject

How broadly a discount applies.

scope.typestring

The scope of the rules to qualify against.

scope.storeIdstring

The store ID to scope to.

scope.collectionIdstring

The collection ID to scope to.

scope.productIdstring

The product ID to scope to.

scope.variantIdstring

The variant ID to scope to.

targetobject

The intended object for the Discount.

target.typestring

The scope of the rules to qualify against.

target.productIdstring

The product ID to scope to.

target.variantIdstring

The variant ID to scope to.

typestring

The general class of Discount: one of 'flat', 'percent', 'free-shipping', 'free-item', and 'bulk'.

enabledboolean

Whether or not the discount is active.

rulesarray

An array of Rules

patch

Replaces the requested discount piecemeal. Any fields not provided are not changed.

 
patchhttps://api.hanzo.io/discount/id
curl --request PATCH \
  --url https://api.hanzo.io/discount/id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.hanzo.io/discount/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/discount/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/discount/id")
  .patch(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/discount/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/discount/id"

response = requests.request("PATCH", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/discount/id")

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

request = Net::HTTP::Patch.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/discount/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"

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

dataTask.resume()
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Query Params

token
string

Body Params

id
string

The hanzo-assigned guid to identify this item.

createdAt
string

The time this Discount was created. Conforms to RFC3339.

updatedAt
string

The time this Discount was last updated. Conforms to RFC3339.

startDate
string

The date the Discount begins being valid. Conforms to RFC3339.

endDate
string

The date the Discount ceases being valid. Conforms to RFC3339.

scope
object

How broadly a discount applies.

scope.type
string

The scope of the rules to qualify against.

scope.storeId
string

The store ID to scope to.

scope.collectionId
string

The collection ID to scope to.

scope.productId
string

The product ID to scope to.

scope.variantId
string

The variant ID to scope to.

target
object

The intended object for the Discount.

target.type
string

The scope of the rules to qualify against.

target.productId
string

The product ID to scope to.

target.variantId
string

The variant ID to scope to.

type
string

The general class of Discount: one of 'flat', 'percent', 'free-shipping', 'free-item', and 'bulk'.

enabled
boolean

Whether or not the discount is active.

rules
array of objects

An array of Rules

Response

Everything is OK

idstring

The hanzo-assigned guid to identify this item.

createdAtstring

The time this Discount was created. Conforms to RFC3339.

updatedAtstring

The time this Discount was last updated. Conforms to RFC3339.

startDatestring

The date the Discount begins being valid. Conforms to RFC3339.

endDatestring

The date the Discount ceases being valid. Conforms to RFC3339.

scopeobject

How broadly a discount applies.

scope.typestring

The scope of the rules to qualify against.

scope.storeIdstring

The store ID to scope to.

scope.collectionIdstring

The collection ID to scope to.

scope.productIdstring

The product ID to scope to.

scope.variantIdstring

The variant ID to scope to.

targetobject

The intended object for the Discount.

target.typestring

The scope of the rules to qualify against.

target.productIdstring

The product ID to scope to.

target.variantIdstring

The variant ID to scope to.

typestring

The general class of Discount: one of 'flat', 'percent', 'free-shipping', 'free-item', and 'bulk'.

enabledboolean

Whether or not the discount is active.

rulesarray

An array of Rules

delete

Deletes the specified discount. Cannot be undone.

 
deletehttps://api.hanzo.io/discount/id
curl --request DELETE \
  --url https://api.hanzo.io/discount/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.hanzo.io/discount/id' };

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

  console.log(body);
});
package main

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

func main() {

	url := "https://api.hanzo.io/discount/id"

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

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

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

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

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.hanzo.io/discount/id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.hanzo.io/discount/id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
));

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

curl_close($curl);

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

url = "https://api.hanzo.io/discount/id"

response = requests.request("DELETE", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.hanzo.io/discount/id")

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

request = Net::HTTP::Delete.new(url)

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hanzo.io/discount/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session =