curl --request PATCH \
--url https://api.noyax.com/api/v1/definitions/shipment-definitions/{shipmentDefinitionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"Code": "5469",
"Description": "Istanbul road shipments",
"TransportMode": 1,
"TransportInfo1": "34ABC123",
"TransportInfo2": "<string>",
"CarrierName": "Example Logistics Ltd.",
"CarrierTaxNumber": "1234567890",
"CarrierCity": "ISTANBUL",
"CarrierDistrict": "KADIKÖY",
"CarrierCountry": "TÜRKİYE",
"Driver1FirstName": "Ahmet",
"Driver1LastName": "Kaya",
"Driver1IdentityNumber": "12345678901",
"Driver2FirstName": "<string>",
"Driver2LastName": "<string>",
"Driver2IdentityNumber": "<string>",
"TrailerPlate1": "34ABC123",
"TrailerPlate2": "<string>"
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/definitions/shipment-definitions/{shipmentDefinitionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"Code\": \"5469\",\n \"Description\": \"Istanbul road shipments\",\n \"TransportMode\": 1,\n \"TransportInfo1\": \"34ABC123\",\n \"TransportInfo2\": \"<string>\",\n \"CarrierName\": \"Example Logistics Ltd.\",\n \"CarrierTaxNumber\": \"1234567890\",\n \"CarrierCity\": \"ISTANBUL\",\n \"CarrierDistrict\": \"KADIKÖY\",\n \"CarrierCountry\": \"TÜRKİYE\",\n \"Driver1FirstName\": \"Ahmet\",\n \"Driver1LastName\": \"Kaya\",\n \"Driver1IdentityNumber\": \"12345678901\",\n \"Driver2FirstName\": \"<string>\",\n \"Driver2LastName\": \"<string>\",\n \"Driver2IdentityNumber\": \"<string>\",\n \"TrailerPlate1\": \"34ABC123\",\n \"TrailerPlate2\": \"<string>\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'PATCH',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Code: '5469',
Description: 'Istanbul road shipments',
TransportMode: 1,
TransportInfo1: '34ABC123',
TransportInfo2: '<string>',
CarrierName: 'Example Logistics Ltd.',
CarrierTaxNumber: '1234567890',
CarrierCity: 'ISTANBUL',
CarrierDistrict: 'KADIKÖY',
CarrierCountry: 'TÜRKİYE',
Driver1FirstName: 'Ahmet',
Driver1LastName: 'Kaya',
Driver1IdentityNumber: '12345678901',
Driver2FirstName: '<string>',
Driver2LastName: '<string>',
Driver2IdentityNumber: '<string>',
TrailerPlate1: '34ABC123',
TrailerPlate2: '<string>'
})
};
fetch('https://api.noyax.com/api/v1/definitions/shipment-definitions/{shipmentDefinitionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/definitions/shipment-definitions/{shipmentDefinitionId}"
payload = {
"Code": "5469",
"Description": "Istanbul road shipments",
"TransportMode": 1,
"TransportInfo1": "34ABC123",
"TransportInfo2": "<string>",
"CarrierName": "Example Logistics Ltd.",
"CarrierTaxNumber": "1234567890",
"CarrierCity": "ISTANBUL",
"CarrierDistrict": "KADIKÖY",
"CarrierCountry": "TÜRKİYE",
"Driver1FirstName": "Ahmet",
"Driver1LastName": "Kaya",
"Driver1IdentityNumber": "12345678901",
"Driver2FirstName": "<string>",
"Driver2LastName": "<string>",
"Driver2IdentityNumber": "<string>",
"TrailerPlate1": "34ABC123",
"TrailerPlate2": "<string>"
}
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Code": "5469",
"Description": "Istanbul road shipments",
"TransportMode": 1,
"TransportInfo1": "34ABC123",
"TransportInfo2": "<string>",
"CarrierName": "Example Logistics Ltd.",
"CarrierTaxNumber": "1234567890",
"CarrierCity": "ISTANBUL",
"CarrierDistrict": "KADIKÖY",
"CarrierCountry": "TÜRKİYE",
"Driver1FirstName": "Ahmet",
"Driver1LastName": "Kaya",
"Driver1IdentityNumber": "12345678901",
"Driver2FirstName": "<string>",
"Driver2LastName": "<string>",
"Driver2IdentityNumber": "<string>",
"TrailerPlate1": "34ABC123",
"TrailerPlate2": "<string>"
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "0533",
"Message": "TransportMode must be 1 (road), 2 (rail), 3 (maritime) or 4 (air).",
"Errors": [
{
"Code": "0533",
"Message": "TransportMode must be 1 (road), 2 (rail), 3 (maritime) or 4 (air)."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "0530",
"Message": "Shipment definition not found.",
"Errors": [
{
"Code": "0530",
"Message": "Shipment definition not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Partially update shipment definition
Changes only the sent fields of a shipment definition.
curl --request PATCH \
--url https://api.noyax.com/api/v1/definitions/shipment-definitions/{shipmentDefinitionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"Code": "5469",
"Description": "Istanbul road shipments",
"TransportMode": 1,
"TransportInfo1": "34ABC123",
"TransportInfo2": "<string>",
"CarrierName": "Example Logistics Ltd.",
"CarrierTaxNumber": "1234567890",
"CarrierCity": "ISTANBUL",
"CarrierDistrict": "KADIKÖY",
"CarrierCountry": "TÜRKİYE",
"Driver1FirstName": "Ahmet",
"Driver1LastName": "Kaya",
"Driver1IdentityNumber": "12345678901",
"Driver2FirstName": "<string>",
"Driver2LastName": "<string>",
"Driver2IdentityNumber": "<string>",
"TrailerPlate1": "34ABC123",
"TrailerPlate2": "<string>"
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/definitions/shipment-definitions/{shipmentDefinitionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"Code\": \"5469\",\n \"Description\": \"Istanbul road shipments\",\n \"TransportMode\": 1,\n \"TransportInfo1\": \"34ABC123\",\n \"TransportInfo2\": \"<string>\",\n \"CarrierName\": \"Example Logistics Ltd.\",\n \"CarrierTaxNumber\": \"1234567890\",\n \"CarrierCity\": \"ISTANBUL\",\n \"CarrierDistrict\": \"KADIKÖY\",\n \"CarrierCountry\": \"TÜRKİYE\",\n \"Driver1FirstName\": \"Ahmet\",\n \"Driver1LastName\": \"Kaya\",\n \"Driver1IdentityNumber\": \"12345678901\",\n \"Driver2FirstName\": \"<string>\",\n \"Driver2LastName\": \"<string>\",\n \"Driver2IdentityNumber\": \"<string>\",\n \"TrailerPlate1\": \"34ABC123\",\n \"TrailerPlate2\": \"<string>\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'PATCH',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Code: '5469',
Description: 'Istanbul road shipments',
TransportMode: 1,
TransportInfo1: '34ABC123',
TransportInfo2: '<string>',
CarrierName: 'Example Logistics Ltd.',
CarrierTaxNumber: '1234567890',
CarrierCity: 'ISTANBUL',
CarrierDistrict: 'KADIKÖY',
CarrierCountry: 'TÜRKİYE',
Driver1FirstName: 'Ahmet',
Driver1LastName: 'Kaya',
Driver1IdentityNumber: '12345678901',
Driver2FirstName: '<string>',
Driver2LastName: '<string>',
Driver2IdentityNumber: '<string>',
TrailerPlate1: '34ABC123',
TrailerPlate2: '<string>'
})
};
fetch('https://api.noyax.com/api/v1/definitions/shipment-definitions/{shipmentDefinitionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/definitions/shipment-definitions/{shipmentDefinitionId}"
payload = {
"Code": "5469",
"Description": "Istanbul road shipments",
"TransportMode": 1,
"TransportInfo1": "34ABC123",
"TransportInfo2": "<string>",
"CarrierName": "Example Logistics Ltd.",
"CarrierTaxNumber": "1234567890",
"CarrierCity": "ISTANBUL",
"CarrierDistrict": "KADIKÖY",
"CarrierCountry": "TÜRKİYE",
"Driver1FirstName": "Ahmet",
"Driver1LastName": "Kaya",
"Driver1IdentityNumber": "12345678901",
"Driver2FirstName": "<string>",
"Driver2LastName": "<string>",
"Driver2IdentityNumber": "<string>",
"TrailerPlate1": "34ABC123",
"TrailerPlate2": "<string>"
}
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Code": "5469",
"Description": "Istanbul road shipments",
"TransportMode": 1,
"TransportInfo1": "34ABC123",
"TransportInfo2": "<string>",
"CarrierName": "Example Logistics Ltd.",
"CarrierTaxNumber": "1234567890",
"CarrierCity": "ISTANBUL",
"CarrierDistrict": "KADIKÖY",
"CarrierCountry": "TÜRKİYE",
"Driver1FirstName": "Ahmet",
"Driver1LastName": "Kaya",
"Driver1IdentityNumber": "12345678901",
"Driver2FirstName": "<string>",
"Driver2LastName": "<string>",
"Driver2IdentityNumber": "<string>",
"TrailerPlate1": "34ABC123",
"TrailerPlate2": "<string>"
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "0533",
"Message": "TransportMode must be 1 (road), 2 (rail), 3 (maritime) or 4 (air).",
"Errors": [
{
"Code": "0533",
"Message": "TransportMode must be 1 (road), 2 (rail), 3 (maritime) or 4 (air)."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "0530",
"Message": "Shipment definition not found.",
"Errors": [
{
"Code": "0530",
"Message": "Shipment definition not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}- A field that is not sent stays unchanged, a field sent as
nullis cleared. - Validation runs on the whole merged record; setting a required field to
nullis rejected. - The carrier company and driver rules are checked on the merged record: setting only one of the carrier fields to
nullis rejected.
Authorizations
Access token obtained from the Noyax auth service with your API key.
Headers
ID of the Noyax user the request is made on behalf of. Written to the audit fields of created, updated and deleted records.
x >= 1ID of the company. The user must be assigned to this company. All reads and writes are limited to this company.
x >= 1ID of the accounting period. Optional for customer endpoints; if sent, it is written to created records.
x >= 1Path Parameters
Shipment definition ID.
Body
Required. Shipment code, unique within the company. At most 50 characters.
"5469"
Description. At most 255 characters.
"Istanbul road shipments"
Required. 1: Road, 2: Rail, 3: Maritime, 4: Air. Decides what TransportInfo1 and TransportInfo2 mean.
1
Required. Vehicle identifier, by TransportMode: 1 license plate, 2 train number, 3 vessel name, 4 aircraft number. At most 50 characters.
"34ABC123"
Second transport information, used only when TransportMode is 2 (rail car number) or 3 (IMO number). Not stored for 1 (road) and 4 (air). At most 50 characters.
Carrier company name. Required together with the other Carrier* fields when the shipment is made by a carrier company; leave all of them empty for the company's own vehicle. At most 75 characters.
"Example Logistics Ltd."
Carrier company tax number. At most 50 characters.
"1234567890"
Carrier company city. At most 50 characters.
"ISTANBUL"
Carrier company district. At most 50 characters.
"KADIKÖY"
Carrier company country. At most 50 characters.
"TÜRKİYE"
First name of driver 1. Required when no carrier company is used. Not stored when a carrier company is used. At most 50 characters.
"Ahmet"
Last name of driver 1. Required when no carrier company is used. At most 20 characters.
"Kaya"
National ID number (TCKN) of driver 1. Required when no carrier company is used. At most 20 characters.
"12345678901"
First name of driver 2. At most 50 characters.
Last name of driver 2. At most 20 characters.
National ID number (TCKN) of driver 2. At most 20 characters.
Trailer license plate 1. Stored only when TransportMode is 1 (road) and no carrier company is used. At most 20 characters.
"34ABC123"
Trailer license plate 2. Stored only when TransportMode is 1 (road) and no carrier company is used. At most 20 characters.
Response
OK
Whether the operation succeeded.
true
"0000" on success. On failure, the code of the first error; all errors are listed in Errors.
"0000"
Show child attributes
Show child attributes
Error message when Success is false. Messages of all errors are joined into a single text.