Submit an export declaration
curl --request POST \
--url https://devapi.eazecustoms.com/staging/v1/declarations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"Shipment": {
"shipmentNo": "<string>",
"shipmentType": "<string>",
"remarks": "<string>"
},
"commercialReference": "<string>",
"procedureType": "<string>",
"declarationType": "<string>",
"additionalDeclarationType": "<string>",
"representation": "<string>",
"declarationOffice": "<string>",
"goodsLocationType": "<string>",
"goodsLocationAddressType": "<string>",
"goodsLocationAddress": {
"Address": {
"houseNo": "<string>",
"street": "<string>",
"city": "<string>",
"countryCode": "<string>",
"postCode": "<string>"
}
},
"countryOfDestination": "<string>",
"arrivalTransportType": "<string>",
"arrivalTransportNameType": "<string>",
"arrivalTransportName": "<string>",
"borderTransportType": "<string>",
"invoiceCurrency": "<string>",
"incoterm": "<string>",
"incotermLocation": "<string>",
"Exporter": {
"name": "<string>",
"street": "<string>",
"houseNo": "<string>",
"city": "<string>",
"state": "<string>",
"stateRegion": "<string>",
"postcode": "<string>",
"countryCode": "<string>",
"eoriNo": "<string>",
"vatNo": "<string>",
"iossNo": "<string>"
},
"Consignee": {
"name": "<string>",
"street": "<string>",
"houseNo": "<string>",
"city": "<string>",
"state": "<string>",
"stateRegion": "<string>",
"postcode": "<string>",
"countryCode": "<string>",
"eoriNo": "<string>",
"vatNo": "<string>",
"iossNo": "<string>"
},
"SupportingDocuments": [
{
"typeCode": "<string>",
"description": "<string>"
}
],
"AdditionalInformations": [
{
"typeCode": "<string>",
"description": "<string>"
}
],
"DeclarationItems": [
{
"description": "<string>",
"commodityCode": "<string>",
"quantity": 123,
"grossMass": 123,
"netWeight": 123,
"netPrice": 123,
"currency": "<string>",
"originCountry": "<string>",
"supplementaryQuantity": 123,
"supplementaryQuantityUnit": "<string>",
"additionalProcedureCodes": "<string>",
"SupportingDocuments": [
{}
]
}
]
}
'import requests
url = "https://devapi.eazecustoms.com/staging/v1/declarations"
payload = {
"type": "<string>",
"Shipment": {
"shipmentNo": "<string>",
"shipmentType": "<string>",
"remarks": "<string>"
},
"commercialReference": "<string>",
"procedureType": "<string>",
"declarationType": "<string>",
"additionalDeclarationType": "<string>",
"representation": "<string>",
"declarationOffice": "<string>",
"goodsLocationType": "<string>",
"goodsLocationAddressType": "<string>",
"goodsLocationAddress": { "Address": {
"houseNo": "<string>",
"street": "<string>",
"city": "<string>",
"countryCode": "<string>",
"postCode": "<string>"
} },
"countryOfDestination": "<string>",
"arrivalTransportType": "<string>",
"arrivalTransportNameType": "<string>",
"arrivalTransportName": "<string>",
"borderTransportType": "<string>",
"invoiceCurrency": "<string>",
"incoterm": "<string>",
"incotermLocation": "<string>",
"Exporter": {
"name": "<string>",
"street": "<string>",
"houseNo": "<string>",
"city": "<string>",
"state": "<string>",
"stateRegion": "<string>",
"postcode": "<string>",
"countryCode": "<string>",
"eoriNo": "<string>",
"vatNo": "<string>",
"iossNo": "<string>"
},
"Consignee": {
"name": "<string>",
"street": "<string>",
"houseNo": "<string>",
"city": "<string>",
"state": "<string>",
"stateRegion": "<string>",
"postcode": "<string>",
"countryCode": "<string>",
"eoriNo": "<string>",
"vatNo": "<string>",
"iossNo": "<string>"
},
"SupportingDocuments": [
{
"typeCode": "<string>",
"description": "<string>"
}
],
"AdditionalInformations": [
{
"typeCode": "<string>",
"description": "<string>"
}
],
"DeclarationItems": [
{
"description": "<string>",
"commodityCode": "<string>",
"quantity": 123,
"grossMass": 123,
"netWeight": 123,
"netPrice": 123,
"currency": "<string>",
"originCountry": "<string>",
"supplementaryQuantity": 123,
"supplementaryQuantityUnit": "<string>",
"additionalProcedureCodes": "<string>",
"SupportingDocuments": [{}]
}
]
}
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({
type: '<string>',
Shipment: {shipmentNo: '<string>', shipmentType: '<string>', remarks: '<string>'},
commercialReference: '<string>',
procedureType: '<string>',
declarationType: '<string>',
additionalDeclarationType: '<string>',
representation: '<string>',
declarationOffice: '<string>',
goodsLocationType: '<string>',
goodsLocationAddressType: '<string>',
goodsLocationAddress: {
Address: {
houseNo: '<string>',
street: '<string>',
city: '<string>',
countryCode: '<string>',
postCode: '<string>'
}
},
countryOfDestination: '<string>',
arrivalTransportType: '<string>',
arrivalTransportNameType: '<string>',
arrivalTransportName: '<string>',
borderTransportType: '<string>',
invoiceCurrency: '<string>',
incoterm: '<string>',
incotermLocation: '<string>',
Exporter: {
name: '<string>',
street: '<string>',
houseNo: '<string>',
city: '<string>',
state: '<string>',
stateRegion: '<string>',
postcode: '<string>',
countryCode: '<string>',
eoriNo: '<string>',
vatNo: '<string>',
iossNo: '<string>'
},
Consignee: {
name: '<string>',
street: '<string>',
houseNo: '<string>',
city: '<string>',
state: '<string>',
stateRegion: '<string>',
postcode: '<string>',
countryCode: '<string>',
eoriNo: '<string>',
vatNo: '<string>',
iossNo: '<string>'
},
SupportingDocuments: [{typeCode: '<string>', description: '<string>'}],
AdditionalInformations: [{typeCode: '<string>', description: '<string>'}],
DeclarationItems: [
{
description: '<string>',
commodityCode: '<string>',
quantity: 123,
grossMass: 123,
netWeight: 123,
netPrice: 123,
currency: '<string>',
originCountry: '<string>',
supplementaryQuantity: 123,
supplementaryQuantityUnit: '<string>',
additionalProcedureCodes: '<string>',
SupportingDocuments: [{}]
}
]
})
};
fetch('https://devapi.eazecustoms.com/staging/v1/declarations', 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",
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([
'type' => '<string>',
'Shipment' => [
'shipmentNo' => '<string>',
'shipmentType' => '<string>',
'remarks' => '<string>'
],
'commercialReference' => '<string>',
'procedureType' => '<string>',
'declarationType' => '<string>',
'additionalDeclarationType' => '<string>',
'representation' => '<string>',
'declarationOffice' => '<string>',
'goodsLocationType' => '<string>',
'goodsLocationAddressType' => '<string>',
'goodsLocationAddress' => [
'Address' => [
'houseNo' => '<string>',
'street' => '<string>',
'city' => '<string>',
'countryCode' => '<string>',
'postCode' => '<string>'
]
],
'countryOfDestination' => '<string>',
'arrivalTransportType' => '<string>',
'arrivalTransportNameType' => '<string>',
'arrivalTransportName' => '<string>',
'borderTransportType' => '<string>',
'invoiceCurrency' => '<string>',
'incoterm' => '<string>',
'incotermLocation' => '<string>',
'Exporter' => [
'name' => '<string>',
'street' => '<string>',
'houseNo' => '<string>',
'city' => '<string>',
'state' => '<string>',
'stateRegion' => '<string>',
'postcode' => '<string>',
'countryCode' => '<string>',
'eoriNo' => '<string>',
'vatNo' => '<string>',
'iossNo' => '<string>'
],
'Consignee' => [
'name' => '<string>',
'street' => '<string>',
'houseNo' => '<string>',
'city' => '<string>',
'state' => '<string>',
'stateRegion' => '<string>',
'postcode' => '<string>',
'countryCode' => '<string>',
'eoriNo' => '<string>',
'vatNo' => '<string>',
'iossNo' => '<string>'
],
'SupportingDocuments' => [
[
'typeCode' => '<string>',
'description' => '<string>'
]
],
'AdditionalInformations' => [
[
'typeCode' => '<string>',
'description' => '<string>'
]
],
'DeclarationItems' => [
[
'description' => '<string>',
'commodityCode' => '<string>',
'quantity' => 123,
'grossMass' => 123,
'netWeight' => 123,
'netPrice' => 123,
'currency' => '<string>',
'originCountry' => '<string>',
'supplementaryQuantity' => 123,
'supplementaryQuantityUnit' => '<string>',
'additionalProcedureCodes' => '<string>',
'SupportingDocuments' => [
[
]
]
]
]
]),
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"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"Shipment\": {\n \"shipmentNo\": \"<string>\",\n \"shipmentType\": \"<string>\",\n \"remarks\": \"<string>\"\n },\n \"commercialReference\": \"<string>\",\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"representation\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"goodsLocationType\": \"<string>\",\n \"goodsLocationAddressType\": \"<string>\",\n \"goodsLocationAddress\": {\n \"Address\": {\n \"houseNo\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postCode\": \"<string>\"\n }\n },\n \"countryOfDestination\": \"<string>\",\n \"arrivalTransportType\": \"<string>\",\n \"arrivalTransportNameType\": \"<string>\",\n \"arrivalTransportName\": \"<string>\",\n \"borderTransportType\": \"<string>\",\n \"invoiceCurrency\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"Exporter\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"Consignee\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"SupportingDocuments\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"AdditionalInformations\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"DeclarationItems\": [\n {\n \"description\": \"<string>\",\n \"commodityCode\": \"<string>\",\n \"quantity\": 123,\n \"grossMass\": 123,\n \"netWeight\": 123,\n \"netPrice\": 123,\n \"currency\": \"<string>\",\n \"originCountry\": \"<string>\",\n \"supplementaryQuantity\": 123,\n \"supplementaryQuantityUnit\": \"<string>\",\n \"additionalProcedureCodes\": \"<string>\",\n \"SupportingDocuments\": [\n {}\n ]\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"Shipment\": {\n \"shipmentNo\": \"<string>\",\n \"shipmentType\": \"<string>\",\n \"remarks\": \"<string>\"\n },\n \"commercialReference\": \"<string>\",\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"representation\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"goodsLocationType\": \"<string>\",\n \"goodsLocationAddressType\": \"<string>\",\n \"goodsLocationAddress\": {\n \"Address\": {\n \"houseNo\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postCode\": \"<string>\"\n }\n },\n \"countryOfDestination\": \"<string>\",\n \"arrivalTransportType\": \"<string>\",\n \"arrivalTransportNameType\": \"<string>\",\n \"arrivalTransportName\": \"<string>\",\n \"borderTransportType\": \"<string>\",\n \"invoiceCurrency\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"Exporter\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"Consignee\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"SupportingDocuments\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"AdditionalInformations\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"DeclarationItems\": [\n {\n \"description\": \"<string>\",\n \"commodityCode\": \"<string>\",\n \"quantity\": 123,\n \"grossMass\": 123,\n \"netWeight\": 123,\n \"netPrice\": 123,\n \"currency\": \"<string>\",\n \"originCountry\": \"<string>\",\n \"supplementaryQuantity\": 123,\n \"supplementaryQuantityUnit\": \"<string>\",\n \"additionalProcedureCodes\": \"<string>\",\n \"SupportingDocuments\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/v1/declarations")
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 \"type\": \"<string>\",\n \"Shipment\": {\n \"shipmentNo\": \"<string>\",\n \"shipmentType\": \"<string>\",\n \"remarks\": \"<string>\"\n },\n \"commercialReference\": \"<string>\",\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"representation\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"goodsLocationType\": \"<string>\",\n \"goodsLocationAddressType\": \"<string>\",\n \"goodsLocationAddress\": {\n \"Address\": {\n \"houseNo\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postCode\": \"<string>\"\n }\n },\n \"countryOfDestination\": \"<string>\",\n \"arrivalTransportType\": \"<string>\",\n \"arrivalTransportNameType\": \"<string>\",\n \"arrivalTransportName\": \"<string>\",\n \"borderTransportType\": \"<string>\",\n \"invoiceCurrency\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"Exporter\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"Consignee\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"SupportingDocuments\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"AdditionalInformations\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"DeclarationItems\": [\n {\n \"description\": \"<string>\",\n \"commodityCode\": \"<string>\",\n \"quantity\": 123,\n \"grossMass\": 123,\n \"netWeight\": 123,\n \"netPrice\": 123,\n \"currency\": \"<string>\",\n \"originCountry\": \"<string>\",\n \"supplementaryQuantity\": 123,\n \"supplementaryQuantityUnit\": \"<string>\",\n \"additionalProcedureCodes\": \"<string>\",\n \"SupportingDocuments\": [\n {}\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"declarationId": 43,
"shipmentId": 16,
"referenceNumber": "INV-2026-07001",
"status": "processing",
"lrn": "NL202600002"
}
{
"statusCode": 400,
"message": [
"DeclarationItems.0.commodityCode must be a valid HS code"
],
"error": "Bad Request"
}
Export Declarations
Submit an export declaration
Creates and queues a new export customs declaration. You can send either a simplified external EXPORT payload or the full internal declaration payload.
POST
/
v1
/
declarations
Submit an export declaration
curl --request POST \
--url https://devapi.eazecustoms.com/staging/v1/declarations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"Shipment": {
"shipmentNo": "<string>",
"shipmentType": "<string>",
"remarks": "<string>"
},
"commercialReference": "<string>",
"procedureType": "<string>",
"declarationType": "<string>",
"additionalDeclarationType": "<string>",
"representation": "<string>",
"declarationOffice": "<string>",
"goodsLocationType": "<string>",
"goodsLocationAddressType": "<string>",
"goodsLocationAddress": {
"Address": {
"houseNo": "<string>",
"street": "<string>",
"city": "<string>",
"countryCode": "<string>",
"postCode": "<string>"
}
},
"countryOfDestination": "<string>",
"arrivalTransportType": "<string>",
"arrivalTransportNameType": "<string>",
"arrivalTransportName": "<string>",
"borderTransportType": "<string>",
"invoiceCurrency": "<string>",
"incoterm": "<string>",
"incotermLocation": "<string>",
"Exporter": {
"name": "<string>",
"street": "<string>",
"houseNo": "<string>",
"city": "<string>",
"state": "<string>",
"stateRegion": "<string>",
"postcode": "<string>",
"countryCode": "<string>",
"eoriNo": "<string>",
"vatNo": "<string>",
"iossNo": "<string>"
},
"Consignee": {
"name": "<string>",
"street": "<string>",
"houseNo": "<string>",
"city": "<string>",
"state": "<string>",
"stateRegion": "<string>",
"postcode": "<string>",
"countryCode": "<string>",
"eoriNo": "<string>",
"vatNo": "<string>",
"iossNo": "<string>"
},
"SupportingDocuments": [
{
"typeCode": "<string>",
"description": "<string>"
}
],
"AdditionalInformations": [
{
"typeCode": "<string>",
"description": "<string>"
}
],
"DeclarationItems": [
{
"description": "<string>",
"commodityCode": "<string>",
"quantity": 123,
"grossMass": 123,
"netWeight": 123,
"netPrice": 123,
"currency": "<string>",
"originCountry": "<string>",
"supplementaryQuantity": 123,
"supplementaryQuantityUnit": "<string>",
"additionalProcedureCodes": "<string>",
"SupportingDocuments": [
{}
]
}
]
}
'import requests
url = "https://devapi.eazecustoms.com/staging/v1/declarations"
payload = {
"type": "<string>",
"Shipment": {
"shipmentNo": "<string>",
"shipmentType": "<string>",
"remarks": "<string>"
},
"commercialReference": "<string>",
"procedureType": "<string>",
"declarationType": "<string>",
"additionalDeclarationType": "<string>",
"representation": "<string>",
"declarationOffice": "<string>",
"goodsLocationType": "<string>",
"goodsLocationAddressType": "<string>",
"goodsLocationAddress": { "Address": {
"houseNo": "<string>",
"street": "<string>",
"city": "<string>",
"countryCode": "<string>",
"postCode": "<string>"
} },
"countryOfDestination": "<string>",
"arrivalTransportType": "<string>",
"arrivalTransportNameType": "<string>",
"arrivalTransportName": "<string>",
"borderTransportType": "<string>",
"invoiceCurrency": "<string>",
"incoterm": "<string>",
"incotermLocation": "<string>",
"Exporter": {
"name": "<string>",
"street": "<string>",
"houseNo": "<string>",
"city": "<string>",
"state": "<string>",
"stateRegion": "<string>",
"postcode": "<string>",
"countryCode": "<string>",
"eoriNo": "<string>",
"vatNo": "<string>",
"iossNo": "<string>"
},
"Consignee": {
"name": "<string>",
"street": "<string>",
"houseNo": "<string>",
"city": "<string>",
"state": "<string>",
"stateRegion": "<string>",
"postcode": "<string>",
"countryCode": "<string>",
"eoriNo": "<string>",
"vatNo": "<string>",
"iossNo": "<string>"
},
"SupportingDocuments": [
{
"typeCode": "<string>",
"description": "<string>"
}
],
"AdditionalInformations": [
{
"typeCode": "<string>",
"description": "<string>"
}
],
"DeclarationItems": [
{
"description": "<string>",
"commodityCode": "<string>",
"quantity": 123,
"grossMass": 123,
"netWeight": 123,
"netPrice": 123,
"currency": "<string>",
"originCountry": "<string>",
"supplementaryQuantity": 123,
"supplementaryQuantityUnit": "<string>",
"additionalProcedureCodes": "<string>",
"SupportingDocuments": [{}]
}
]
}
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({
type: '<string>',
Shipment: {shipmentNo: '<string>', shipmentType: '<string>', remarks: '<string>'},
commercialReference: '<string>',
procedureType: '<string>',
declarationType: '<string>',
additionalDeclarationType: '<string>',
representation: '<string>',
declarationOffice: '<string>',
goodsLocationType: '<string>',
goodsLocationAddressType: '<string>',
goodsLocationAddress: {
Address: {
houseNo: '<string>',
street: '<string>',
city: '<string>',
countryCode: '<string>',
postCode: '<string>'
}
},
countryOfDestination: '<string>',
arrivalTransportType: '<string>',
arrivalTransportNameType: '<string>',
arrivalTransportName: '<string>',
borderTransportType: '<string>',
invoiceCurrency: '<string>',
incoterm: '<string>',
incotermLocation: '<string>',
Exporter: {
name: '<string>',
street: '<string>',
houseNo: '<string>',
city: '<string>',
state: '<string>',
stateRegion: '<string>',
postcode: '<string>',
countryCode: '<string>',
eoriNo: '<string>',
vatNo: '<string>',
iossNo: '<string>'
},
Consignee: {
name: '<string>',
street: '<string>',
houseNo: '<string>',
city: '<string>',
state: '<string>',
stateRegion: '<string>',
postcode: '<string>',
countryCode: '<string>',
eoriNo: '<string>',
vatNo: '<string>',
iossNo: '<string>'
},
SupportingDocuments: [{typeCode: '<string>', description: '<string>'}],
AdditionalInformations: [{typeCode: '<string>', description: '<string>'}],
DeclarationItems: [
{
description: '<string>',
commodityCode: '<string>',
quantity: 123,
grossMass: 123,
netWeight: 123,
netPrice: 123,
currency: '<string>',
originCountry: '<string>',
supplementaryQuantity: 123,
supplementaryQuantityUnit: '<string>',
additionalProcedureCodes: '<string>',
SupportingDocuments: [{}]
}
]
})
};
fetch('https://devapi.eazecustoms.com/staging/v1/declarations', 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",
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([
'type' => '<string>',
'Shipment' => [
'shipmentNo' => '<string>',
'shipmentType' => '<string>',
'remarks' => '<string>'
],
'commercialReference' => '<string>',
'procedureType' => '<string>',
'declarationType' => '<string>',
'additionalDeclarationType' => '<string>',
'representation' => '<string>',
'declarationOffice' => '<string>',
'goodsLocationType' => '<string>',
'goodsLocationAddressType' => '<string>',
'goodsLocationAddress' => [
'Address' => [
'houseNo' => '<string>',
'street' => '<string>',
'city' => '<string>',
'countryCode' => '<string>',
'postCode' => '<string>'
]
],
'countryOfDestination' => '<string>',
'arrivalTransportType' => '<string>',
'arrivalTransportNameType' => '<string>',
'arrivalTransportName' => '<string>',
'borderTransportType' => '<string>',
'invoiceCurrency' => '<string>',
'incoterm' => '<string>',
'incotermLocation' => '<string>',
'Exporter' => [
'name' => '<string>',
'street' => '<string>',
'houseNo' => '<string>',
'city' => '<string>',
'state' => '<string>',
'stateRegion' => '<string>',
'postcode' => '<string>',
'countryCode' => '<string>',
'eoriNo' => '<string>',
'vatNo' => '<string>',
'iossNo' => '<string>'
],
'Consignee' => [
'name' => '<string>',
'street' => '<string>',
'houseNo' => '<string>',
'city' => '<string>',
'state' => '<string>',
'stateRegion' => '<string>',
'postcode' => '<string>',
'countryCode' => '<string>',
'eoriNo' => '<string>',
'vatNo' => '<string>',
'iossNo' => '<string>'
],
'SupportingDocuments' => [
[
'typeCode' => '<string>',
'description' => '<string>'
]
],
'AdditionalInformations' => [
[
'typeCode' => '<string>',
'description' => '<string>'
]
],
'DeclarationItems' => [
[
'description' => '<string>',
'commodityCode' => '<string>',
'quantity' => 123,
'grossMass' => 123,
'netWeight' => 123,
'netPrice' => 123,
'currency' => '<string>',
'originCountry' => '<string>',
'supplementaryQuantity' => 123,
'supplementaryQuantityUnit' => '<string>',
'additionalProcedureCodes' => '<string>',
'SupportingDocuments' => [
[
]
]
]
]
]),
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"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"Shipment\": {\n \"shipmentNo\": \"<string>\",\n \"shipmentType\": \"<string>\",\n \"remarks\": \"<string>\"\n },\n \"commercialReference\": \"<string>\",\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"representation\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"goodsLocationType\": \"<string>\",\n \"goodsLocationAddressType\": \"<string>\",\n \"goodsLocationAddress\": {\n \"Address\": {\n \"houseNo\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postCode\": \"<string>\"\n }\n },\n \"countryOfDestination\": \"<string>\",\n \"arrivalTransportType\": \"<string>\",\n \"arrivalTransportNameType\": \"<string>\",\n \"arrivalTransportName\": \"<string>\",\n \"borderTransportType\": \"<string>\",\n \"invoiceCurrency\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"Exporter\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"Consignee\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"SupportingDocuments\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"AdditionalInformations\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"DeclarationItems\": [\n {\n \"description\": \"<string>\",\n \"commodityCode\": \"<string>\",\n \"quantity\": 123,\n \"grossMass\": 123,\n \"netWeight\": 123,\n \"netPrice\": 123,\n \"currency\": \"<string>\",\n \"originCountry\": \"<string>\",\n \"supplementaryQuantity\": 123,\n \"supplementaryQuantityUnit\": \"<string>\",\n \"additionalProcedureCodes\": \"<string>\",\n \"SupportingDocuments\": [\n {}\n ]\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"Shipment\": {\n \"shipmentNo\": \"<string>\",\n \"shipmentType\": \"<string>\",\n \"remarks\": \"<string>\"\n },\n \"commercialReference\": \"<string>\",\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"representation\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"goodsLocationType\": \"<string>\",\n \"goodsLocationAddressType\": \"<string>\",\n \"goodsLocationAddress\": {\n \"Address\": {\n \"houseNo\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postCode\": \"<string>\"\n }\n },\n \"countryOfDestination\": \"<string>\",\n \"arrivalTransportType\": \"<string>\",\n \"arrivalTransportNameType\": \"<string>\",\n \"arrivalTransportName\": \"<string>\",\n \"borderTransportType\": \"<string>\",\n \"invoiceCurrency\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"Exporter\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"Consignee\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"SupportingDocuments\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"AdditionalInformations\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"DeclarationItems\": [\n {\n \"description\": \"<string>\",\n \"commodityCode\": \"<string>\",\n \"quantity\": 123,\n \"grossMass\": 123,\n \"netWeight\": 123,\n \"netPrice\": 123,\n \"currency\": \"<string>\",\n \"originCountry\": \"<string>\",\n \"supplementaryQuantity\": 123,\n \"supplementaryQuantityUnit\": \"<string>\",\n \"additionalProcedureCodes\": \"<string>\",\n \"SupportingDocuments\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/v1/declarations")
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 \"type\": \"<string>\",\n \"Shipment\": {\n \"shipmentNo\": \"<string>\",\n \"shipmentType\": \"<string>\",\n \"remarks\": \"<string>\"\n },\n \"commercialReference\": \"<string>\",\n \"procedureType\": \"<string>\",\n \"declarationType\": \"<string>\",\n \"additionalDeclarationType\": \"<string>\",\n \"representation\": \"<string>\",\n \"declarationOffice\": \"<string>\",\n \"goodsLocationType\": \"<string>\",\n \"goodsLocationAddressType\": \"<string>\",\n \"goodsLocationAddress\": {\n \"Address\": {\n \"houseNo\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postCode\": \"<string>\"\n }\n },\n \"countryOfDestination\": \"<string>\",\n \"arrivalTransportType\": \"<string>\",\n \"arrivalTransportNameType\": \"<string>\",\n \"arrivalTransportName\": \"<string>\",\n \"borderTransportType\": \"<string>\",\n \"invoiceCurrency\": \"<string>\",\n \"incoterm\": \"<string>\",\n \"incotermLocation\": \"<string>\",\n \"Exporter\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"Consignee\": {\n \"name\": \"<string>\",\n \"street\": \"<string>\",\n \"houseNo\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateRegion\": \"<string>\",\n \"postcode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"eoriNo\": \"<string>\",\n \"vatNo\": \"<string>\",\n \"iossNo\": \"<string>\"\n },\n \"SupportingDocuments\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"AdditionalInformations\": [\n {\n \"typeCode\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"DeclarationItems\": [\n {\n \"description\": \"<string>\",\n \"commodityCode\": \"<string>\",\n \"quantity\": 123,\n \"grossMass\": 123,\n \"netWeight\": 123,\n \"netPrice\": 123,\n \"currency\": \"<string>\",\n \"originCountry\": \"<string>\",\n \"supplementaryQuantity\": 123,\n \"supplementaryQuantityUnit\": \"<string>\",\n \"additionalProcedureCodes\": \"<string>\",\n \"SupportingDocuments\": [\n {}\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"declarationId": 43,
"shipmentId": 16,
"referenceNumber": "INV-2026-07001",
"status": "processing",
"lrn": "NL202600002"
}
{
"statusCode": 400,
"message": [
"DeclarationItems.0.commodityCode must be a valid HS code"
],
"error": "Bad Request"
}
Creates and queues a new export customs declaration. You can send either (1) a simplified external
EXPORT payload using type, or (2) the full internal declaration payload. Use the full payload when you need complete field coverage (all parties, all document groups, deliveries, and declaration items). The owning company is always resolved from your API key — any companyId (or Shipment.companyId) provided in the request body is ignored.
Validation runs asynchronously — status will move from processing → ready once complete.
Request Payload
string
Required for the simplified external payload. Must be set to
EXPORT. (Omit if sending the full internal payload).object
required
General shipment metadata mapping to the physical goods in transit.
string
required
Commercial reference identifier (e.g., commercial invoice number).
string
required
The standard customs procedure code (shortcode). Commonly used values:
B1— Standard export declarationB2— Periodic export declarationB3— Occasional export declarationB4— Supplementary export declarationC1— Simplified declarationC2— Pre-lodged simplified declaration- Other codes:
H1–H7,I1,I2,D1–D4.
string
required
The type identifier for the declaration (shortcode). Allowed values:
declarationExport(shortcodeEX) — Export declarationdeclarationNonEUGoods(shortcodeIM) — Standard import declaration from non-EU countriesdeclarationEUGoods(shortcodeCO) — Import declaration for EU goods
string
required
The type code representing the timing and simplification level of the filing (shortcode). Allowed values:
STANDARD(codeA) — Standard declarationADVANCE_STANDARD(codeD) — Pre-lodged standard declarationSIMPLIFIED_OCCASIONAL(codeB) — Simplified occasional declarationADVANCE_SIMPLIFIED_OCCASIONAL(codeE) — Pre-lodged simplified occasional declarationSIMPLIFIED_REGULAR(codeC) — Simplified regular declarationADVANCE_SIMPLIFIED_REGULAR(codeF) — Pre-lodged simplified regular declarationSUPPLEMENTARY_PERIODIC_REGULAR(codeY) — Supplementary periodic declarationSUPPLEMENTARY_EIDR(codeZ) — Entry in declarant’s records supplementary declaration
string
required
The customs representation mode (shortcode). Allowed values:
DirectRepresentation— The customs broker acts in the name of and on behalf of the exporter (broker EORI required)IndirectRepresentation— The customs broker acts in their own name but on behalf of the exporterNoRepresentation— The exporter files directly
string
required
The 8-digit customs office identifier where the declaration is submitted (e.g.
NL000432).string
required
The type code identifying the location category of the goods. Common shortcodes:
D— Designated placeA— Recognized placeB— Approved placeC— Competent customs office
string
required
The code identifying how the address is specified. Common shortcodes:
T— Postal address (Address)U— UN/LOCODEV— Customs office IDW— GPS/GNSS coordinatesX— EORI numberY— License/Authorization number
object
required
string
required
ISO 2-digit country code of final destination of the export goods (e.g.
US).string
Border crossing transport mode shortcode. Allowed values:
1— Maritime transport (Sea)4— Air transport3— Road transport2— Rail transport8— Inland waterway transport
string
The code specifying the type of vehicle identifier. Common values:
10— IMO ship identification number40— Flight number30— Road vehicle registration number
string
The actual name or number identifying the vessel, flight, or vehicle (e.g.,
EVER GIVEN).string
Active transport mode crossing the customs border (uses the same transport mode shortcodes as
arrivalTransportType).string
required
3-letter ISO code for the commercial invoice currency (e.g.
EUR).string
required
The Incoterm delivery code (shortcode). Allowed values:
EXW, FCA, FAS, FOB, CFR, CIF, CPT, CIP, DAP, DPU, DDP, XXX.string
The designated location associated with the Incoterm terms (e.g.,
New York).object
required
The business entity exporting the goods.
Show properties
Show properties
string
Business or contact name.
string
Street address.
string
House or building number.
string
City name.
string
State or province code/name.
string
State region or department.
string
Postal/ZIP code.
string
ISO 2-digit country code.
string
Economic Operators Registration and Identification (EORI) number.
string
Value Added Tax (VAT) registration number.
string
Import One Stop Shop (IOSS) identification number.
object
required
The business entity importing the goods.
Show properties
Show properties
string
Business or contact name.
string
Street address.
string
House or building number.
string
City name.
string
State or province code/name.
string
State region or department.
string
Postal/ZIP code.
string
ISO 2-digit country code.
string
Economic Operators Registration and Identification (EORI) number.
string
Value Added Tax (VAT) registration number.
string
Import One Stop Shop (IOSS) identification number.
array
array
array
required
List of items (goods) in the shipment.
Show items
Show items
string
required
A detailed commercial description of the item.
string
required
8-10 digit Harmonized System (HS) code.
number
required
Number of packages/items.
number
required
Gross weight of the item in kilograms.
number
required
Net weight of the item in kilograms.
number
required
Net price/value of the item.
string
required
Price currency code (e.g.
EUR).string
required
ISO 2-digit country of origin of the goods.
number
Quantity of supplementary units.
string
Supplementary unit code (e.g.
NAR for number of units, LTR for liters).string
Additional customs procedure exemption code (e.g.
F48 for customs exemption under the Union Customs Code).array
Item-level supporting document references.
{
"type": "EXPORT",
"referenceNumber": "EXP-2026-00042",
"incoterm": "FOB",
"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"
}
],
"transport": {
"mode": "SEA",
"identifier": "EVER GIVEN"
}
}
{
"Shipment": {
"shipmentNo": "180-43189999",
"shipmentType": "EXPORT",
"remarks": "Created via external API full payload"
},
"commercialReference": "INV-2026-07001",
"procedureType": "B1",
"declarationType": "declarationExport",
"additionalDeclarationType": "STANDARD",
"representation": "DirectRepresentation",
"declarationOffice": "NL000432",
"goodsLocationType": "D",
"goodsLocationAddressType": "T",
"goodsLocationAddress": {
"Address": {
"houseNo": "25",
"street": "Mainstraat",
"city": "Hoofddorp",
"countryCode": "NL",
"postCode": "2132NG"
}
},
"countryOfDestination": "US",
"arrivalTransportType": "1",
"arrivalTransportNameType": "10",
"arrivalTransportName": "EVER GIVEN",
"borderTransportType": "1",
"invoiceCurrency": "EUR",
"incoterm": "DDP",
"incotermLocation": "New York",
"Exporter": {
"name": "EZC B.V.",
"street": "Hoofdweg 85",
"city": "Hoofddorp",
"postcode": "2133LV",
"countryCode": "NL",
"eoriNo": "NL100006139B01"
},
"Consignee": {
"name": "US Retail Inc.",
"street": "500 5th Avenue",
"city": "New York",
"postcode": "10110",
"countryCode": "US",
"eoriNo": ""
},
"SupportingDocuments": [
{
"typeCode": "N935",
"description": "INV-2026-07001"
}
],
"AdditionalInformations": [
{
"typeCode": "30600",
"description": "Low value goods"
}
],
"DeclarationItems": [
{
"description": "Men's cotton trousers",
"commodityCode": "6203421100",
"quantity": 500,
"grossMass": 250,
"netWeight": 220,
"netPrice": 1875,
"currency": "EUR",
"originCountry": "NL",
"supplementaryQuantity": 500,
"supplementaryQuantityUnit": "NAR",
"additionalProcedureCodes": "F48",
"SupportingDocuments": [
{
"typeCode": "N935",
"description": "INV-2026-07001"
}
]
}
]
}
{
"declarationId": 43,
"shipmentId": 16,
"referenceNumber": "INV-2026-07001",
"status": "processing",
"lrn": "NL202600002"
}
{
"statusCode": 400,
"message": [
"DeclarationItems.0.commodityCode must be a valid HS code"
],
"error": "Bad Request"
}
⌘I