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": "IMP-2026-01001",
"declarationId": 45,
"shipmentId": 18,
"status": "processing",
"lrn": "NL202600005"
},
{
"success": false,
"referenceNumber": "IMP-2026-01002",
"errors": [
"DeclarationItems.0.commodityCode must be a valid HS code"
]
}
]
}
Import Declarations
Bulk create declarations
Create multiple import 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": "IMP-2026-01001",
"declarationId": 45,
"shipmentId": 18,
"status": "processing",
"lrn": "NL202600005"
},
{
"success": false,
"referenceNumber": "IMP-2026-01002",
"errors": [
"DeclarationItems.0.commodityCode must be a valid HS code"
]
}
]
}
Create multiple import 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
IMPORT 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": "IMPORT",
"referenceNumber": "IMP-2026-01001",
"Shipment": {
"shipmentNo": "PO-2026-01001",
"remarks": "Summer collection",
"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-01001",
"countryOfDestination": "NL",
"consignee": {
"name": "EZC B.V.",
"street": "Hoofdweg 85",
"city": "Hoofddorp",
"postCode": "2133 LV",
"countryCode": "NL",
"eoriNo": "NL100006139B01"
},
"consignor": {
"name": "Shenzhen Trading Ltd",
"countryCode": "CN",
"street": "88 Baoan Avenue",
"city": "Shenzhen",
"postCode": "518000"
},
"DeclarationItems": [
{
"description": "Women's denim jacket",
"commodityCode": "6204329000",
"quantity": 300,
"grossMass": 180,
"netWeight": 150,
"netPrice": 4200,
"currency": "EUR",
"originCountry": "CN",
"transportCostValue": 220,
"supplementaryQuantity": 300,
"supplementaryQuantityUnit": "NAR",
"additionalProcedureCodes": "F48",
"preferenceCode": "100",
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-01001"
}
]
}
],
"iossNumber": "IM9630041963",
"vatNumber": "NL123456789B01",
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-01001"
}
],
"transport": {
"mode": "AIR",
"identifier": "KL0890"
}
},
{
"type": "IMPORT",
"referenceNumber": "IMP-2026-01002",
"Shipment": {
"shipmentNo": "PO-2026-01002",
"remarks": "Kitchenware replenishment",
"autoClearance": true,
"autoPreclearance": true
},
"declarationOffice": "NL000432",
"goodsLocation": {
"postCode": "2132 NG",
"houseNumber": "25",
"countryCode": "NL"
},
"incoterm": "DAP",
"incotermLocation": "Rotterdam",
"representation": "DIRECT",
"agentEori": "NL100006139B01",
"commercialReference": "INV-2026-01002",
"countryOfDestination": "NL",
"consignee": {
"name": "EZC B.V.",
"street": "Hoofdweg 85",
"city": "Hoofddorp",
"postCode": "2133 LV",
"countryCode": "NL",
"eoriNo": "NL100006139B01"
},
"consignor": {
"name": "Guangzhou Supply Co.",
"countryCode": "CN",
"street": "12 Tianhe Road",
"city": "Guangzhou",
"postCode": "510000"
},
"DeclarationItems": [
{
"description": "Plastic food containers",
"commodityCode": "3924100000",
"quantity": 1200,
"grossMass": 320,
"netWeight": 295,
"netPrice": 5600,
"currency": "EUR",
"originCountry": "CN",
"transportCostValue": 300,
"supplementaryQuantity": 1200,
"supplementaryQuantityUnit": "NAR",
"additionalProcedureCodes": "F49",
"preferenceCode": "100",
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-01002"
}
]
}
],
"documents": [
{
"type": "SupportingDocument",
"code": "N935",
"description": "INV-2026-01002"
}
],
"transport": {
"mode": "SEA",
"identifier": "ONE HAMBURG"
}
}
]
}
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": "IMP-2026-01001",
"declarationId": 45,
"shipmentId": 18,
"status": "processing",
"lrn": "NL202600005"
},
{
"success": false,
"referenceNumber": "IMP-2026-01002",
"errors": [
"DeclarationItems.0.commodityCode must be a valid HS code"
]
}
]
}
⌘I