Update a declaration
curl --request PUT \
--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.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', 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 => "PUT",
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("PUT", 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.put("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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"declarationId": 43,
"status": "processing"
}
{
"statusCode": 400,
"message": [
"DeclarationItems.0.commodityCode must be a valid HS code"
],
"error": "Bad Request"
}
{
"statusCode": 404,
"message": "Declaration not found or not accessible.",
"error": "Not Found"
}
Export Declarations
Update a declaration
Update an existing export declaration with a full update payload.
PUT
/
v1
/
declarations
/
{id}
Update a declaration
curl --request PUT \
--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.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', 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 => "PUT",
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("PUT", 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.put("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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"declarationId": 43,
"status": "processing"
}
{
"statusCode": 400,
"message": [
"DeclarationItems.0.commodityCode must be a valid HS code"
],
"error": "Bad Request"
}
{
"statusCode": 404,
"message": "Declaration not found or not accessible.",
"error": "Not Found"
}
Update an existing export declaration. This endpoint supports full replacement semantics for the declaration fields, parties, and document groups.
Path Parameters
number
required
The unique declaration ID.
Query Parameters
object
Optional per-party update mode override. Keys are case-insensitive and underscore-friendly (e.g.
consignee, consignor, vat_payer, importer, exporter). Values must be one of: replace, link, unlink.Response
{
"declarationId": 43,
"status": "processing"
}
{
"statusCode": 400,
"message": [
"DeclarationItems.0.commodityCode must be a valid HS code"
],
"error": "Bad Request"
}
{
"statusCode": 404,
"message": "Declaration not found or not accessible.",
"error": "Not Found"
}
⌘I