Sample Request
Below is a sample URL with the appropriate authorization code and body Submit CO Application.
curl --location --request POST 'https://api.tradecert2.net/api/v1/cert/CO' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJDeHBweFAycjhtSm5xRnVicjVQQm5QU2RoWmFtK1JpakJkcU9CNTlGVVwvdz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhYzA1ZTk2MS1hZWI2LTQ5NTMtOTVjNy02NjMwOGFmNTQ2ODAiLCJldmVudF9pZCI6ImU2ZTU0MGMwLThjZTItNDhmYi05M2YxLWZmYzM3NWY2ODI0ZiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2MzgwMTc3MDUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xXzVkUWhLMWxqSCIsImV4cCI6MTYzODAyMTMwNSwiaWF0IjoxNjM4MDE3NzA1LCJqdGkiOiJjN2I0MWYwYS0zNmQ5LTQ3MDktYmFlMy0zNmFlYTEyZGI4YTYiLCJjbGllbnRfaWQiOiIxdWxmdnUycDhhZnN2Z2VwcGdrOXNiMDExcCIsInVzZXJuYW1lIjoiam9obmF1c2NsaWVudCJ9.ChY6urxeniHCXxLFuLvQ6P0vCAk7dKXETgWZpsTJSdKZF3hDL-OImUoo46bzQs3piEAzvKrTLa7OEf5cSrOX-TO3BXJpvLHujwN4bOMiWX5ZKlG64DDX9A9dDCZNHlLa57uzqEgMCXzREJPmGM89_kvaumtdoT2rNZ8E_Ao14OXVdWawekjnFhqR6JFAnqD1-2t5kxasmdwQ-CQNkOm_xYmNo65mtLgrc2cOowOjhkTh1MaktjtcLnkapWEs-rDtIqyZ4ZKH_6ieo5ujwMIDUanKiJCrnr4L4EiLUOo7_CMWka-4B32Yo8XMzxXsYQFZLn9nD-fL6xlG8SrLsxEguA' \
--data-raw '{
"Options": {
"Service": "DIY",
"ReturnOrigBy": "Comment",
"Comments": "This is a comment",
"ClientReferenceNumber": "Client ref",
"PurchaseOrderNumber": "Po Number"
},
"cocert": {
"ConsignorRef": "Cons Ref",
"Consignor_1": {
"name": "Con Name",
"city": "Con City",
"CountryISOCode": "IE",
"name2": "Con Name2",
"address1": "Con addr1",
"address2": "Con addr2",
"address3": "Con addr3",
"state": "Con state",
"zip": "Con zip"
},
"Consignee_2": {
"name": "Cons2 name",
"city": "Cons2 city",
"CountryISOCode": "GB",
"name2": "Cons2 name2",
"address1": "Cons2 addr1",
"address2": "Cons2 addr2",
"address3": "Cons2 addr3",
"state": "Cons2 state",
"zip": "Cons2 zip"
},
"CountryOfOrigin_3": "IE",
"Quantity_7": "Quanity 7",
"DestinationCountry": "Germany",
"Originals": "1",
"Copies": "0",
"TransportDetails_4": "Trans details",
"Remarks_5": "Remarks 5",
"DescriptionOfGoods_6": "Des of goods"
},
"Attachment": [
{
"name": "not an invoice",
"attType": "Bill of Lading",
"pdf": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9MZW5ndGggMjE5L0ZpbHRlci9GbGF0ZURlY29kZT4+c3RyZWFtCnicjU+xbsIwFNzfVxwTMEDsUEdlbAUMbFW9oQ4osWmq4BST5HtZs/Qb+mwJqFCRkPVs+d29u3sCEhMJATVXfOd7OtCrplkGpebQBS01vVGKdegGnsCZrfeUrCSkgLY0GuuvwL1SohjDfPwuCmYZMqUwSQW8IftXMfrNLpJPQVJEjGdHL23eOoOidq43cENzbND4uu36Ad6HZYWubo/4rrY/DbbWls54bjXesE/+aTzXNOQT2P2TcfPBbxF3vEFuAqbqXsCFgZCJ7Ts/TRg7IX2+/qx/yPsXFCNd3gplbmRzdHJlYW0KZW5kb2JqCjEgMCBvYmoKPDwvR3JvdXA8PC9UeXBlL0dyb3VwL0NTL0RldmljZVJHQi9TL1RyYW5zcGFyZW5jeT4+L1BhcmVudCA0IDAgUi9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MDAxNSAwMDAwMCBuIAowMDAwMDAwNjY4IDAwMDAwIG4gCjAwMDAwMDA1NDUgMDAwMDAgbiAKMDAwMDAwMDczMSAwMDAwMCBuIAowMDAwMDAwNzg1IDAwMDAwIG4gCjAwMDAwMDA4MTcgMDAwMDAgbiAKMDAwMDAwMDkyMCAwMDAwMCBuIAp0cmFpbGVyCjw8L1Jvb3QgOCAwIFIvSUQgWzwzMmJmYmVkYjczYzE1OWYxZmViNmJhMDc4YTRhNDUwZT48MjdlZDdhZDIyNTUwOWIzNTgzZDQxNDExNzZlYzU3NTM+XS9JbmZvIDkgMCBSL1NpemUgMTA+PgpzdGFydHhyZWYKMTA4MgolJUVPRgo="
}
],
"Invoice_details": {
"invoice_number": "12345",
"invoice_currency": "EUR",
"invoice_amount": "500.34"
}
}'
var client = new RestClient("https://api.tradecert2.net/api/v1/cert/CO");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer eyJraWQiOiJDeHBweFAycjhtSm5xRnVicjVQQm5QU2RoWmFtK1JpakJkcU9CNTlGVVwvdz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhYzA1ZTk2MS1hZWI2LTQ5NTMtOTVjNy02NjMwOGFmNTQ2ODAiLCJldmVudF9pZCI6ImU2ZTU0MGMwLThjZTItNDhmYi05M2YxLWZmYzM3NWY2ODI0ZiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2MzgwMTc3MDUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xXzVkUWhLMWxqSCIsImV4cCI6MTYzODAyMTMwNSwiaWF0IjoxNjM4MDE3NzA1LCJqdGkiOiJjN2I0MWYwYS0zNmQ5LTQ3MDktYmFlMy0zNmFlYTEyZGI4YTYiLCJjbGllbnRfaWQiOiIxdWxmdnUycDhhZnN2Z2VwcGdrOXNiMDExcCIsInVzZXJuYW1lIjoiam9obmF1c2NsaWVudCJ9.ChY6urxeniHCXxLFuLvQ6P0vCAk7dKXETgWZpsTJSdKZF3hDL-OImUoo46bzQs3piEAzvKrTLa7OEf5cSrOX-TO3BXJpvLHujwN4bOMiWX5ZKlG64DDX9A9dDCZNHlLa57uzqEgMCXzREJPmGM89_kvaumtdoT2rNZ8E_Ao14OXVdWawekjnFhqR6JFAnqD1-2t5kxasmdwQ-CQNkOm_xYmNo65mtLgrc2cOowOjhkTh1MaktjtcLnkapWEs-rDtIqyZ4ZKH_6ieo5ujwMIDUanKiJCrnr4L4EiLUOo7_CMWka-4B32Yo8XMzxXsYQFZLn9nD-fL6xlG8SrLsxEguA");
var body = @"{" + "\n" +
@"""Options"": {" + "\n" +
@"""Service"": ""DIY""," + "\n" +
@"""ReturnOrigBy"": ""Comment""," + "\n" +
@"""Comments"": ""This is a comment""," + "\n" +
@"""ClientReferenceNumber"": ""Client ref""," + "\n" +
@"""PurchaseOrderNumber"": ""Po Number""" + "\n" +
@"}," + "\n" +
@"""cocert"": {" + "\n" +
@"""ConsignorRef"": ""Cons Ref""," + "\n" +
@"""Consignor_1"": {" + "\n" +
@"""name"": ""Con Name""," + "\n" +
@"""city"": ""Con City""," + "\n" +
@"""CountryISOCode"": ""IE""," + "\n" +
@"""name2"": ""Con Name2""," + "\n" +
@"""address1"": ""Con addr1""," + "\n" +
@"""address2"": ""Con addr2""," + "\n" +
@"""address3"": ""Con addr3""," + "\n" +
@"""state"": ""Con state""," + "\n" +
@"""zip"": ""Con zip""" + "\n" +
@"}," + "\n" +
@"""Consignee_2"": {" + "\n" +
@"""name"": ""Cons2 name""," + "\n" +
@"""city"": ""Cons2 city""," + "\n" +
@"""CountryISOCode"": ""GB""," + "\n" +
@"""name2"": ""Cons2 name2""," + "\n" +
@"""address1"": ""Cons2 addr1""," + "\n" +
@"""address2"": ""Cons2 addr2""," + "\n" +
@"""address3"": ""Cons2 addr3""," + "\n" +
@"""state"": ""Cons2 state""," + "\n" +
@"""zip"": ""Cons2 zip""" + "\n" +
@"}," + "\n" +
@"""CountryOfOrigin_3"": ""IE""," + "\n" +
@"""Quantity_7"": ""Quanity 7""," + "\n" +
@"""DestinationCountry"": ""Germany""," + "\n" +
@"""Originals"": ""1""," + "\n" +
@"""Copies"": ""0""," + "\n" +
@"""TransportDetails_4"": ""Trans details""," + "\n" +
@"""Remarks_5"": ""Remarks 5""," + "\n" +
@"""DescriptionOfGoods_6"": ""Des of goods""" + "\n" +
@"}," + "\n" +
@"""Attachment"": [" + "\n" +
@"{" + "\n" +
@"""name"": ""not an invoice""," + "\n" +
@"""attType"": ""Bill of Lading""," + "\n" +
@"""pdf"": ""JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9MZW5ndGggMjE5L0ZpbHRlci9GbGF0ZURlY29kZT4+c3RyZWFtCnicjU+xbsIwFNzfVxwTMEDsUEdlbAUMbFW9oQ4osWmq4BST5HtZs/Qb+mwJqFCRkPVs+d29u3sCEhMJATVXfOd7OtCrplkGpebQBS01vVGKdegGnsCZrfeUrCSkgLY0GuuvwL1SohjDfPwuCmYZMqUwSQW8IftXMfrNLpJPQVJEjGdHL23eOoOidq43cENzbND4uu36Ad6HZYWubo/4rrY/DbbWls54bjXesE/+aTzXNOQT2P2TcfPBbxF3vEFuAqbqXsCFgZCJ7Ts/TRg7IX2+/qx/yPsXFCNd3gplbmRzdHJlYW0KZW5kb2JqCjEgMCBvYmoKPDwvR3JvdXA8PC9UeXBlL0dyb3VwL0NTL0RldmljZVJHQi9TL1RyYW5zcGFyZW5jeT4+L1BhcmVudCA0IDAgUi9Db250ZW50cyAzIDAgUi9UeXBlL1BhZ2UvUmVzb3VyY2VzPDwvUHJvY1NldCBbL1BERiAvVGV4dCAvSW1hZ2VCIC9JbWFnZUMgL0ltYWdlSV0vQ29sb3JTcGFjZTw8L0NTL0Rld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A4MTcgMDAwMDAgbiAKMDAwMDAwMDkyMCAwMDAwMCBuIAp0cmFpbGVyCjw8L1Jvb3QgOCAwIFIvSUQgWzwzMmJmYmVkYjczYzE1OWYxZmViNmJhMDc4YTRhNDUwZT48MjdlZDdhZDIyNTUwOWIzNTgzZDQxNDExNzZlYzU3NTM+XS9JbmZvIDkgMCBSL1NpemUgMTA+PgpzdGFydHhyZWYKMTA4MgolJUVPRgo=""" + "\n" +
@"}" + "\n" +
@"]," + "\n" +
@"""Invoice_details"": {" + "\n" +
@"""invoice_number"": ""12345""," + "\n" +
@"""invoice_currency"": ""EUR""," + "\n" +
@"""invoice_amount"": ""500.34""" + "\n" +
@"}" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer eyJraWQiOiJDeHBweFAycjhtSm5xRnVicjVQQm5QU2RoWmFtK1JpakJkcU9CNTlGVVwvdz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhYzA1ZTk2MS1hZWI2LTQ5NTMtOTVjNy02NjMwOGFmNTQ2ODAiLCJldmVudF9pZCI6ImU2ZTU0MGMwLThjZTItNDhmYi05M2YxLWZmYzM3NWY2ODI0ZiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2MzgwMTc3MDUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xXzVkUWhLMWxqSCIsImV4cCI6MTYzODAyMTMwNSwiaWF0IjoxNjM4MDE3NzA1LCJqdGkiOiJjN2I0MWYwYS0zNmQ5LTQ3MDktYmFlMy0zNmFlYTEyZGI4YTYiLCJjbGllbnRfaWQiOiIxdWxmdnUycDhhZnN2Z2VwcGdrOXNiMDExcCIsInVzZXJuYW1lIjoiam9obmF1c2NsaWVudCJ9.ChY6urxeniHCXxLFuLvQ6P0vCAk7dKXETgWZpsTJSdKZF3hDL-OImUoo46bzQs3piEAzvKrTLa7OEf5cSrOX-TO3BXJpvLHujwN4bOMiWX5ZKlG64DDX9A9dDCZNHlLa57uzqEgMCXzREJPmGM89_kvaumtdoT2rNZ8E_Ao14OXVdWawekjnFhqR6JFAnqD1-2t5kxasmdwQ-CQNkOm_xYmNo65mtLgrc2cOowOjhkTh1MaktjtcLnkapWEs-rDtIqyZ4ZKH_6ieo5ujwMIDUanKiJCrnr4L4EiLUOo7_CMWka-4B32Yo8XMzxXsYQFZLn9nD-fL6xlG8SrLsxEguA");
var raw = JSON.stringify({
"Options": {
"Service": "DIY",
"ReturnOrigBy": "Comment",
"Comments": "This is a comment",
"ClientReferenceNumber": "Client ref",
"PurchaseOrderNumber": "Po Number"
},
"cocert": {
"ConsignorRef": "Cons Ref",
"Consignor_1": {
"name": "Con Name",
"city": "Con City",
"CountryISOCode": "IE",
"name2": "Con Name2",
"address1": "Con addr1",
"address2": "Con addr2",
"address3": "Con addr3",
"state": "Con state",
"zip": "Con zip"
},
"Consignee_2": {
"name": "Cons2 name",
"city": "Cons2 city",
"CountryISOCode": "GB",
"name2": "Cons2 name2",
"address1": "Cons2 addr1",
"address2": "Cons2 addr2",
"address3": "Cons2 addr3",
"state": "Cons2 state",
"zip": "Cons2 zip"
},
"CountryOfOrigin_3": "IE",
"Quantity_7": "Quanity 7",
"DestinationCountry": "Germany",
"Originals": "1",
"Copies": "0",
"TransportDetails_4": "Trans details",
"Remarks_5": "Remarks 5",
"DescriptionOfGoods_6": "Des of goods"
},
"Attachment": [
{
"name": "not an invoice",
"attType": "Bill of Lading",
"pdf": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9MZW5ndGggMjE5L0ZpbHRlci9GbGF0ZURlY29kZT4+c3RyZWFtCnicjU+xbsIwFNzfV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zPDwvUHJpbnRTY2FsaW5nL0FwcERlZmF1bHQ+Pi9QYWdlcyA0IDAgUj4+CmVuZG9iago5IDAgb2JqCjw8L0NyZWF0b3IoSmFzcGVyUmVwb3J0cyBcKGNpX3N0YXRlbWVudFwpKS9Qcm9kdWNlcihpVGV4dCAyLjEuNyBieSAxVDNYVCkvTW9kRGF0ZShEOjIwMTQwMzMxMjMxMTU4KzAxJzAwJykvQ3JlYXRpb25EYXRlKEQ6MjAxNDAzMzEyMzExNTgrMDEnMDAnKT4+CmVuZG9iagp4cmVmCjAgMTAKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMzAxIDAwMDAwIG4gCjAwMDAwMDA1ODAgMDAwMDAgbiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwNjY4IDAwMDAwIG4gCjAwMDAwMDA1NDUgMDAwMDAgbiAKMDAwMDAwMDczMSAwMDAwMCBuIAowMDAwMDAwNzg1IDAwMDAwIG4gCjAwMDAwMDA4MTcgMDAwMDAgbiAKMDAwMDAwMDkyMCAwMDAwMCBuIAp0cmFpbGVyCjw8L1Jvb3QgOCAwIFIvSUQgWzwzMmJmYmVkYjczYzE1OWYxZmViNmJhMDc4YTRhNDUwZT48MjdlZDdhZDIyNTUwOWIzNTgzZDQxNDExNzZlYzU3NTM+XS9JbmZvIDkgMCBSL1NpemUgMTA+PgpzdGFydHhyZWYKMTA4MgolJUVPRgo="
}
],
"Invoice_details": {
"invoice_number": "12345",
"invoice_currency": "EUR",
"invoice_amount": "500.34"
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.tradecert2.net/api/v1/cert/CO", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.tradecert2.net/api/v1/cert/CO"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"Content-Type": @"application/json",
@"Authorization": @"Bearer eyJraWQiOiJDeHBweFAycjhtSm5xRnVicjVQQm5QU2RoWmFtK1JpakJkcU9CNTlGVVwvdz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhYzA1ZTk2MS1hZWI2LTQ5NTMtOTVjNy02NjMwOGFmNTQ2ODAiLCJldmVudF9pZCI6ImU2ZTU0MGMwLThjZTItNDhmYi05M2YxLWZmYzM3NWY2ODI0ZiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2MzgwMTc3MDUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xXzVkUWhLMWxqSCIsImV4cCI6MTYzODAyMTMwNSwiaWF0IjoxNjM4MDE3NzA1LCJqdGkiOiJjN2I0MWYwYS0zNmQ5LTQ3MDktYmFlMy0zNmFlYTEyZGI4YTYiLCJjbGllbnRfaWQiOiIxdWxmdnUycDhhZnN2Z2VwcGdrOXNiMDExcCIsInVzZXJuYW1lIjoiam9obmF1c2NsaWVudCJ9.ChY6urxeniHCXxLFuLvQ6P0vCAk7dKXETgWZpsTJSdKZF3hDL-OImUoo46bzQs3piEAzvKrTLa7OEf5cSrOX-TO3BXJpvLHujwN4bOMiWX5ZKlG64DDX9A9dDCZNHlLa57uzqEgMCXzREJPmGM89_kvaumtdoT2rNZ8E_Ao14OXVdWawekjnFhqR6JFAnqD1-2t5kxasmdwQ-CQNkOm_xYmNo65mtLgrc2cOowOjhkTh1MaktjtcLnkapWEs-rDtIqyZ4ZKH_6ieo5ujwMIDUanKiJCrnr4L4EiLUOo7_CMWka-4B32Yo8XMzxXsYQFZLn9nD-fL6xlG8SrLsxEguA"
};
[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\n\"Options\": {\n\"Service\": \"DIY\",\n\"ReturnOrigBy\": \"Comment\",\n\"Comments\": \"This is a comment\",\n\"ClientReferenceNumber\": \"Client ref\",\n\"PurchaseOrderNumber\": \"Po Number\"\n},\n\"cocert\": {\n\"ConsignorRef\": \"Cons Ref\",\n\"Consignor_1\": {\n\"name\": \"Con Name\",\n\"city\": \"Con City\",\n\"CountryISOCode\": \"IE\",\n\"name2\": \"Con Name2\",\n\"address1\": \"Con addr1\",\n\"address2\": \"Con addr2\",\n\"address3\": \"Con addr3\",\n\"state\": \"Con state\",\n\"zip\": \"Con zip\"\n},\n\"Consignee_2\": {\n\"name\": \"Cons2 name\",\n\"city\": \"Cons2 city\",\n\"CountryISOCode\": \"GB\",\n\"name2\": \"Cons2 name2\",\n\"address1\": \"Cons2 addr1\",\n\"address2\": \"Cons2 addr2\",\n\"address3\": \"Cons2 addr3\",\n\"state\": \"Cons2 state\",\n\"zip\": \"Cons2 zip\"\n},\n\"CountryOfOrigin_3\": \"IE\",\n\"Quantity_7\": \"Quanity 7\",\n\"DestinationCountry\": \"Germany\",\n\"Originals\": \"1\",\n\"Copies\": \"0\",\n\"TransportDetails_4\": \"Trans details\",\n\"Remarks_5\": \"Remarks 5\",\n\"DescriptionOfGoods_6\": \"Des of goods\"\n},\n\"Attachment\": [\n{\n\"name\": \"not an invoice\",\n\"attType\": \"Bill of Lading\",\n\"pdf\": \"JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9MZW5ndGggMjE5L0ZpbHRlci9GbGF0ZURlY29kZT4+c3RyZWFtCnicjU+xbsIwFNzfVxwTMEDsUEdlbAUMbFW9oQ4osWmq4BST5HtZs/Qb+mwJqFCRkPVs+d29u3sCEhMJATVXfOd7OtCrplkGpebQBS01vVGKdegGnsCZrfeUrCSkgLY0GuuvwL1SohjDfPwuCmYZMqUwSQW8IftXMfrNLpJPQVJEjGdHL23eOoOidq43cENzbND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xVDNYVCkvTW9kRGF0ZShEOjIwMTQwMzMxMjMxMTU4KzAxJzAwJykvQ3JlYXRpb25EYXRlKEQ6MjAxNDAzMzEyMzExNTgrMDEnMDAnKT4+CmVuZG9iagp4cmVmCjAgMTAKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMzAxIDAwMDAwIG4gCjAwMDAwMDA1ODAgMDAwMDAgbiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwNjY4IDAwMDAwIG4gCjAwMDAwMDA1NDUgMDAwMDAgbiAKMDAwMDAwMDczMSAwMDAwMCBuIAowMDAwMDAwNzg1IDAwMDAwIG4gCjAwMDAwMDA4MTcgMDAwMDAgbiAKMDAwMDAwMDkyMCAwMDAwMCBuIAp0cmFpbGVyCjw8L1Jvb3QgOCAwIFIvSUQgWzwzMmJmYmVkYjczYzE1OWYxZmViNmJhMDc4YTRhNDUwZT48MjdlZDdhZDIyNTUwOWIzNTgzZDQxNDExNzZlYzU3NTM+XS9JbmZvIDkgMCBSL1NpemUgMTA+PgpzdGFydHhyZWYKMTA4MgolJUVPRgo=\"\n}\n],\n\"Invoice_details\": {\n\"invoice_number\": \"12345\",\n\"invoice_currency\": \"EUR\",\n\"invoice_amount\": \"500.34\"\n}\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.tradecert2.net/api/v1/cert/CO',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"Options": {
"Service": "DIY",
"ReturnOrigBy": "Comment",
"Comments": "This is a comment",
"ClientReferenceNumber": "Client ref",
"PurchaseOrderNumber": "Po Number"
},
"cocert": {
"ConsignorRef": "Cons Ref",
"Consignor_1": {
"name": "Con Name",
"city": "Con City",
"CountryISOCode": "IE",
"name2": "Con Name2",
"address1": "Con addr1",
"address2": "Con addr2",
"address3": "Con addr3",
"state": "Con state",
"zip": "Con zip"
},
"Consignee_2": {
"name": "Cons2 name",
"city": "Cons2 city",
"CountryISOCode": "GB",
"name2": "Cons2 name2",
"address1": "Cons2 addr1",
"address2": "Cons2 addr2",
"address3": "Cons2 addr3",
"state": "Cons2 state",
"zip": "Cons2 zip"
},
"CountryOfOrigin_3": "IE",
"Quantity_7": "Quanity 7",
"DestinationCountry": "Germany",
"Originals": "1",
"Copies": "0",
"TransportDetails_4": "Trans details",
"Remarks_5": "Remarks 5",
"DescriptionOfGoods_6": "Des of goods"
},
"Attachment": [
{
"name": "not an invoice",
"attType": "Bill of Lading",
"pdf": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9MZW5ndGggMjE5L0ZpbHRlci9GbGF0ZURlY29kZT4+c3RyZWFtCnicjU+xbsIwFNzfVxwTMEDsUEdlbAUMbFW9oQ4osWmq4BST5HtZs/Qb+mwJqFCRkPVs+d29u3sCEhMJATVXfOd7OtCrplkGpebQBS01vVGKdegGnsCZrfeUrCSkgLY0GuuvwL1SohjDfPwuCmYZMqUwSQW8IftXMfrNLpJPQVJEjGdHL23eOoOidq43cENzbND4uu36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YVCkvTW9kRGF0ZShEOjIwMTQwMzMxMjMxMTU4KzAxJzAwJykvQ3JlYXRpb25EYXRlKEQ6MjAxNDAzMzEyMzExNTgrMDEnMDAnKT4+CmVuZG9iagp4cmVmCjAgMTAKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMzAxIDAwMDAwIG4gCjAwMDAwMDA1ODAgMDAwMDAgbiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwNjY4IDAwMDAwIG4gCjAwMDAwMDA1NDUgMDAwMDAgbiAKMDAwMDAwMDczMSAwMDAwMCBuIAowMDAwMDAwNzg1IDAwMDAwIG4gCjAwMDAwMDA4MTcgMDAwMDAgbiAKMDAwMDAwMDkyMCAwMDAwMCBuIAp0cmFpbGVyCjw8L1Jvb3QgOCAwIFIvSUQgWzwzMmJmYmVkYjczYzE1OWYxZmViNmJhMDc4YTRhNDUwZT48MjdlZDdhZDIyNTUwOWIzNTgzZDQxNDExNzZlYzU3NTM+XS9JbmZvIDkgMCBSL1NpemUgMTA+PgpzdGFydHhyZWYKMTA4MgolJUVPRgo="
}
],
"Invoice_details": {
"invoice_number": "12345",
"invoice_currency": "EUR",
"invoice_amount": "500.34"
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer eyJraWQiOiJDeHBweFAycjhtSm5xRnVicjVQQm5QU2RoWmFtK1JpakJkcU9CNTlGVVwvdz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhYzA1ZTk2MS1hZWI2LTQ5NTMtOTVjNy02NjMwOGFmNTQ2ODAiLCJldmVudF9pZCI6ImU2ZTU0MGMwLThjZTItNDhmYi05M2YxLWZmYzM3NWY2ODI0ZiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2MzgwMTc3MDUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xXzVkUWhLMWxqSCIsImV4cCI6MTYzODAyMTMwNSwiaWF0IjoxNjM4MDE3NzA1LCJqdGkiOiJjN2I0MWYwYS0zNmQ5LTQ3MDktYmFlMy0zNmFlYTEyZGI4YTYiLCJjbGllbnRfaWQiOiIxdWxmdnUycDhhZnN2Z2VwcGdrOXNiMDExcCIsInVzZXJuYW1lIjoiam9obmF1c2NsaWVudCJ9.ChY6urxeniHCXxLFuLvQ6P0vCAk7dKXETgWZpsTJSdKZF3hDL-OImUoo46bzQs3piEAzvKrTLa7OEf5cSrOX-TO3BXJpvLHujwN4bOMiWX5ZKlG64DDX9A9dDCZNHlLa57uzqEgMCXzREJPmGM89_kvaumtdoT2rNZ8E_Ao14OXVdWawekjnFhqR6JFAnqD1-2t5kxasmdwQ-CQNkOm_xYmNo65mtLgrc2cOowOjhkTh1MaktjtcLnkapWEs-rDtIqyZ4ZKH_6ieo5ujwMIDUanKiJCrnr4L4EiLUOo7_CMWka-4B32Yo8XMzxXsYQFZLn9nD-fL6xlG8SrLsxEguA'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
conn = http.client.HTTPSConnection("api.tradecert2.net")
payload = json.dumps({
"Options": {
"Service": "DIY",
"ReturnOrigBy": "Comment",
"Comments": "This is a comment",
"ClientReferenceNumber": "Client ref",
"PurchaseOrderNumber": "Po Number"
},
"cocert": {
"ConsignorRef": "Cons Ref",
"Consignor_1": {
"name": "Con Name",
"city": "Con City",
"CountryISOCode": "IE",
"name2": "Con Name2",
"address1": "Con addr1",
"address2": "Con addr2",
"address3": "Con addr3",
"state": "Con state",
"zip": "Con zip"
},
"Consignee_2": {
"name": "Cons2 name",
"city": "Cons2 city",
"CountryISOCode": "GB",
"name2": "Cons2 name2",
"address1": "Cons2 addr1",
"address2": "Cons2 addr2",
"address3": "Cons2 addr3",
"state": "Cons2 state",
"zip": "Cons2 zip"
},
"CountryOfOrigin_3": "IE",
"Quantity_7": "Quanity 7",
"DestinationCountry": "Germany",
"Originals": "1",
"Copies": "0",
"TransportDetails_4": "Trans details",
"Remarks_5": "Remarks 5",
"DescriptionOfGoods_6": "Des of goods"
},
"Attachment": [
{
"name": "not an invoice",
"attType": "Bill of Lading",
"pdf": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9MZW5ndGggMjE5L0ZpbHRlci9GbGF0ZURlY29kZT4+c3RyZWFtCnicjU+xbsIwFNzfVxwTMEDsUEdlbAUMbFW9oQ4osWmq4BST5HtZs/Qb+mwJqFCRkPVs+d29u3sCEhMJATVXfOd7OtCrplkGpebQBS01vVGKdegGnsCZrfeUrCSkgLY0GuuvwL1SohjDfPwuCmYZMqUwSQW8IftXMfrNLpJPQVJEjGdHL23eOoOidq43cENzbND4uu36Ad6HZYWubo/4rrY/DbbWls54bjXesE/+aTzXNOQT2P2TcfPBbxF3vEFuAqbqXsCFgZCJ7Ts/TRg7IX2+/qx/yPsXFCNd3gplbmRzdHJlYW0KZW5kb2JqCjEgMCBvYmoKPDwvR3JvdXA8PC9UeXBlL0dyb3VwL0NTL0RldmljZVJHQi9TL1RyYW5zcGFyZW5jeT4+L1BhcmVudCA0IDAgUi9Db250ZW50cyAzIDAgUi9UeXBlL1BhZ2UvUmVzb3VyY2VzPDwvUHJvY1NldCBbL1BERiAvVGV4dCAvSW1hZ2VCIC9JbWFnZUMgL0ltYWdlSV0vQ29sb3JTcGFjZTw8L0NTL0RldmljZVJHQj4+L0ZvbnQ8PC9GMSAyIDAgUj4+Pj4vTWVkaWFCb3hbMCAwIDU5NSA4NDJdL1JvdGF0ZSA5MD4+CmVuZG9iago1IDAgb2JqClsxIDAgUi9YWVogMCA2MDUgMF0KZW5kb2JqCjIgMCBvYmoKPDwvQmFzZUZvbnQvSGVsdmV0aWNhL1R5cGUvRm9udC9FbmNvZGluZy9XaW5BbnNpRW5jb2RpbmcvU3VidHlwZS9UeXBlMT4+CmVuZG9iago0IDAgb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": "EUR",
"invoice_amount": "500.34"
}
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJraWQiOiJDeHBweFAycjhtSm5xRnVicjVQQm5QU2RoWmFtK1JpakJkcU9CNTlGVVwvdz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhYzA1ZTk2MS1hZWI2LTQ5NTMtOTVjNy02NjMwOGFmNTQ2ODAiLCJldmVudF9pZCI6ImU2ZTU0MGMwLThjZTItNDhmYi05M2YxLWZmYzM3NWY2ODI0ZiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2MzgwMTc3MDUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xXzVkUWhLMWxqSCIsImV4cCI6MTYzODAyMTMwNSwiaWF0IjoxNjM4MDE3NzA1LCJqdGkiOiJjN2I0MWYwYS0zNmQ5LTQ3MDktYmFlMy0zNmFlYTEyZGI4YTYiLCJjbGllbnRfaWQiOiIxdWxmdnUycDhhZnN2Z2VwcGdrOXNiMDExcCIsInVzZXJuYW1lIjoiam9obmF1c2NsaWVudCJ9.ChY6urxeniHCXxLFuLvQ6P0vCAk7dKXETgWZpsTJSdKZF3hDL-OImUoo46bzQs3piEAzvKrTLa7OEf5cSrOX-TO3BXJpvLHujwN4bOMiWX5ZKlG64DDX9A9dDCZNHlLa57uzqEgMCXzREJPmGM89_kvaumtdoT2rNZ8E_Ao14OXVdWawekjnFhqR6JFAnqD1-2t5kxasmdwQ-CQNkOm_xYmNo65mtLgrc2cOowOjhkTh1MaktjtcLnkapWEs-rDtIqyZ4ZKH_6ieo5ujwMIDUanKiJCrnr4L4EiLUOo7_CMWka-4B32Yo8XMzxXsYQFZLn9nD-fL6xlG8SrLsxEguA'
}
conn.request("POST", "/api/v1/cert/CO", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("Authorization", "Bearer eyJraWQiOiJDeHBweFAycjhtSm5xRnVicjVQQm5QU2RoWmFtK1JpakJkcU9CNTlGVVwvdz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhYzA1ZTk2MS1hZWI2LTQ5NTMtOTVjNy02NjMwOGFmNTQ2ODAiLCJldmVudF9pZCI6ImU2ZTU0MGMwLThjZTItNDhmYi05M2YxLWZmYzM3NWY2ODI0ZiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2MzgwMTc3MDUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xXzVkUWhLMWxqSCIsImV4cCI6MTYzODAyMTMwNSwiaWF0IjoxNjM4MDE3NzA1LCJqdGkiOiJjN2I0MWYwYS0zNmQ5LTQ3MDktYmFlMy0zNmFlYTEyZGI4YTYiLCJjbGllbnRfaWQiOiIxdWxmdnUycDhhZnN2Z2VwcGdrOXNiMDExcCIsInVzZXJuYW1lIjoiam9obmF1c2NsaWVudCJ9.ChY6urxeniHCXxLFuLvQ6P0vCAk7dKXETgWZpsTJSdKZF3hDL-OImUoo46bzQs3piEAzvKrTLa7OEf5cSrOX-TO3BXJpvLHujwN4bOMiWX5ZKlG64DDX9A9dDCZNHlLa57uzqEgMCXzREJPmGM89_kvaumtdoT2rNZ8E_Ao14OXVdWawekjnFhqR6JFAnqD1-2t5kxasmdwQ-CQNkOm_xYmNo65mtLgrc2cOowOjhkTh1MaktjtcLnkapWEs-rDtIqyZ4ZKH_6ieo5ujwMIDUanKiJCrnr4L4EiLUOo7_CMWka-4B32Yo8XMzxXsYQFZLn9nD-fL6xlG8SrLsxEguA")
$body = "{`n`"Options`": {`n`"Service`": `"DIY`",`n`"ReturnOrigBy`": `"Comment`",`n`"Comments`": `"This is a comment`",`n`"ClientReferenceNumber`": `"Client ref`",`n`"PurchaseOrderNumber`": `"Po Number`"`n},`n`"cocert`": {`n`"ConsignorRef`": `"Cons Ref`",`n`"Consignor_1`": {`n`"name`": `"Con Name`",`n`"city`": `"Con City`",`n`"CountryISOCode`": `"IE`",`n`"name2`": `"Con Name2`",`n`"address1`": `"Con addr1`",`n`"address2`": `"Con addr2`",`n`"address3`": `"Con addr3`",`n`"state`": `"Con state`",`n`"zip`": `"Con zip`"`n},`n`"Consignee_2`": {`n`"name`": `"Cons2 name`",`n`"city`": `"Cons2 city`",`n`"CountryISOCode`": `"GB`",`n`"name2`": `"Cons2 name2`",`n`"address1`": `"Cons2 addr1`",`n`"address2`": `"Cons2 addr2`",`n`"address3`": `"Cons2 addr3`",`n`"state`": `"Cons2 state`",`n`"zip`": `"Cons2 zip`"`n},`n`"CountryOfOrigin_3`": `"IE`",`n`"Quantity_7`": `"Quanity 7`",`n`"DestinationCountry`": `"Germany`",`n`"Originals`": `"1`",`n`"Copies`": `"0`",`n`"TransportDetails_4`": `"Trans details`",`n`"Remarks_5`": `"Remarks 5`",`n`"DescriptionOfGoods_6`": `"Des of goods`"`n},`n`"Attachment`": [`n{`n`"name`": `"not an invoice`",`n`"attType`": `"Bill of Lading`",`n`"pdf`": `"JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9MZW5ndGggMjE5L0ZpbHRlci9GbGF0ZURlY29kZT4+c3RyZWFtCnicjU+xbsIwFNzfVxwTMEDsUEdlbAUMbFW9oQ4osWmq4BST5HtZs/Qb+mwJqFCRkPVs+d29u3sCEhMJATVXfOd7OtCrplkGpebQBS01vVGKdegGnsCZrfeUrCSkgLY0GuuvwL1SohjDfPwuCmYZMqUwSQW8IftXMfrNLpJPQVJEjGdHL23eOoOidq43cENzbND4uu36Ad6HZYWubo/4rrY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ShEOjIwMTQwMzMxMjMxMTU4KzAxJzAwJykvQ3JlYXRpb25EYXRlKEQ6MjAxNDAzMzEyMzExNTgrMDEnMDAnKT4+CmVuZG9iagp4cmVmCjAgMTAKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMzAxIDAwMDAwIG4gCjAwMDAwMDA1ODAgMDAwMDAgbiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwNjY4IDAwMDAwIG4gCjAwMDAwMDA1NDUgMDAwMDAgbiAKMDAwMDAwMDczMSAwMDAwMCBuIAowMDAwMDAwNzg1IDAwMDAwIG4gCjAwMDAwMDA4MTcgMDAwMDAgbiAKMDAwMDAwMDkyMCAwMDAwMCBuIAp0cmFpbGVyCjw8L1Jvb3QgOCAwIFIvSUQgWzwzMmJmYmVkYjczYzE1OWYxZmViNmJhMDc4YTRhNDUwZT48MjdlZDdhZDIyNTUwOWIzNTgzZDQxNDExNzZlYzU3NTM+XS9JbmZvIDkgMCBSL1NpemUgMTA+PgpzdGFydHhyZWYKMTA4MgolJUVPRgo=`"`n}`n],`n`"Invoice_details`": {`n`"invoice_number`": `"12345`",`n`"invoice_currency`": `"EUR`",`n`"invoice_amount`": `"500.34`"`n}`n}"
$response = Invoke-RestMethod 'https://api.tradecert2.net/api/v1/cert/CO' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
User Token
It is advised to refresh the user token after every 24 hours.
Multi-Language Samples
Here at ICE DTO API documentation; we will always give out sample codes in different development languages to support the majority of the developers. The API References endpoints have more than 20 programming languages.
This request is responded to by a 200
Response Code with the following JSON.
{
"response_code": 0,
"message": "Success",
"application_id": "4586952"
}
Updated about 1 year ago
What’s Next