Get import declaration status
curl --request GET \
--url https://devapi.eazecustoms.com/staging/v1/declarations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://devapi.eazecustoms.com/staging/v1/declarations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devapi.eazecustoms.com/staging/v1/declarations/{id}', 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/{id}",
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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://devapi.eazecustoms.com/staging/v1/declarations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://devapi.eazecustoms.com/staging/v1/declarations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/v1/declarations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"declarationId": 42,
"shipmentId": 15,
"referenceNumber": "180-43189021",
"status": "ready",
"lrn": "NL202600001",
"mrn": "26NL90831023812038",
"type": "IMPORT",
"declarationOffice": "NL000850",
"representation": "DIRECT",
"items": [
{
"id": 7,
"description": "Men's cotton trousers",
"hsCode": "6203421100",
"quantity": 500,
"grossMass": 250,
"netMass": 220,
"value": 1875,
"currency": "EUR",
"originCountry": "CN"
}
],
"errors": []
}
{
"declarationId": 42,
"shipmentId": 15,
"referenceNumber": "180-43189021",
"status": "invalid",
"type": "IMPORT",
"items": [
{
"id": 7,
"description": "Men's cotton trousers",
"hsCode": "6203421100"
}
],
"errors": [
{
"field": "DeclarationItems.0.netWeight",
"errorType": "missingData",
"description": "Net weight is required for imports to NL",
"isBlocking": true
}
]
}
{
"statusCode": 404,
"message": "Declaration not found or not accessible.",
"error": "Not Found"
}
Import Declarations
Get import declaration status
Poll the current status of an import declaration.
GET
/
v1
/
declarations
/
{id}
Get import declaration status
curl --request GET \
--url https://devapi.eazecustoms.com/staging/v1/declarations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://devapi.eazecustoms.com/staging/v1/declarations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devapi.eazecustoms.com/staging/v1/declarations/{id}', 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/{id}",
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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://devapi.eazecustoms.com/staging/v1/declarations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://devapi.eazecustoms.com/staging/v1/declarations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/v1/declarations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"declarationId": 42,
"shipmentId": 15,
"referenceNumber": "180-43189021",
"status": "ready",
"lrn": "NL202600001",
"mrn": "26NL90831023812038",
"type": "IMPORT",
"declarationOffice": "NL000850",
"representation": "DIRECT",
"items": [
{
"id": 7,
"description": "Men's cotton trousers",
"hsCode": "6203421100",
"quantity": 500,
"grossMass": 250,
"netMass": 220,
"value": 1875,
"currency": "EUR",
"originCountry": "CN"
}
],
"errors": []
}
{
"declarationId": 42,
"shipmentId": 15,
"referenceNumber": "180-43189021",
"status": "invalid",
"type": "IMPORT",
"items": [
{
"id": 7,
"description": "Men's cotton trousers",
"hsCode": "6203421100"
}
],
"errors": [
{
"field": "DeclarationItems.0.netWeight",
"errorType": "missingData",
"description": "Net weight is required for imports to NL",
"isBlocking": true
}
]
}
{
"statusCode": 404,
"message": "Declaration not found or not accessible.",
"error": "Not Found"
}
Poll the status and details of an import declaration. If the declaration has validation errors, they will be listed under the
errors array.
Path Parameters
number
required
The unique declaration ID returned when creating the declaration.
{
"declarationId": 42,
"shipmentId": 15,
"referenceNumber": "180-43189021",
"status": "ready",
"lrn": "NL202600001",
"mrn": "26NL90831023812038",
"type": "IMPORT",
"declarationOffice": "NL000850",
"representation": "DIRECT",
"items": [
{
"id": 7,
"description": "Men's cotton trousers",
"hsCode": "6203421100",
"quantity": 500,
"grossMass": 250,
"netMass": 220,
"value": 1875,
"currency": "EUR",
"originCountry": "CN"
}
],
"errors": []
}
{
"declarationId": 42,
"shipmentId": 15,
"referenceNumber": "180-43189021",
"status": "invalid",
"type": "IMPORT",
"items": [
{
"id": 7,
"description": "Men's cotton trousers",
"hsCode": "6203421100"
}
],
"errors": [
{
"field": "DeclarationItems.0.netWeight",
"errorType": "missingData",
"description": "Net weight is required for imports to NL",
"isBlocking": true
}
]
}
{
"statusCode": 404,
"message": "Declaration not found or not accessible.",
"error": "Not Found"
}
⌘I