Create declaration template
curl --request POST \
--url https://devapi.eazecustoms.com/staging/v1/declaration-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"declarationTemplateGroupId": 123,
"procedureType": "<string>",
"declarationType": "<string>",
"additionalDeclarationType": "<string>",
"declarationOffice": "<string>",
"countryOfDispatch": "<string>",
"countryOfDestination": "<string>",
"incoterm": "<string>",
"incotermLocation": "<string>",
"PreviousDocuments": [
{}
]
}
'import requests
url = "https://devapi.eazecustoms.com/staging/v1/declaration-templates"
payload = {
"declarationTemplateGroupId": 123,
"procedureType": "<string>",
"declarationType": "<string>",
"additionalDeclarationType": "<string>",
"declarationOffice": "<string>",
"countryOfDispatch": "<string>",
"countryOfDestination": "<string>",
"incoterm": "<string>",
"incotermLocation": "<string>",
"PreviousDocuments": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
declarationTemplateGroupId: 123,
procedureType: '<string>',
declarationType: '<string>',
additionalDeclarationType: '<string>',
declarationOffice: '<string>',
countryOfDispatch: '<string>',
countryOfDestination: '<string>',
incoterm: '<string>',
incotermLocation: '<string>',
PreviousDocuments: [{}]
})
};
fetch('https://devapi.eazecustoms.com/staging/v1/declaration-templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://devapi.eazecustoms.com/staging/v1/declaration-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'declarationTemplateGroupId' => 123,
'procedureType' => '<string>',
'declarationType' => '<string>',
'additionalDeclarationType' => '<string>',
'declarationOffice' => '<string>',
'countryOfDispatch' => '<string>',
'countryOfDestination' => '<string>',
'incoterm' => '<string>',
'incotermLocation' => '<string>',
'PreviousDocuments' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://devapi.eazecustoms.com/staging/v1/declaration-templates"
payload := strings.NewReader("{\n \"declarationTemplateGroupId\": 123,\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"countryOfDispatch\": \"<string>\",\n \"countryOfDestination\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"PreviousDocuments\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://devapi.eazecustoms.com/staging/v1/declaration-templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"declarationTemplateGroupId\": 123,\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"countryOfDispatch\": \"<string>\",\n \"countryOfDestination\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"PreviousDocuments\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/v1/declaration-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"declarationTemplateGroupId\": 123,\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"countryOfDispatch\": \"<string>\",\n \"countryOfDestination\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"PreviousDocuments\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 7,
"declarationTemplateGroupId": 1,
"procedureType": "H1",
"declarationType": "declarationEUGoods",
"declarationOffice": "NL000432",
"createdAt": "2026-06-22T10:00:00.000Z"
}
Declaration Templates
Create declaration template
Create a new declaration template containing default customs field values.
POST
/
v1
/
declaration-templates
Create declaration template
curl --request POST \
--url https://devapi.eazecustoms.com/staging/v1/declaration-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"declarationTemplateGroupId": 123,
"procedureType": "<string>",
"declarationType": "<string>",
"additionalDeclarationType": "<string>",
"declarationOffice": "<string>",
"countryOfDispatch": "<string>",
"countryOfDestination": "<string>",
"incoterm": "<string>",
"incotermLocation": "<string>",
"PreviousDocuments": [
{}
]
}
'import requests
url = "https://devapi.eazecustoms.com/staging/v1/declaration-templates"
payload = {
"declarationTemplateGroupId": 123,
"procedureType": "<string>",
"declarationType": "<string>",
"additionalDeclarationType": "<string>",
"declarationOffice": "<string>",
"countryOfDispatch": "<string>",
"countryOfDestination": "<string>",
"incoterm": "<string>",
"incotermLocation": "<string>",
"PreviousDocuments": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
declarationTemplateGroupId: 123,
procedureType: '<string>',
declarationType: '<string>',
additionalDeclarationType: '<string>',
declarationOffice: '<string>',
countryOfDispatch: '<string>',
countryOfDestination: '<string>',
incoterm: '<string>',
incotermLocation: '<string>',
PreviousDocuments: [{}]
})
};
fetch('https://devapi.eazecustoms.com/staging/v1/declaration-templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://devapi.eazecustoms.com/staging/v1/declaration-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'declarationTemplateGroupId' => 123,
'procedureType' => '<string>',
'declarationType' => '<string>',
'additionalDeclarationType' => '<string>',
'declarationOffice' => '<string>',
'countryOfDispatch' => '<string>',
'countryOfDestination' => '<string>',
'incoterm' => '<string>',
'incotermLocation' => '<string>',
'PreviousDocuments' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://devapi.eazecustoms.com/staging/v1/declaration-templates"
payload := strings.NewReader("{\n \"declarationTemplateGroupId\": 123,\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"countryOfDispatch\": \"<string>\",\n \"countryOfDestination\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"PreviousDocuments\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://devapi.eazecustoms.com/staging/v1/declaration-templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"declarationTemplateGroupId\": 123,\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"countryOfDispatch\": \"<string>\",\n \"countryOfDestination\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"PreviousDocuments\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/v1/declaration-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"declarationTemplateGroupId\": 123,\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"countryOfDispatch\": \"<string>\",\n \"countryOfDestination\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"PreviousDocuments\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 7,
"declarationTemplateGroupId": 1,
"procedureType": "H1",
"declarationType": "declarationEUGoods",
"declarationOffice": "NL000432",
"createdAt": "2026-06-22T10:00:00.000Z"
}
Create a new declaration template containing default customs field values. The template is linked to a template group.
Request payload
integer
required
The ID of the template group this template belongs to.
string
required
Default customs procedure code. Allowed values:
H1, H2, H3, H4, H5, H6, H7, I1, I2, I2A, I2B, B1, B2, B3, B4, C1, C2, D1, D2, D3, D4.string
Declaration type. Example:
declarationEUGoods.string
Additional declaration type. Allowed values:
STANDARD, SIMPLIFIED.string
Default customs office code (e.g.
NL000432).string
Country of dispatch ISO code (e.g.
CN).string
Country of destination ISO code (e.g.
NL).string
Default Incoterm code. Allowed values:
EXW, FCA, FAS, FOB, CFR, CIF, CPT, CIP, DAP, DPU, DDP, XXX.string
Default Incoterm location (e.g.
Hoofddorp).array
Default previous documents to include on declarations.
JSON Payload
{
"declarationTemplateGroupId": 1,
"procedureType": "H1",
"declarationType": "declarationEUGoods",
"additionalDeclarationType": "STANDARD",
"declarationOffice": "NL000432",
"countryOfDispatch": "CN",
"countryOfDestination": "NL",
"incoterm": "DAP",
"incotermLocation": "Hoofddorp",
"PreviousDocuments": [
{
"typeCode": "N853",
"description": "Previous Doc Example",
"documentCategory": 0
}
]
}
{
"id": 7,
"declarationTemplateGroupId": 1,
"procedureType": "H1",
"declarationType": "declarationEUGoods",
"declarationOffice": "NL000432",
"createdAt": "2026-06-22T10:00:00.000Z"
}
⌘I