{
"carrier": "UPS-REST",
"action": "customsdetail",
"params": {
"key": "your-key-from-authenticate-request",
"request_option": "validate",
"account_number": "your-ups-account-number",
"to_country": "US",
"ship_country": "IN",
"customs_content_type": "Commercial",
"customs_metadata": [
{
"group_key": "IN-EXP-CSB",
"fields": [
{ "field_key": "CSBType", "field_value": "3" },
{ "field_key": "IECCode", "field_value": "1234567890" }
]
}
],
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'customsdetail',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'request_option' => 'validate',
'account_number' => 'your-ups-account-number',
'to_country' => 'US',
'ship_country' => 'IN',
'customs_content_type' => 'Commercial',
'customs_metadata' =>
array (
0 =>
array (
'group_key' => 'IN-EXP-CSB',
'fields' =>
array (
0 =>
array (
'field_key' => 'CSBType',
'field_value' => '3',
),
1 =>
array (
'field_key' => 'IECCode',
'field_value' => '1234567890',
),
),
),
),
'test' => true,
),
)
);
rs.request(
{'action': 'customsdetail',
'carrier': 'UPS-REST',
'params': {'account_number': 'your-ups-account-number',
'customs_content_type': 'Commercial',
'customs_metadata': [{'fields': [{'field_key': 'CSBType',
'field_value': '3'},
{'field_key': 'IECCode',
'field_value': '1234567890'}],
'group_key': 'IN-EXP-CSB'}],
'key': 'your-key-from-authenticate-request',
'request_option': 'validate',
'ship_country': 'IN',
'test': True,
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"customsdetail",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"request_option"=>"validate",
"account_number"=>"your-ups-account-number",
"to_country"=>"US",
"ship_country"=>"IN",
"customs_content_type"=>"Commercial",
"customs_metadata"=>
[{"group_key"=>"IN-EXP-CSB",
"fields"=>
[{"field_key"=>"CSBType", "field_value"=>"3"},
{"field_key"=>"IECCode", "field_value"=>"1234567890"}]}],
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "customsdetail",
"params": {
"key": "your-key-from-authenticate-request",
"request_option": "validate",
"account_number": "your-ups-account-number",
"to_country": "US",
"ship_country": "IN",
"customs_content_type": "Commercial",
"customs_metadata": [
{
"group_key": "IN-EXP-CSB",
"fields": [
{ "field_key": "CSBType", "field_value": "3" },
{ "field_key": "IECCode", "field_value": "1234567890" }
]
}
],
"test": true
}
}
)