List Declaration Templates
curl --request GET \
--url https://staging.api.eazecustoms.com/public/v1/declaration-templates \
--header 'Authorization: Bearer <token>' \
--header 'X-Eaze-Client-Ref: <x-eaze-client-ref>'const options = {
method: 'GET',
headers: {'X-Eaze-Client-Ref': '<x-eaze-client-ref>', Authorization: 'Bearer <token>'}
};
fetch('https://staging.api.eazecustoms.com/public/v1/declaration-templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.api.eazecustoms.com/public/v1/declaration-templates"
headers = {
"X-Eaze-Client-Ref": "<x-eaze-client-ref>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://staging.api.eazecustoms.com/public/v1/declaration-templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Eaze-Client-Ref", "<x-eaze-client-ref>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.eazecustoms.com/public/v1/declaration-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Eaze-Client-Ref: <x-eaze-client-ref>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://staging.api.eazecustoms.com/public/v1/declaration-templates")
.header("X-Eaze-Client-Ref", "<x-eaze-client-ref>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.eazecustoms.com/public/v1/declaration-templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Eaze-Client-Ref", "<x-eaze-client-ref>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://staging.api.eazecustoms.com/public/v1/declaration-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Eaze-Client-Ref"] = '<x-eaze-client-ref>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "88888888-8888-4888-8888-888888888888",
"name": "H1 default",
"procedureType": "H1",
"isDefault": true,
"manifestTemplateId": "77777777-7777-4777-8777-777777777777"
}
],
"pagination": {
"limit": 20,
"hasMore": false,
"nextCursor": null
}
}{
"errorCode": "E0001",
"message": "Invalid request parameters",
"errors": [
{
"field": "shipmentType",
"message": "Invalid option: expected one of \"IMPORT\"|\"EXPORT\""
}
],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}{
"errorCode": "E0002",
"message": "Missing, invalid, expired or revoked Eaze Customs API credential",
"errors": [],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}{
"errorCode": "E0003",
"message": "The import module is not enabled for this credential",
"errors": [],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}{
"errorCode": "E0008",
"message": "Public API rate limit exceeded",
"errors": [],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}{
"errorCode": "E0009",
"message": "Unexpected server error",
"errors": [],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}Shipments
List Declaration Templates
Find the Declaration Templates available for the selected client. Sending them on Import Manifest is optional. Leave them out to use the default templates for that Manifest Template.
GET
/
public
/
v1
/
declaration-templates
List Declaration Templates
curl --request GET \
--url https://staging.api.eazecustoms.com/public/v1/declaration-templates \
--header 'Authorization: Bearer <token>' \
--header 'X-Eaze-Client-Ref: <x-eaze-client-ref>'const options = {
method: 'GET',
headers: {'X-Eaze-Client-Ref': '<x-eaze-client-ref>', Authorization: 'Bearer <token>'}
};
fetch('https://staging.api.eazecustoms.com/public/v1/declaration-templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.api.eazecustoms.com/public/v1/declaration-templates"
headers = {
"X-Eaze-Client-Ref": "<x-eaze-client-ref>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://staging.api.eazecustoms.com/public/v1/declaration-templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Eaze-Client-Ref", "<x-eaze-client-ref>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.eazecustoms.com/public/v1/declaration-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Eaze-Client-Ref: <x-eaze-client-ref>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://staging.api.eazecustoms.com/public/v1/declaration-templates")
.header("X-Eaze-Client-Ref", "<x-eaze-client-ref>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.eazecustoms.com/public/v1/declaration-templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Eaze-Client-Ref", "<x-eaze-client-ref>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://staging.api.eazecustoms.com/public/v1/declaration-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Eaze-Client-Ref"] = '<x-eaze-client-ref>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "88888888-8888-4888-8888-888888888888",
"name": "H1 default",
"procedureType": "H1",
"isDefault": true,
"manifestTemplateId": "77777777-7777-4777-8777-777777777777"
}
],
"pagination": {
"limit": 20,
"hasMore": false,
"nextCursor": null
}
}{
"errorCode": "E0001",
"message": "Invalid request parameters",
"errors": [
{
"field": "shipmentType",
"message": "Invalid option: expected one of \"IMPORT\"|\"EXPORT\""
}
],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}{
"errorCode": "E0002",
"message": "Missing, invalid, expired or revoked Eaze Customs API credential",
"errors": [],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}{
"errorCode": "E0003",
"message": "The import module is not enabled for this credential",
"errors": [],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}{
"errorCode": "E0008",
"message": "Public API rate limit exceeded",
"errors": [],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}{
"errorCode": "E0009",
"message": "Unexpected server error",
"errors": [],
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}