Bulk create declarations
curl --request POST \
--url https://devapi.eazecustoms.com/staging/v1/declarations/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"declarations": [
{}
]
}
'import requests
url = "https://devapi.eazecustoms.com/staging/v1/declarations/bulk"
payload = { "declarations": [{}] }
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({declarations: [{}]})
};
fetch('https://devapi.eazecustoms.com/staging/v1/declarations/bulk', 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/declarations/bulk",
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([
'declarations' => [
[
]
]
]),
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/declarations/bulk"
payload := strings.NewReader("{\n \"declarations\": [\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/declarations/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"declarations\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/v1/declarations/bulk")
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 \"declarations\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"success": true,
"referenceNumber": "EXP-2026-01001",
"declarationId": 46,
"shipmentId": 19,
"status": "processing",
"lrn": "NL202600006"
},
{
"success": false,
"referenceNumber": "EXP-2026-01002",
"errors": [
"DeclarationItems.0.commodityCode must be a valid HS code"
]
}
]
}
Export Declarations
Bulk create declarations
Create multiple export declarations in a single request. Processing is partial-success: valid items are created even if others fail.
POST
/
v1
/
declarations
/
bulk
Bulk create declarations
curl --request POST \
--url https://devapi.eazecustoms.com/staging/v1/declarations/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"declarations": [
{}
]
}
'import requests
url = "https://devapi.eazecustoms.com/staging/v1/declarations/bulk"
payload = { "declarations": [{}] }
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({declarations: [{}]})
};
fetch('https://devapi.eazecustoms.com/staging/v1/declarations/bulk', 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/declarations/bulk",
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([
'declarations' => [
[
]
]
]),
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/declarations/bulk"
payload := strings.NewReader("{\n \"declarations\": [\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/declarations/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"declarations\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/v1/declarations/bulk")
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 \"declarations\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"success": true,
"referenceNumber": "EXP-2026-01001",
"declarationId": 46,
"shipmentId": 19,
"status": "processing",
"lrn": "NL202600006"
},
{
"success": false,
"referenceNumber": "EXP-2026-01002",
"errors": [
"DeclarationItems.0.commodityCode must be a valid HS code"
]
}
]
}
Create multiple export declarations in one request. Processing is partial-success: valid items are created even if others fail.
Request Payload
array
required
List of declaration payloads to create in bulk. Each item in the array must follow the simplified
EXPORT or full declaration schema.{
"declarations": [
{
"type": "IMPORT",
"referenceNumber": "IMP-2026-00001",
"Shipment": {
"shipmentNo": "PO-2026-00042",
"remarks": "Split shipment - prioritize customs clearance",
"autoClearance": true,
"autoPreclearance": true
},
"declarationOffice": "NL000432",
"goodsLocation": {
"postCode": "2132 NG",
"houseNumber": "25",
"countryCode": "NL"
},
"incoterm": "DDP",
"incotermLocation": "Hoofddorp",
"representation": "DIRECT",
"agentEori": "NL100006139B01",
"commercialReference": "INV-2026-00042",
"countryOfDestination": "NL",
"consignee": {
"name": "EZC B.V.",
"street": "Hoofdweg 85",
"city": "Hoofddorp",
"postCode": "2133 LV",
"countryCode": "NL",
"eoriNo": "NL100006139B01"
},
"consignor": {
"name": "Shanghai Textile Co. Ltd",
"countryCode": "CN",
"street": "No. 88 Nanjing Road",
"city": "Shanghai",
"postCode": "200001"
},
"DeclarationItems": [
{
"description": "Men's cotton trousers",
"commodityCode": "6203421100",
"quantity": 500,
"grossMass": 250,
"netWeight": 220,
"netPrice": 1875,
"currency": "EUR",
"originCountry": "CN",
"transportCostValue": 125,
"supplementaryQuantity": 500,
"supplementaryQuantityUnit": "NAR",
"additionalProcedureCodes": "F48",
"preferenceCode": "100",
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-00042"
}
]
}
],
"iossNumber": "IM9630041963",
"vatNumber": "NL123456789B01",
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-00042"
}
],
"transport": {
"mode": "AIR",
"identifier": "KL0888"
}
},
{
"type": "EXPORT",
"referenceNumber": "EXP-2026-00001",
"Shipment": {
"shipmentNo": "SO-2026-00077",
"remarks": "Export batch 1 for US consignee",
"autoClearance": true,
"autoPreclearance": true
},
"declarationOffice": "NL000567",
"goodsLocation": {
"postCode": "2132 NG",
"houseNumber": "25",
"countryCode": "NL"
},
"incoterm": "EXW",
"incotermLocation": "Hoofddorp",
"representation": "INDIRECT",
"agentEori": "NL100006139B01",
"commercialReference": "PO-2026-00077",
"countryOfDispatch": "NL",
"exporter": {
"name": "EZC B.V.",
"eoriNo": "NL100006139B01",
"street": "Hoofdweg 85",
"city": "Hoofddorp",
"postCode": "2133 LV",
"countryCode": "NL"
},
"consignee": {
"name": "US Retail Inc.",
"countryCode": "US",
"street": "500 5th Avenue",
"city": "New York",
"postCode": "10110"
},
"DeclarationItems": [
{
"description": "Industrial water pump components",
"commodityCode": "8413810090",
"quantity": 10,
"grossMass": 480,
"netWeight": 450,
"netPrice": 9500,
"currency": "EUR",
"originCountry": "NL",
"transportCostValue": 250,
"supplementaryQuantity": 10,
"supplementaryQuantityUnit": "NAR",
"additionalProcedureCodes": "C30",
"preferenceCode": "100",
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-00999"
}
]
}
],
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-00999"
}
],
"transport": {
"mode": "SEA",
"identifier": "EVER GIVEN"
}
}
]
}
{
"declarations": [
{
"type": "EXPORT",
"referenceNumber": "EXP-2026-01001",
"Shipment": {
"shipmentNo": "SO-2026-01901",
"remarks": "Road export to DE consignee",
"autoClearance": true,
"autoPreclearance": true
},
"declarationOffice": "NL000567",
"goodsLocation": {
"postCode": "2132 NG",
"houseNumber": "25",
"countryCode": "NL"
},
"incoterm": "EXW",
"incotermLocation": "Hoofddorp",
"representation": "INDIRECT",
"agentEori": "NL100006139B01",
"commercialReference": "PO-2026-01001",
"countryOfDispatch": "NL",
"exporter": {
"name": "EZC B.V.",
"eoriNo": "NL100006139B01",
"street": "Hoofdweg 85",
"city": "Hoofddorp",
"postCode": "2133 LV",
"countryCode": "NL"
},
"consignee": {
"name": "Berlin Retail GmbH",
"countryCode": "DE",
"street": "Alexanderplatz 7",
"city": "Berlin",
"postCode": "10178"
},
"DeclarationItems": [
{
"description": "Consumer electronics accessories",
"commodityCode": "8544429000",
"quantity": 800,
"grossMass": 210,
"netWeight": 195,
"netPrice": 7200,
"currency": "EUR",
"originCountry": "NL",
"transportCostValue": 180,
"supplementaryQuantity": 800,
"supplementaryQuantityUnit": "NAR",
"additionalProcedureCodes": "C30",
"preferenceCode": "100",
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-01901"
}
]
}
],
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-01901"
}
],
"transport": {
"mode": "ROAD",
"identifier": "NL-TRK-9021"
}
},
{
"type": "EXPORT",
"referenceNumber": "EXP-2026-01002",
"Shipment": {
"shipmentNo": "SO-2026-01902",
"remarks": "Ocean export to US consignee",
"autoClearance": true,
"autoPreclearance": true
},
"declarationOffice": "NL000567",
"goodsLocation": {
"postCode": "2132 NG",
"houseNumber": "25",
"countryCode": "NL"
},
"incoterm": "FCA",
"incotermLocation": "Rotterdam",
"representation": "INDIRECT",
"agentEori": "NL100006139B01",
"commercialReference": "PO-2026-01002",
"countryOfDispatch": "NL",
"exporter": {
"name": "EZC B.V.",
"eoriNo": "NL100006139B01",
"street": "Hoofdweg 85",
"city": "Hoofddorp",
"postCode": "2133 LV",
"countryCode": "NL"
},
"consignee": {
"name": "US Retail Inc.",
"countryCode": "US",
"street": "500 5th Avenue",
"city": "New York",
"postCode": "10110"
},
"DeclarationItems": [
{
"description": "Industrial water pump components",
"commodityCode": "8413810090",
"quantity": 40,
"grossMass": 620,
"netWeight": 580,
"netPrice": 18500,
"currency": "EUR",
"originCountry": "NL",
"transportCostValue": 450,
"supplementaryQuantity": 40,
"supplementaryQuantityUnit": "NAR",
"additionalProcedureCodes": "C30",
"preferenceCode": "100",
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-01902"
}
]
}
],
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-01902"
}
],
"transport": {
"mode": "SEA",
"identifier": "MAERSK COPENHAGEN"
}
}
]
}
Response
The response returns an array containing the creation results for each submitted declaration. You should inspect thesuccess field for each item in the list to verify if it was successfully created or encountered validation errors.
{
"results": [
{
"success": true,
"referenceNumber": "EXP-2026-01001",
"declarationId": 46,
"shipmentId": 19,
"status": "processing",
"lrn": "NL202600006"
},
{
"success": false,
"referenceNumber": "EXP-2026-01002",
"errors": [
"DeclarationItems.0.commodityCode must be a valid HS code"
]
}
]
}
⌘I