Returns the XML of the Previewed Despatch
var client = new RestClient("https://apitest.nilvera.com/edespatch/Send/Model/Download");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{
"EDespatch": {
"DespatchInfo": {
"UUID": "9dc0807f-4847-415b-a960-4a52ce585496",
"IssueDate": "2023-01-09T15:13:36.9376458+03:00",
"TemplateBase64String": null,
"TemplateUUID": "a2d5d0dd-a5b5-4a8a-a1e1-0a245caf5fd6",
"ActualDespatchDateTime": "2023-01-09T15:13:36.9376467+03:00",
"PayableAmount": 0,
"CurrencyCode": "TRY",
"DespatchType": "SEVK",
"DespatchProfile": "TEMELIRSALIYE",
"DespatchSerieOrNumber": "IRS",
"MatbuIssueDate": null,
"MatbuNumber": null},
"DespatchSupplierInfo": null,
"DeliveryCustomerInfo"": {
"PartyIdentifications": null,
"Address": "Papatya Caddesi Yasemin Sokak No21",
"District": "Melikgazi",
"City": "Kayseri",
"PostalCode": "38038",
"Country": "Türkiye",
"TaxOffice": null,
"TaxNumber": "1288331521",
"Name": "AAA Anonim Şirketi",
"Phone": null,
"Email": null,
"Fax": null,
"WebSite": null},
"BuyerCustomerInfo": null,
"SellerSupplierInfo": null,
"OriginatorCustomerInfo": null,
"Notes": null,
"DespatchLines": [{
"DeliveredUnitType": "C62",
"DeliveredUnitName": "Adet",
"Name": "Laptop",
"SellerCode": null,
"BuyerCode": null,
"Description": null,
"DeliveredQuantity": 1,
"QuantityPrice": 0,
"LineTotal": 0,
"AdditionalItemIdentification": null,
"OutstandingQuantity": 0,
"OutstandingUnitType": null,
"OutstandingUnitName": null,
"OutstandingReason": null,
"ManufacturerCode": null,
"BrandName": null,
"ModelName": null"ShipmentDetail":
{"ShipmentInfo": {"DriverPerson"": null,
"LicensePlateID": "00 AAA 000"},
"Delivery": {"AddressInfo": {"Address": "Teslimat Adresi",
"District": "Melikgazi",
"City": "Kayseri",
"Country": "Türkiye",
"PostalCode": "38038",
"Phone": null,
"Fax": null,
"Mail": null,
"WebSite": null,
"CarrierInfo": {"Address": "carrier address",
"District": "Melikgazi",
"City": "Kayseri",
"PostalCode": "38038",
"Country": "Türkiye",
"TaxNumber": ""1288331521",
"Phone": null,
"TaxOffice": null,
"Name": "AAA Anonim Şirket",
"Email": null,
"WebSite": null,
"Fax": null,
"TransportEquipment": null",
AdditionalDocumentReference": null,
"OrderReference": null,
,,CustomerAlias": null}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://apitest.nilvera.com/edespatch/Send/Model/Download',
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 =>'{
"EDespatch": {
"DespatchInfo": {
"UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"IssueDate": "2023-01-09T12:35:24.170Z",
"TemplateBase64String": "string",
"TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ActualDespatchDateTime": "2023-01-09T12:35:24.170Z",
"PayableAmount": 0,
"CurrencyCode": "string",
"DespatchType": "MATBUDAN",
"DespatchProfile": "TEMELIRSALIYE",
"DespatchSerieOrNumber": "string",
"MatbuIssueDate": "2023-01-09T12:35:24.170Z",
"MatbuNumber": "string"
},
"DespatchSupplierInfo": {
"PartyIdentifications": [
{
"SchemeID": "string",
"Value": "string"
}
],
"WebSite": "string",
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"TaxNumber": "string",
"Name": "string"
},
"DeliveryCustomerInfo": {
"PartyIdentifications": [
{
"SchemeID": "string",
"Value": "string"
}
],
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"TaxNumber": "string",
"Name": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"WebSite": "string"
},
"BuyerCustomerInfo": {
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"TaxNumber": "string",
"Name": "string",
"WebSite": "string"
},
"SellerSupplierInfo": {
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"TaxNumber": "string",
"Name": "string",
"WebSite": "string"
},
"OriginatorCustomerInfo": {
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"TaxNumber": "string",
"Name": "string",
"WebSite": "string"
},
"Notes": [
"string"
],
"DespatchLines": [
{
"DeliveredUnitType": "string",
"DeliveredUnitName": "string",
"Name": "string",
"SellerCode": "string",
"BuyerCode": "string",
"Description": "string",
"DeliveredQuantity": 0,
"QuantityPrice": 0,
"LineTotal": 0,
"AdditionalItemIdentification": "string",
"OutstandingQuantity": 0,
"OutstandingUnitType": "string",
"OutstandingUnitName": "string",
"OutstandingReason": "string",
"ManufacturerCode": "string",
"BrandName": "string",
"ModelName": "string"
}
],
"ShipmentDetail": {
"ShipmentInfo": {
"DriverPerson": [
{
"FirstName": "string",
"LastName": "string",
"TaxNumber": "string"
}
],
"LicensePlateID": "string"
},
"Delivery": {
"AddressInfo": {
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "string",
"Phone": "string",
"Fax": "string",
"Mail": "string",
"WebSite": "string"
},
"CarrierInfo": {
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxNumber": "string",
"Phone": "string",
"TaxOffice": "string",
"Name": "string",
"Email": "string",
"WebSite": "string",
"Fax": "string"
}
},
"TransportEquipment": [
"string"
]
},
"AdditionalDocumentReference": [
{
"ID": "string",
"IssueDate": "2023-01-09T12:35:24.170Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
],
"OrderReference": {
"ID": "string",
"IssueDate": "2023-01-09T12:35:24.170Z",
"DocumentReference": {
"ID": "string",
"IssueDate": "2023-01-09T12:35:24.170Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
}
},
"CustomerAlias": "string"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer <API KEY>',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({
"EDespatch": {
"DespatchInfo": {
"UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"IssueDate": "2023-01-09T12:35:24.170Z",
"TemplateBase64String": "string",
"TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ActualDespatchDateTime": "2023-01-09T12:35:24.170Z",
"PayableAmount": 0,
"CurrencyCode": "string",
"DespatchType": "MATBUDAN",
"DespatchProfile": "TEMELIRSALIYE",
"DespatchSerieOrNumber": "string",
"MatbuIssueDate": "2023-01-09T12:35:24.170Z",
"MatbuNumber": "string"
},
"DespatchSupplierInfo": {
"PartyIdentifications": [
{
"SchemeID": "string",
"Value": "string"
}
],
"WebSite": "string",
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"TaxNumber": "string",
"Name": "string"
},
"DeliveryCustomerInfo": {
"PartyIdentifications": [
{
"SchemeID": "string",
"Value": "string"
}
],
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"TaxNumber": "string",
"Name": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"WebSite": "string"
},
"BuyerCustomerInfo": {
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"TaxNumber": "string",
"Name": "string",
"WebSite": "string"
},
"SellerSupplierInfo": {
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"TaxNumber": "string",
"Name": "string",
"WebSite": "string"
},
"OriginatorCustomerInfo": {
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxOffice": "string",
"Phone": "string",
"Email": "string",
"Fax": "string",
"TaxNumber": "string",
"Name": "string",
"WebSite": "string"
},
"Notes": [
"string"
],
"DespatchLines": [
{
"DeliveredUnitType": "string",
"DeliveredUnitName": "string",
"Name": "string",
"SellerCode": "string",
"BuyerCode": "string",
"Description": "string",
"DeliveredQuantity": 0,
"QuantityPrice": 0,
"LineTotal": 0,
"AdditionalItemIdentification": "string",
"OutstandingQuantity": 0,
"OutstandingUnitType": "string",
"OutstandingUnitName": "string",
"OutstandingReason": "string",
"ManufacturerCode": "string",
"BrandName": "string",
"ModelName": "string"
}
],
"ShipmentDetail": {
"ShipmentInfo": {
"DriverPerson": [
{
"FirstName": "string",
"LastName": "string",
"TaxNumber": "string"
}
],
"LicensePlateID": "string"
},
"Delivery": {
"AddressInfo": {
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "string",
"Phone": "string",
"Fax": "string",
"Mail": "string",
"WebSite": "string"
},
"CarrierInfo": {
"Address": "string",
"District": "string",
"City": "string",
"PostalCode": "string",
"Country": "string",
"TaxNumber": "string",
"Phone": "string",
"TaxOffice": "string",
"Name": "string",
"Email": "string",
"WebSite": "string",
"Fax": "string"
}
},
"TransportEquipment": [
"string"
]
},
"AdditionalDocumentReference": [
{
"ID": "string",
"IssueDate": "2023-01-09T12:35:24.170Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
],
"OrderReference": {
"ID": "string",
"IssueDate": "2023-01-09T12:35:24.170Z",
"DocumentReference": {
"ID": "string",
"IssueDate": "2023-01-09T12:35:24.170Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
}
},
"CustomerAlias": "string"
});
var config = {
method: 'post',
url: 'https://apitest.nilvera.com/edespatch/Send/Model/Download',
headers: {
'Authorization': 'Bearer <API KEY>',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Last updated