Update transport means
curl --request PATCH \
--url https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sequenceNumber": 123,
"mode": "<string>",
"transportType": "<string>",
"identificationNumber": "<string>",
"nationality": "<string>"
}
'import requests
url = "https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means"
payload = {
"sequenceNumber": 123,
"mode": "<string>",
"transportType": "<string>",
"identificationNumber": "<string>",
"nationality": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sequenceNumber: 123,
mode: '<string>',
transportType: '<string>',
identificationNumber: '<string>',
nationality: '<string>'
})
};
fetch('https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means', 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/declarations/transit/{declarationId}/transport-means",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'sequenceNumber' => 123,
'mode' => '<string>',
'transportType' => '<string>',
'identificationNumber' => '<string>',
'nationality' => '<string>'
]),
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/declarations/transit/{declarationId}/transport-means"
payload := strings.NewReader("{\n \"sequenceNumber\": 123,\n \"mode\": \"<string>\",\n \"transportType\": \"<string>\",\n \"identificationNumber\": \"<string>\",\n \"nationality\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sequenceNumber\": 123,\n \"mode\": \"<string>\",\n \"transportType\": \"<string>\",\n \"identificationNumber\": \"<string>\",\n \"nationality\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sequenceNumber\": 123,\n \"mode\": \"<string>\",\n \"transportType\": \"<string>\",\n \"identificationNumber\": \"<string>\",\n \"nationality\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"declarationId": 104,
"status": "processing"
}
Transit Declarations
Update transport means
Update the list of transport means associated with a transit declaration.
PATCH
/
declarations
/
transit
/
{declarationId}
/
transport-means
Update transport means
curl --request PATCH \
--url https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sequenceNumber": 123,
"mode": "<string>",
"transportType": "<string>",
"identificationNumber": "<string>",
"nationality": "<string>"
}
'import requests
url = "https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means"
payload = {
"sequenceNumber": 123,
"mode": "<string>",
"transportType": "<string>",
"identificationNumber": "<string>",
"nationality": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sequenceNumber: 123,
mode: '<string>',
transportType: '<string>',
identificationNumber: '<string>',
nationality: '<string>'
})
};
fetch('https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means', 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/declarations/transit/{declarationId}/transport-means",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'sequenceNumber' => 123,
'mode' => '<string>',
'transportType' => '<string>',
'identificationNumber' => '<string>',
'nationality' => '<string>'
]),
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/declarations/transit/{declarationId}/transport-means"
payload := strings.NewReader("{\n \"sequenceNumber\": 123,\n \"mode\": \"<string>\",\n \"transportType\": \"<string>\",\n \"identificationNumber\": \"<string>\",\n \"nationality\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sequenceNumber\": 123,\n \"mode\": \"<string>\",\n \"transportType\": \"<string>\",\n \"identificationNumber\": \"<string>\",\n \"nationality\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.eazecustoms.com/staging/declarations/transit/{declarationId}/transport-means")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sequenceNumber\": 123,\n \"mode\": \"<string>\",\n \"transportType\": \"<string>\",\n \"identificationNumber\": \"<string>\",\n \"nationality\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"declarationId": 104,
"status": "processing"
}
Update the transport means details for a transit declaration.
Path Parameters
number
required
The unique declaration ID.
Request Body
An array of transport means objects.integer
required
The sequence number of the transport means entry.
string
required
The mode of transport (e.g.
DEPARTURE).string
required
The type code of the transport.
string
required
The identification number/name of the transport vessel or vehicle.
string
required
The nationality country code of the transport means.
Examples
Request Payload
[
{
"sequenceNumber": 1,
"mode": "DEPARTURE",
"transportType": "30",
"identificationNumber": "TRUCK-002",
"nationality": "NL"
}
]
{
"declarationId": 104,
"status": "processing"
}
⌘I