Here is a list of all the methods available for Shipment Server API, including parameters and request and response examples. Some methods are only used in very specific scenarios, and you will only need these if you are using dangerous goods, shipping rules, etc.
"Equivalence in nShift On-premises" refers to the same function in nShift On-premises.
Links to the method descriptions:
AllocatePickupLocker
Allocates a pickuplocker. To use this, you need to call GetPickupLockers, or GetShipAdvise first with options parameter “PickupLocker”:1.
These functions will return a PickupLockerToken added to the option section for AllocatePickupLocker.
Parameters:
Name |
Type |
Mandatory |
shipment |
Shipment object |
Yes |
Options:
Name |
Type |
Mandatory |
Token |
string |
Can include product id instead |
PickupLockerToken |
string |
Yes |
Request example:
See request for SubmitShipment for data object.
In options:
{
"Token": "_-1_0_4784_5799_4784_5799_0_0__0__12/30/1899_12/30/1899___"
"PickupLockerToken": "eyJzFyd;2020-05-28T06:00:00;2020-05-28T21:00:00",
}
Expected output:
Successful request:
{
"Result": "Success",
"AllocatedPickupLockerToken": "198798;2020-05-28T06:00:00;2020-05-28T21:00:00;57,83,542,933,4784"
}
AllocatedPickupLockerToken needs to be included in options for SubmitShipment and VoidPickupLocker.
AllocateTimeslot
Parameters:
Name |
Type |
Mandatory |
shipment |
Shipment object |
Yes |
Options:
Name |
Type |
Mandatory |
EarliestPickup |
ISO date time |
Yes |
LatestPickup |
ISO date time |
Yes |
Token |
string |
Yes |
TimeSlotToken |
string |
Yes |
Request example:
See request for SubmitShipment for data object.
In options:
{
"Token" "_-1_0_4784_5799_4784_5799_0_0__0__12/30/1899_12/30/1899___"
}
Expected output:
Successful request:
{Allocated TimeSlot Token needs to be included in options for SubmitShipment and Void Timeslot. For more information, see the article Creating Shipments using TimeSlots.
"Result": "Success",
"AllocatedTimeSlotToken": "RzdDtmZjIxYTlkMi1mM2ZhLTExZWEtYjY3..."
}
ApplyDefaultsOnShipment
Parameters:
Name |
Type |
Mandatory |
shipment |
Shipment object |
Yes |
Other parameters:
Name |
Type |
Mandatory |
productchanged |
integer |
No |
Equivalence in nShift On-premises:
Production --> Change carrier
Request example:
See request for SubmitShipment
Successful request:
Shipment object
CheckHealth
Used by the load balancer to check the health of the server.
Parameters:
none
Equivalence in nShift On-premises:
none
Request example:
GET request:
http://localhost/shipmentserver/ShipmentServerModule.dll?Command=CheckHealth
Expected output:
Successful request:
{ "Messages": [ "Test passed" ] }
CreateBreakBulk
Activates break bulk functionality for a specified stack.
Parameters:
Name |
Type |
Mandatory |
StackCSID |
ID |
Yes |
ProdCSID |
ID |
Yes |
CountryCode |
string |
Yes |
IsEU |
0/1 |
Yes |
Equivalence in nShift On-premises:
Outbox --> select a stack and right click --> Bulk Shipment Product.
Request example:
{
"StackCSID": 461,
"ProdCSID": 794,
"CountryCode": "",
"IsEU": 1
}
Expected output:
Successful request:
{
"Messages": [
"Break bulk created"
]
}
CreateBreakBulkNumber
Clears shipment number for an existing break bulk shipment
Parameters:
Name |
Type |
Mandatory |
StackCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Press "Clear number and save" on break bulk.
Request example:
{
"StackCSID": 461
}
Expected output:
Successful request:
{
"Messages": [
" Break bulk number cleared"
]
}
Failed request example:
{
"Messages": [
"Break bulk number does not met requirements to be cleared"
]
}
CreateBreakBulkShipment
Clears shipment number for an existing break bulk shipment
Parameters:
Name |
Type |
Mandatory |
StackCSID |
ID |
Yes |
CurrencyCode |
String |
Yes |
Value |
String |
Yes |
Equivalence in nShift On-premises:
Outbox --> Select a stack and right click --> Create Bulk Shipment.
Request example:
{
"StackCSID": 435,
"CurrencyCode": "NOK",
"Value": "125.67"
}
Expected output:
Successful request:
{
"InstallationID": "",
"Kind": 1,
"ShpNo": "1263053794",
"PickupDt": "2020-04-16T00:00:00",
"DimensionalWeight": 13000,
"Vol": 12000000,
"Weight": 13000,
"Height": 228,
"Length": 228,
"Width": 228,
"ActorCSID": 72,
"Temperature": 1,
"CarriagePayer": 1,
"CarrierConceptID": 32,
"CarrierCSID": 24,
"SubcarrierConceptID": 219,
"SubcarrierCSID": 173,
"ProdConceptID": 1086,
"ProdCSID": 794,
"StackCSID": 157,
"PickupTerminal": "SK",
"AgentNo": "12321",
"PayerAccountAtCarrier": "12345678900",
"SenderAccountAtCarrier": "12345678900",
"Loadmeter": 60,
"Addresses": [
{
"Kind": 11,
"CustNo": "SK",
"ERPRef": "SK"
},
{
"Kind": 1,
"CountryCode": "DK"
},
{
"Kind": 14,
"CountryCode": "DK"
},
{
"Kind": 4,
"CountryCode": "DK"
},
{
"Kind": 3,
"CountryCode": "DK"
},
{
"Kind": 9,
"CountryCode": "DK"
},
{
"Kind": 5,
"CountryCode": "DK"
},
{
"Kind": 8,
"CountryCode": "DK"
},
{
"Kind": 13,
"CountryCode": "DK"
},
{
"Kind": 2,
"CountryCode": "DK"
}
],
"Amounts": [
{
"Kind": 10,
"CurrencyCode": 2,
"CurrencyName": "DKK",
"Value": 125.68
}
],
"References": [
{
"Kind": 63,
"Value": "1"
},
{
"Kind": 64,
"Value": "2"
}
],
"Messages": [
{
"Kind": 2,
"Text": "Message to carrier"
},
{
"Kind": 1,
"Text": "Message to driver"
},
{
"Kind": 3,
"Text": "Message to receiver"
}
],
"ShpConnections": [
{
"Kind": 4,
"ChildCSID": 5717
},
{
"Kind": 4,
"ChildCSID": 5718
},
{
"Kind": 4,
"ChildCSID": 5719
},
{
"Kind": 4,
"ChildCSID": 314481
},
{
"Kind": 4,
"ChildCSID": 314482
},
{
"Kind": 4,
"ChildCSID": 365162
},
{
"Kind": 4,
"ChildCSID": 365163
}
],
"Lines": [
{
"LineWeight": 13000,
"PkgWeight": 13000,
"LineVol": 12000000,
"PkgVol": 12000000,
"Loadmeter": 60,
"Pkgs": [
{}
]
}
],
"Services": [
32013
]
}
CreateLeadShipment
Creates the lead shipment for a specified lead group id.
Parameters:
Name |
Type |
Mandatory |
LeadGroupId |
ID |
Yes |
Country |
string |
Yes |
Equivalence in nShift On-premises:
Press Create button on Lead shipments form.
Request example:
{ "LeadGroupId": 576100072, "Country": "DK" }
Expected output:
Successful request:
{ "Messages": [ "Lead shipment successfully created: ShipmentId = 210916" ] }
Failed request examples:
{ "ErrorMessages": [ "Missing parameter LeadGroupId" ] }
{ "ErrorMessages": [ "Missing parameter Country" ] }
CreateStack
Creates a new stack on the given subcarrier level.
Parameters:
Name |
Type |
Mandatory |
SubcarrierConceptID or |
ID |
Yes |
StackName |
string |
Yes |
Equivalence in nShift On-premises:
Outbox --> Right click on a subcarrier --> New
Request example:
{ "SubcarrierConceptID": 60, "StackName": "Warehouse" }
Expected output:
Successful request:
{ "StackCSID": 41746 }
Duplicate stack name:
{ "ErrorMessages": [ "Stack name already exists" ] }
DeleteContact
Parameters:
Name |
Type |
Mandatory |
ContactCSID |
ID or array of IDs |
Yes |
Equivalence in nShift On-premises:
Contact List --> Select contacts --> Delete
Request example:
{ "ContactCSID": 123 }
Expected output:
Successful request:
{ "Messages": "Contacts deleted" }
DeleteLine
Parameters:
Name |
Type |
Mandatory |
LineCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox/Inbox/Draft --> Select one or more shipments --> Double click --> Edit shipment --> Trash line
Request example:
{ "LineCSID": 123 }
Expected output:
Successful request:
{ "Messages": [ "Line 123 has been deleted" ] }
DeletePackage
Deletes package by PkgCSID. Only packages that are not transmitted can be deleted.
Parameters:
Name |
Type |
Mandatory |
PkgCSID |
string |
Yes |
Equivalence in nShift On-premises:
Outbox/Inbox/Draft --> Select one or more shipments --> Double click --> Edit shipment --> Trash package
Request example:
{ "PkgCSID": 123 }
Expected output:
Successful request:
{ "Messages": [ "Package 123 has been deleted" ] }
Package not found
{ "ErrorMessages": [ "Cannot find given Package ID" ] }
Already deleted:
{ "ErrorMessages": [ " The package has already been deleted" ] }
Transmitted shipment:
{ "ErrorMessages": [ "Cannot delete a package on a shipment that has already been transmitted." ] }
DeleteShipment
Deletes shipment by ShpCSID. Only shipments that are not transmitted can be deleted.
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID or array of IDs |
Yes |
Equivalence in nShift On-premises:
Outbox/Inbox/Draft --> Select one or more shipments --> Right click --> Delete
Request example:
{ "ShpCSID": [112,60] }
Expected output:
Successful request:
{ "Messages": [ "The shipments have been deleted" ] }
Duplicate stack name:
{ "ErrorMessages": [ "Cannot find given shipment ID (123)" ] }
Already deleted:
{ "ErrorMessages": [ "This shipment has been already marked as deleted: 123" ] }
Transmitted shipment:
{ "ErrorMessages": [ "Cannot delete a shipment that has already been transmitted: 123" ] }
DeleteShippingRules
Parameters:
None.
Equivalence in nShift On-premises:
Setup --> List files --> Delete ConsignorShippingRules.xml file
Request example:
data: {}
Expected output:
Successful request:
{ "Messages": [ "Shipping rules removed." ] }
DeleteShippingRulesPostCodeFile
Parameters:
Name |
Type |
Mandatory |
FileName |
string |
Yes |
Equivalence in nShift On-premises:
Setup --> Shipping rules --> Delete postcode validation file
Request example:
Data:
{ "FileName": "PostDK.txt" }
Context:
{ "CarrierConceptID": 5, "SubcarrierConceptID": 10, "ProdConceptID": 60 }
Expected output:
Successful request:
{ "data": 0 }
DeleteStack
Deletes a stack by StackCSID. It is only possible to delete a stack that is empty (not containing any shipments).
Parameters:
Name |
Type |
Mandatory |
StackCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox --> Right click on a Stack --> Delete
Request example:
{ "StackCSID": 60 }
Expected output:
Successful request:
{ "Message": [ "Stack has been deleted" ] }
Deleting stack with shipments:
{ "ErrorMessages": [ "Cannot delete stack until shipments are transmitted" ] }
Stack not found:
{ "ErrorMessages": [ "Cannot find given StackCSID" ] }
GetAutoPrint
Parameters:
Name |
Type |
Mandatory |
StartIndex |
Integer |
Yes |
Count |
Integer |
Yes |
SortField |
String |
No |
SortDirection |
0 or 1 |
No |
RequestPkgCount |
Integer |
No |
RequestReferences |
Array of integers |
No |
Equivalence in nShift On-premises:
Main --> AutoPrint
Request example:
{
"StartIndex": 1,
"Count": 10,
"SortField": "ImportDt",
"SortDirection": 1
}
Expected output:
Successful request:
{
"Shipments": [
{
"ShpCSID": 55379,
"ImportDt": "2016-07-21T13:25:54",
"Addresses": [
{
"Kind": 1,
"Name1": "Sorin",
"Street1": "A1",
"PostCode": "0580",
"City": "OSLO"
}
]
}
]
}
GetBatchDetails
Get the details about the documents in the batch. The batch contains the information about the transmitted shipments such as the EDI file and carrier specific reports, which contains a document for all the transmitted shipments for the batch. Use the BatchCSID from GetBatchList or the ShpCSID from the shipment response to get the details about the documents in the batch.
Parameters:
Name |
Type |
Mandatory |
BatchCSID |
ID |
Alternate |
ShpCSID |
ID |
Alternate |
Equivalence in nShift On-premises:
Transmitted Batch --> Double click on batch
Request example:
{"BatchCSID":231}
Expected output:
Successful request:
{ "BatchCSID": "231", "ActorName": "Petrisor", "CarrierFullName": "Bring(New)", "SubcarrierName": "Parcels", "StackName": "Stack 1", "TransmitDt": "2011-11-14T13:58:24", "SentDt": "2011-11-14T13:58:25", "Files": [ { "BatchReportCSID": "436", "BatchReportName": "1411.edi", "CreationDate": "2011-11-14T13:58:24", "Description": "EDI File", "IsEdiFile": 1 }, { "BatchReportCSID": "437", "BatchReportName": "BringSpecificReport.pdf", "CreationDate": "2011-11-14T13:58:25", "Description": "PDF Document", "IsEdiFile": 0 } ] }
GetBatchList
GetBatchList returns a list of batches from the criteria in the request. When shipments are transmitted they are placed in a batch. A batch will only contain the currently transmitted shipments for the carrier it belongs to. That means that next time shipments are transmitted, a new batch is created for them.
Parameters:
Name |
Type |
Mandatory |
Notes |
StartIndex |
Integer |
Yes |
The start index of the result. |
Count |
Integer |
Yes |
Number of records that will be returned. |
SortField |
String |
No |
The field which the result should be sorted on. |
SortDirection |
0 or 1 |
No |
Sort order, the number value 0 for ascending and 1 for descending |
Equivalence in nShift On-premises:
Request example:
{ "StartIndex": "0", "Count": 2 }
Successful request:
{ "Count": "197", "Batches": [ { "BatchCSID": "194", "ActorName": "Petrisor", "CarrierFullName": "Schenker Sverige", "SubcarrierName": "Schenker Sverige", "StackName": "Stack 1", "TransmitDt": "2011-09-21T16:22:47", "SentDt": "2011-09-21T16:22:47", "CarrierConceptID": "22", "SubcarrierConceptID": "48", "CarrierCSID": "31", "SubcarrierCSID": "66" }, { "BatchCSID": "198", "ActorName": "Petrisor", "CarrierFullName": "Schenker Sverige", "SubcarrierName": "Schenker Sverige", "StackName": "Stack 1", "TransmitDt": "2011-09-28T14:35:08", "SentDt": "2011-09-28T14:35:08", "CarrierConceptID": "22", "SubcarrierConceptID": "48", "CarrierCSID": "31", "SubcarrierCSID": "66" } ] }
GetBatchReport
Retrieve the report (document) from a batch.
Parameters:
Name |
Type |
Mandatory |
BatchReportCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Transmitted Batch --> Double click on batch --> Double click on report file
Request example:
{ "BatchReportCSID": "436" }
Expected output:
Successful request results in a binary file returned (report as PDF)
GetBreakBulkInvoiceSummary
Returns bulksplit children’s invoice value and currency
Parameters:
Name |
Type |
Mandatory |
StackCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox --> Select a stack and right-click --> Create Bulk Shipment
Request example:
{ "StackCSID": "461" }
Expected output:
{
"BreakBulkInvoiceSummary": [
{
"CurrencyCode": "CAD",
"Value": 123
},
{
"CurrencyCode": "NOK",
"Value": 124
},
{
"CurrencyCode": "DKK",
"Value": 125
}
]
}
GetBatchShipments
Parameters:
Name |
Type |
Mandatory |
BatchCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Transmitted Batch --> Double click on batch
Request example:
{ "BatchCSID": "231" }
Expected output:
{ "Shipments": [ { "ShpCSID": 1483, "ShpNo": "66123456961NO", "Addresses": [ { "Name1": "Receiver", "Street1": "OSLO GATE", "PostCode": "1002", "City": "K\u00d8BENHAVN K" } ], "SubmitDt": "2011-11-14T13:58:08", "ProdName": "Business Parcel" } ] }
GetContactLists
Parameters:
None
Equivalence in nShift On-premises:
Contact lists
Expected output:
Successful request:
{ "ContactLists": [ { "ContactListCSID": "13", "ContactListName": "Customers", "Level": 3 }, { "ContactListCSID": "14", "ContactListName": "List of payers ", "Level": 3 }, { "ContactListCSID": "15", "ContactListName": "Sender list", "Level": 3 }, { "ContactListCSID": "102", "ContactListName": "PAYER2", "Level": 3 } ] }
GetContactProfile
Parameters:
Name |
Type |
Mandatory |
ContactNo |
string |
No |
ProdCSID |
ID |
No |
SortField |
string |
No |
SortDirection |
string |
No |
ContactKind |
int |
No |
Equivalence in nShift On-premises:
Contacts --> Double click on contact
Request example:
{ "ContactCSID": 4571825 }
Expected output:
Successful request:
{ "Contacts": [ { "AddressCSID": 12635154, "ContactCSID": 3950073, "ContactNo": "1316", "CustomerListName": "Actor", "Name1": "Teknik A\/S", "Street1": "rosbjergvej 35", "Street2": "", "PostCode": "8220", "Country": "Denmark", "CountryCode": "DK", "City": "Brabrand" } ] }
GetContacts
Parameters:
Name |
Type |
Mandatory |
ContactListCSID |
ID |
Yes |
StartIndex |
Int |
Yes |
Count |
Int |
Yes |
SortField |
String |
No |
SortDirection |
int |
No |
ContactKind |
Int |
No |
FilterField |
String |
No |
Filter |
String |
No |
FullContacts |
int |
No |
Equivalence in nShift On-premises:
Contacts
Request example:
{ "ContactListCSID": -1, "StartIndex": 0, "Count": 20, "SortField": "ContactNo", "SortDirection": 0, "ContactKind": 1, "FilterField": "" }
Use the method GetContactLists to retrieve the ContactListCSID.
Expected output:
Successful request:
{ "Contacts": [ { "ContactCSID": "5459924", "AddressCSID": "21316265", "Name1": "Teknik AS", "Street1": "Vestermarksvej 20", "City": "Aabenraa", "Country": "Denmark" }, { "ContactCSID": "5507115", "AddressCSID": "21699853", "Name1": "Volvo", "Street1": "Amerikavej 2", "City": "Fredericia", "Country": "Denmark" } ] }
GetDefaultShipment
Parameters:
Name |
Type |
Mandatory |
ProdConceptID |
ID |
Alternate |
ProdCSID |
ID |
Alternate |
Equivalence in nShift On-premises:
Production View --> the default shipment is loaded
Request example:
{ "ProdCSID": 60 }
Expected output:
Successful request:
{ "InstallationID": "00000000018", "Kind": 1, "PickupDt": "2016-10-10T00:00:00", "ActorCSID": 63, "CarriagePayer": 1, "CarrierConceptID": 3, "CarrierCSID": 4, "SubcarrierConceptID": 7, "SubcarrierCSID": 9, "ProdConceptID": 47, "ProdCSID": 60, "StackCSID": 38729, "PayerAccountAtCarrier": "03256999955", "SenderAccountAtCarrier": "03256999955", "Addresses": [ { "Kind": 11 }, { "Kind": 1, "CountryCode": "NO" }, { "Kind": 14, "Name1": "delivery name1", "Street1": "delivery address1", "PostCode": "1477", "City": "FJELLHAMAR", "CountryCode": "NO" }, { "Kind": 4, "CountryCode": "NO" }, { "Kind": 3, "CountryCode": "NO" }, { "Kind": 9, "CountryCode": "NO" }, { "Kind": 2, "Name1": "gagEDI-Soft AS", "Street1": "test", "PostCode": "1540", "City": "VESTBY", "Phone": "67 06 49 001", "Email": "test@edi-soft.com", "Attention": "attt", "Fax": "67 06 49 90", "CountryCode": "NO" } ], "Amounts": [ ], "References": [ { "Kind": 140, "Value": "test@edi-soft.com" } ] }
GetDGArticleNoInfo
Parameters:
Name |
Type |
Mandatory |
ArticleNo |
ID |
Yes |
Context:
Name |
Type |
Mandatory |
CarrierConceptID or CarrierCSID |
ID |
Yes |
SubcarrierConceptID or SubcarrierCSID |
ID |
Yes |
ProdConceptID or ProdCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Production View --> Dangerous Goods --> ArticleNo
Data:
{
"ArticleNo":"10010"
}
Request example:
context:
{ "CarrierConceptID": 5, "SubcarrierConceptID": 10, "ProdConceptID": 60 }
Expected output:
Successful request:
{
"ArticleNo":"10010",
"Name":"PHOSPHORIC ACID, SOLUTION",
"UN":1805,"Class":13,
"Classification":"C1",
"PackingGroup":3,
"LimitedQuantities":"0",
"ExceptedQuantities":"1",
"TransportCategory":"3 ; (E)",
"ItemGrossWeight":25000,
"ItemNetWeight":25000,"EMSNo":"F-A, S-B"
}
GetDGArticleNoInfoList
Parameters:
None
Context:
Name |
Type |
Mandatory |
CarrierConceptID or CarrierCSID |
ID |
Yes |
SubcarrierConceptID or SubcarrierCSID |
ID |
Yes |
ProdConceptID or ProdCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Production View --> Dangerous Goods --> ArticleNo --> […]
Request example:
context:
{ "CarrierConceptID": 5, "SubcarrierConceptID": 10, "ProdConceptID": 60 }
Expected output:
Successful request:
{ "DGList": [ { "ArticleNo": "0505", "Name": "0505 SIGNALS, DISTRESSship" }, { "ArticleNo": "10010", "Description": "Trailer Wash", "Name": "1805 PHOSPHORIC ACID, SOLUTION" } ] }
GetDGEnums
Parameters:
Name |
Type |
Mandatory |
ProdConceptID |
ID |
Alternate |
ProdCSID |
ID |
Alternate |
Equivalence in nShift On-premises:
none
Request example:
{ "ProdCSID": 60 }
Expected output:
Successful request:
{ "DGKind": [ { "Key": 0, "Value": "ADR\/RID" }, { "Key": 1, "Value": "IMD" } ], "DGClass": [ { "Key": 1, "Value": "1" }, { "Key": 2, "Value": "2" }, { "Key": 3, "Value": "2.1" }, { "Key": 4, "Value": "3" }, { "Key": 5, "Value": "4.1" }, { "Key": 6, "Value": "4.2" }, { "Key": 7, "Value": "4.3" }, { "Key": 8, "Value": "5.1" }, { "Key": 9, "Value": "5.2" }, { "Key": 10, "Value": "6.1" }, { "Key": 11, "Value": "6.2" }, { "Key": 12, "Value": "7" }, { "Key": 13, "Value": "8" }, { "Key": 14, "Value": "9" }, { "Key": 15, "Value": "1.1A" }, { "Key": 16, "Value": "1.1B" }, { "Key": 17, "Value": "1.1C" }, { "Key": 18, "Value": "1.1D" }, { "Key": 19, "Value": "1.1E" }, { "Key": 20, "Value": "1.1F" }, { "Key": 21, "Value": "1.1G" }, { "Key": 22, "Value": "1.1J" }, { "Key": 23, "Value": "1.1L" }, { "Key": 24, "Value": "1.2B" }, { "Key": 25, "Value": "1.2C" }, { "Key": 26, "Value": "1.2D" }, { "Key": 27, "Value": "1.2E" }, { "Key": 28, "Value": "1.2F" }, { "Key": 29, "Value": "1.2G" }, { "Key": 30, "Value": "1.2H" }, { "Key": 31, "Value": "1.2J" }, { "Key": 32, "Value": "1.2K" }, { "Key": 33, "Value": "1.2L" }, { "Key": 34, "Value": "1.3C" }, { "Key": 35, "Value": "1.3G" }, { "Key": 36, "Value": "1.3H" }, { "Key": 37, "Value": "1.3J" }, { "Key": 38, "Value": "1.3K" }, { "Key": 39, "Value": "1.3L" }, { "Key": 40, "Value": "1.4B" }, { "Key": 41, "Value": "1.4C" }, { "Key": 42, "Value": "1.4D" }, { "Key": 43, "Value": "1.4E" }, { "Key": 44, "Value": "1.4F" }, { "Key": 45, "Value": "1.4G" }, { "Key": 46, "Value": "1.4S" }, { "Key": 47, "Value": "1.5D" }, { "Key": 48, "Value": "1.6N" }, { "Key": 49, "Value": "2.2" }, { "Key": 50, "Value": "2.3" } ], "PackingGroup": [ { "Key": 1, "Value": "I" }, { "Key": 2, "Value": "II" }, { "Key": 3, "Value": "III" } ], "PackingType": [ ], "MarinePollution": [ { "Key": 1, "Value": "None" }, { "Key": 2, "Value": "IMDG" }, { "Key": 3, "Value": "ADR" } ], "TransportMode": [ { "Key": 1, "Value": "Sea" }, { "Key": 2, "Value": "Road" }, { "Key": 3, "Value": "Sea and road" } ] }
GetDGList
Parameters:
Name |
Type |
Mandatory |
DGID |
ID |
Alternate |
UN |
integer |
Alternate |
Count |
Integer; default = 1 |
No |
Equivalence in nShift On-premises:
Production View --> DG
Request examples:
{ "DGID": "123" }
{ "UN": "1234" }
Expected output:
Successful request:
{ "DGList": [ { "DGID": 1, "UN": "0004", "Name": "AMMONIUM PICRATE dry or wetted with less than 10% water, by mass", "Class": 1, "Classification": "1.1D", "PackingGroup": 0, "Labels": "1", "LimitedQuantities": "LQ0", "ExceptedQuantities": "E0", "PackingInstructions": "P112(a) ; P112(b) ; P112(c)", "SpecialPackingProvision": "PP26", "MixedPackingProvision": "MP20", "TransportCategory": "1 ; (B1000C)", "SpecialProvisionsPackages": "V2 ; V3", "SpecialProvisionsHandling": "CV1 ; CV2 ; CV3", "SpecialProvisionsOperation": "S1" } ] }
DGID not found:
{ "ErrorMessages": [ "Cannot find DGID." ] }
GetDocument
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Alternate |
DocumentCSID |
ID |
Alternate |
ShpCSID |
Array of IDs |
Alternate |
ShpCSID:
Returns all documents for the shipment that is enabled on the carrier / product.
The label will not be returned in the result.
DocumentCSID:
Returns the specified document. Use the GetDocumentList method to retrieve
the list of DocumentCSID for documents.
The format of the documents is pdf and encoded as Base64.
Note: Documents are only stored for 10 days in the Shipment Server database.
Equivalence in nShift On-premises:
Outbox --> Double click on shipment --> Print Freight Documents
Request example:
{ "ShpCSID": 11126720, "DocumentCSID": 13978272 }
Expected output:
Successful request:
{ "Documents": [ { "DocumentCSID": 13978272, "DocumentName": "DK.Fragtbrev","IG4NCjAwMDAwMTI0ODMgMDAwMDAgbg0KMDAwMDAxNDE4NCAwMDAwMCBuDQp0cmFpbGVyDQo8PA0KL1Jvb3QgMSAwIFIvSW5mbyAzIDAgUi9TaXplIDIwDQo+Pg0Kc3RhcnR4cmVmDQoxNDY4MA0KJSVFT0Y= […]", "Copies": 1 } ] }
GetDocumentCount
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox --> Double click on shipment --> Print Freight Documents
Request example:
{ "ShpCSID": 11126720 }
Expected output:
{ "Count": 2, "Labels": 0, "FreightLetters": 2 }
GetDocumentList
The method returns a list of all the documents that was created on the shipment at submit,
e.g. freight letters and Waybill. It is carrier specific which documents that are available.
Use the method GetDocument to retrieve the documents.
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox --> Double click on shipment --> Print Freight Documents
Request example:
{ "ShpCSID": 11126720 }
Expected output:
Successful request:
{ "Documents": [ { "ShpCSID": 11126720, "DocumentID": 22, "DocumentCSID": 13978271, "DocumentName": "DK.DF Fragtbrev", "DocumentType": "FreightLetter" }, { "ShpCSID": 11126720, "DocumentID": 30, "DocumentCSID": 13978272, "DocumentName": "DK.Fragtbrev", "PrintedDt": "2016-10-24T13:36:44", "DocumentType": "FreightLetter" } ] }
GetDraftShipments
The GetDraftShipments method returns a list of shipments that are saved as drafts.
Parameters:
Name |
Type |
Mandatory |
StartIndex |
Integer |
Yes |
Count |
Integer |
Yes |
SortField |
String |
No |
SortDirection |
0 or 1 |
No |
RequestPkCount |
Integer |
No |
RequestReferences |
Array of integers |
No |
Equivalence in nShift On-premises:
Main --> Draft
Request example:
{
"StartIndex": 1,
"Count": 10,
"SortField": "ImportDt",
"SortDirection": 1
}
Expected output:
Successful request:
{ "Shipments": [ { "ShpCSID": 55379, "ImportDt": "2016-07-21T13:25:54", "Addresses": [ { "Kind": 1, "Name1": "Sorin", "Street1": "A1", "PostCode": "0580", "City": "OSLO" } ] } ] }
GetDropPoints
Returns drop points (service points) for the given product that supports it.
Parameters:
Name |
Type |
Mandatory |
ResultCount |
Int |
No, default = 10 |
shipment |
Shipment object |
Yes |
Equivalence in nShift On-premises:
Production --> Drop Points --> Browse
Request example:
{ "ProdConceptID": 60, "ResultCount": 1, "Addresses": [ { "Kind": 1, "Name1": "John Doe", "Street1": "Test address 1", "PostCode": "0580", "City": "OSLO", "CountryCode": "NO" } ] }
Expected output:
Successful request:
{ "DropPoints": [ { "OriginalID": "3807542", "RoutingCode": "ALF", "Name1": "POSTNORD PICK UP POINT", "Street1": "HARALDRUDV 11", "PostCode": "0581", "City": "OSLO", "CountryCode": "NO", "Distance": 0.891, "Latitude": 59.9303385682, "Longitude": 10.8246658266 }, ] }
Not supported on product:
{ "ErrorMessages": [ "DropPoint selection not supported for this product." ] }
Conditions not met:
{ "ErrorMessages": [ "Cannot use DropPoint service, conditions not met." ] }
Read our full article about Handling drop points in Shipment Server.
GetDropZonePrinters
Returns all printers connected to Drop Zone for a specific user.
Parameters:
Name |
Type |
Mandatory |
UserName |
string |
yes |
Equivalence in nShift On-premises:
None
Request example:
{ "UserName": "testuser2" }
Expected output:
Successful request:
{ "Printers": [ { "AppInstallationTag": "19F0FFA2-B499-463C-A622-6792E6BDXXXX", "PrinterTag": "B78B28EB-246D-4A3E-A4EB-84EB62CFA0DD", "PrinterName": "Bullzip PDF Printer", "PrinterDescr": "Bullzip PDF Printer", "PrinterType": "PDFLABEL", "Options": { "Orientation": 0, "PaperSize": 9, "PaperSource": 15, "ImportKeys": [ ], "IsFilePrinter": 0, "DefaultForLabels": 0, "DefaultForFreightDocuments": 0, "LeftOffset": 0, "TopOffset": 0, "PdfSizeAsLabelSize": 1, "PdfStretch": 2 } }, { "AppInstallationTag": "19F0FFA2-B499-463C-A622-6792E6BDXXXX", "PrinterTag": "6CAB3766-0E02-4735-9BD0-C4347A9B81B1", "PrinterName": "ZDesigner GK420d (COP)", "PrinterDescr": "ZDesigner GK420d (COP)", "PrinterType": "ZPLGK", "Options": { "Orientation": 0, "PaperSize": 256, "PaperSource": 4, "ImportKeys": [ ], "IsFilePrinter": 0, "DefaultForLabels": 0, "DefaultForFreightDocuments": 0, "LeftOffset": 0, "TopOffset": 0, "PdfSizeAsLabelSize": 0, "PdfStretch": 2 } }, { "AppInstallationTag": "19F0FFA2-B499-463C-A622-6792E6BDXXXX", "PrinterTag": "1C3D290E-F7F9-40EE-9376-B95EAFA2FB85", "PrinterName": "Test", "PrinterDescr": "test Andreea", "PrinterType": "ZPLGK", "Options": { "Orientation": 0, "PaperSize": 0, "PaperSource": 0, "ImportKeys": [ "PLA", "PLA1" ], "FileNamePattern": "@@ShipmentNumber@@.zpl", "OutputFolder": "E:\\DropZone\\Print", "IsFilePrinter": 1, "DefaultForLabels": 1, "DefaultForFreightDocuments": 1, "LeftOffset": 0, "TopOffset": 0, "PdfSizeAsLabelSize": 0, "PdfStretch": 2 } } ] }
GetInboxShipments
Parameters:
Name |
Type |
Mandatory |
StartIndex |
Integer |
Yes |
Count |
Integer |
Yes |
SortField |
String |
No |
SortDirection |
0 or 1 |
No |
RequestPkgCount |
Integer |
No |
RequestReferences |
Array of integers |
No |
Equivalence in nShift On-premises:
Main --> Inbox
Request example:
{ "StartIndex": 1, "Count": 10, "SortField": "ImportDt", "SortDirection": 1 }
Expected output:
Successful request:
{ "Shipments": [ { "ShpCSID": 55379, "ImportDt": "2016-07-21T13:25:54", "Addresses": [ { "Kind": 1, "Name1": "Sorin", "Street1": "A1", "PostCode": "0580", "City": "OSLO" } ] } ] }
GetInsuranceClaimURL
Returns the claim URL for a shipment that is insured with If Insurance.
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox --> Right click on a subcarrier --> New
Request example:
{ "ShpCSID": 7836135 }
Expected output:
Successful request:
{ "ClaimURL": "http:\/\/ws2.consignorsupport.no\/insuranceportal\/claim.aspx?installationId=20001931326&actorId=63&authtoken=55IDE2857930599&esiid=102813" }
GetInsurancePrice
Calculates the insurance premium for the If insurance.
Parameters:
Name |
Type |
Mandatory |
Notes |
Amount |
Currency |
Yes |
The insurance amount |
CurrencyCode |
String |
Yes |
The currency for the insurance |
SenderCountryCode |
String |
Yes |
The sender country code in isoA2 format |
ReceiverCountryCode |
String |
Yes |
The receiver country code in isoA2 format |
Equivalence in nShift On-premises:
Production --> Insurance
Request example:
{ "Amount": "123", "CurrencyCode": "NOK", "SenderCountryCode": "GB", "ReceiverCountryCode": "FR" }
Expected output:
Successful request:
{ "Amount": 30, "CurrencyCode": "DKK", "Status": 0, "StatusKind": "Ok" }
GetLeadGroupDetails
Retrieves details for a specified lead group: Shipment id, Shipment number, Date submitted and Order number.
Parameters:
Name |
Type |
Mandatory |
LeadGroupId |
ID |
Yes |
Equivalence in nShift On-premises:
Press Details button on Lead shipments form.
Request example:
{ "LeadGroupId": 576100062 }
Expected output:
Succesful request:
{ "LeadGroupDetails": [ { "ShipmentId": 208910, "ShipmentNumber": "00R9F81260QQ3S", "DateSubmitted": "2\/24\/2017 2:53:12 PM" }, { "ShipmentId": 208911, "ShipmentNumber": "00R9F81260QQ3S", "DateSubmitted": "2\/24\/2017 3:07:10 PM", "OrderNumber": "on11" } ], "Count": 2 }
Failed request:
{ "ErrorMessages": [ "Missing parameter LeadGroupId" ] }
GetLeadGroups
Retrieves the lead groups for a specified stack.
Parameters:
Name |
Type |
Mandatory |
StackCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox --> Select a stack and right click --> Create lead shipments
Request example:
{ "StackCSID": 25597 }
Expected output:
Successful request:
{ "LeadGroups": [ { "LeadProductId": 22950, "LeadProductName": "UPS Lead", "LeadShipmentNumber": "97", "LeadPackageNumber": "98", "Name": "UPS", "Address1": "TAGENEVAGEN 34", "Address2": "KARRE 72:33", "Country": "SWEDEN", "City": "GOTEBORG", "Postcode": "42302" } ], "Count": 1 }
Failed request:
{ "ErrorMessages": [ "Invalid parameter StackCSID given" ] }
GetPackage
Parameters:
Name |
Type |
Mandatory |
PkgCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox/Inbox/Draft --> Select one or more shipments --> Double click --> Edit shipment
Request example:
{ "PkgCSID": 123 }
Expected output:
Successful request:
{ "PkgCSID": 113919, "ItemNo": 3, "PkgTag": "911B2C8A-14B0-49D3-B706-63E949109E3E", "PkgNo": "00370720681544753426", "CSEvents": [ { "Kind": 8, "Date": "2018-03-15T23:23:43", "User": "bogi" }, { "Kind": 23, "Date": "2018-03-16T18:05:21", "User": "nshift" }, { "Kind": 23, "Date": "2018-03-16T23:23:31", "User": "nshift" } ], "Labels": [ { "Content": "iVBORw0KGgoAAAANSU\u2026" } ] }
GetPickupLockers
Data:
Name |
Type |
Mandatory |
Shipment object |
Shipment object |
Yes |
Options
Name |
Type |
Mandatory |
Token |
String |
Not if ProdConceptID is in Data |
Token |
Token from GetShipAdvise |
Mandatory if product is not specified in Data. |
Request example:
Options
{"Token": "_-1_0_4784_5799_4784_5799_0_0__0__12/30/1899_12/30/1899___"}
GetPOArticles
Parameters:
Name |
Type |
Mandatory |
Shipment object |
Shipment object |
Yes |
Equivalence in nShift On-premises:
Production View --> Print (for certain products)
Request example:
See shipment used at SubmitShipment
GetPrinterFonts
Some carriers / products uses arial font for the labels. To be able to print a label made in ZPL II language correct, the printer needs to be updated with the arial font that this method returns. If the font is missing from the printer, the text will be pixelized on the label. You need a printer that supports ZPL II to print a label that uses the arial font, when requesting a label in ZPL II format with the label type ZPLGK. If you do not have a printer that supports ZPL II, then use the label type PNG or PDF.
Parameters:
Name |
Type |
Mandatory |
PrinterKind |
String |
Yes |
Options
Name |
Type |
Mandatory |
UseTTFFonts |
1/0 |
No |
Request example:
{ "PrinterKind": "ZPLGK" }
Expected output:
Successful request:
Font file encoded in Base64
{ "Fonts": "XlhBXkpCRV5Y[...]" }
GetProducts
Gets all carriers and sub carriers, products and services for the given actor along with the corresponding ConceptIDs and ServiceIDs . These IDs are a unique identifier for carriers, subcarriers, products and services. With this method it is easy to build a product selection at the client side that provides the IDs you need to create shipments.
Parameters:
None
Request example:
{}
Expected output example:
Successful request:
{ "Carriers": [ { "CarrierConceptID": 60, "CarrierCSID": 58, "CarrierFullName": "UPS", "CarrierShortName": "UPS", "Icon": "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAmINQAAAABJRU5ErkJggg==", "Subcarriers": [ { "SubcarrierConceptID": 120, "SubcarrierCSID": 108, "SubcarrierName": "UPS", "Products": [ { "ProdConceptID": 675, "ProdCSID": 567, "ProdName": "UPS Standard", "AllowCOD": 1, "GoodTypes": [ { "GoodTypeID": 2, "GoodTypeKey1": "02", "GoodTypeKey2": "01", "GoodTypeKeyword": "Customer supplied package" }, { "GoodTypeID": 1, "GoodTypeKey1": "01", "GoodTypeKey2": "02", "GoodTypeKeyword": "UPS Letter" }, { "GoodTypeID": 3, "GoodTypeKey1": "03", "GoodTypeKey2": "01", "GoodTypeKeyword": "Tube" }, { "GoodTypeID": 4, "GoodTypeKey1": "04", "GoodTypeKey2": "01", "GoodTypeKeyword": "PAK" }, { "GoodTypeID": 5, "GoodTypeKey1": "21", "GoodTypeKey2": "01", "GoodTypeKeyword": "UPS Express Box" }, { "GoodTypeID": 6, "GoodTypeKey1": "24", "GoodTypeKey2": "01", "GoodTypeKeyword": "UPS 25KG Box" }, { "GoodTypeID": 7, "GoodTypeKey1": "25", "GoodTypeKey2": "01", "GoodTypeKeyword": "UPS 10KG Box" }, { "GoodTypeID": 8, "GoodTypeKey1": "30", "GoodTypeKey2": "01", "GoodTypeKeyword": "Pallet" }, { "GoodTypeID": 9, "GoodTypeKey1": "2a", "GoodTypeKey2": "01", "GoodTypeKeyword": "Small Express box" }, { "GoodTypeID": 10, "GoodTypeKey1": "2b", "GoodTypeKey2": "01", "GoodTypeKeyword": "Medium Express box" }, { "GoodTypeID": 11, "GoodTypeKey1": "2c", "GoodTypeKey2": "01", "GoodTypeKeyword": "Large Express box" } ], "DetailGroups": [ { "DetailGroupID": 1, "Label": "Article Info", "Listing": "multiple", "Details": [ { "DetailID": 5, "Label": "No units"
"DataType": "3" }, { "DetailID": 8, "Label": "Unit of Measure (code)"
"DataType": "0" }, { "DetailID": 7, "Label": "Description of goods"
"DataType": "0" }, { "DetailID": 4, "Label": "Country of Origin"
"DataType": "1" }, { "DetailID": 2, "Label": "Unit Value"
"DataType": "4" }, { "DetailID": 1, "Label": "Article No"
"DataType": "0" }, { "DetailID": 18, "Label": "Commodity Code"
"DataType": "0" } ] }, { "DetailGroupID": 2, "Label": "Customs Info", "Listing": "single", "Details": [ { "DetailID": 19, "Label": "Invoice Number"
"DataType": "3" }, { "DetailID": 24, "Label": "Invoice Date"
"DataType": "5" }, { "DetailID": 21, "Label": "Currency"
"DataType": "2" }, { "DetailID": 26, "Label": "Discount"
"DataType": "4" }, { "DetailID": 27, "Label": "Freight Charges"
"DataType": "4" }, { "DetailID": 28, "Label": "Insurance"
"DataType": "4" }, { "DetailID": 29, "Label": "Charges Value"
"DataType": "4" }, { "DetailID": 30, "Label": "Charges Description"
"DataType": "0" }, { "DetailID": 14, "Label": "Additional Comments"
"DataType": "0" }, { "DetailID": 20, "Label": "Reason for Export"
"DataType": "0" }, { "DetailID": 22, "Label": "Declaration Statement"
"DataType": "0" }, { "DetailID": 25, "Label": "Terms of Sale (Incoterm)"
"DataType": "0" }, { "DetailID": 11, "Label": "VAT No Sender"
"DataType": "0" }, { "DetailID": 12, "Label": "VAT No Receiver"
"DataType": "0" }, { "DetailID": 13, "Label": "VAT No Buyer"
"DataType": "0" } ] } ], "Services": [ { "ServiceID": 60009, "ServiceName": "Receiver pays", "ServiceCode": "RECEIVERPAYS", "GroupID": 3, "Kind": 1 }, { "ServiceID": 60010, "ServiceName": "Thirdparty pays", "ServiceCode": "THIRDPARTY", "GroupID": 3, "Kind": 2 }, { "ServiceID": 60013, "ServiceName": "Residential Address", "ServiceCode": "RESIDENTIAL", "GroupID": 4 }, { "ServiceID": 60014, "ServiceName": "QVN Ship Notification", "ServiceCode": "QVNSHIP", "GroupID": 5 }, { "ServiceID": 60015, "ServiceName": "QVN Exception Notification", "ServiceCode": "QVNEXCEPTION", "GroupID": 5 }, { "ServiceID": 60016, "ServiceName": "QVN Delivery Notification", "ServiceCode": "QVNDELIVBERY", "GroupID": 5 }, { "ServiceID": 60007, "ServiceName": "COD - CASH", "ServiceCode": "CASH", "GroupID": 2 }, { "ServiceID": 60008, "ServiceName": "COD - CHECK", "ServiceCode": "CHECK", "GroupID": 2 }, { "ServiceID": 60018, "ServiceName": "Documents only", "ServiceCode": "DOCUMENTS" }, { "ServiceID": 60023, "ServiceName": "Commercial invoice (Paperless)", "ServiceCode": "COMMERCIALINVOICE" }, { "ServiceID": 60024, "ServiceName": "Freightpayer pays Duty \/ Tax", "ServiceCode": "DUTYTAX", "GroupID": 6 }, { "ServiceID": 60025, "ServiceName": "Other part pays Duty \/ Tax", "ServiceCode": "DUTYTAX2", "GroupID": 6 }, { "ServiceID": 60036, "ServiceName": "Receiver pays Tax only", "ServiceCode": "DUTYTAX3", "GroupID": 6 }, { "ServiceID": 60030, "ServiceName": "Pickup Request", "ServiceCode": "PickupReq" }, { "ServiceID": 60031, "ServiceName": "Saturday Delivery", "ServiceCode": "SatDel" }, { "ServiceID": 60034, "ServiceName": "Carbon Neutral", "ServiceCode": "CarbonNeutral", "GroupID": 8 }, { "ServiceID": 60039, "ServiceName": "Sender pays Duty \/ Tax", "ServiceCode": "DUTYTAX4", "GroupID": 6 }, { "ServiceID": 60040, "ServiceName": "Additional handling", "ServiceCode": "Additional handling" }, { "ServiceID": 60042, "ServiceName": "Signature Required", "ServiceCode": "Sign" } ] } ] } ] } ] }
DataTypes under Details
efkString=0 | string |
efkCountry=1 | country enum TECountry |
efkCurrency=2 | currency enum TECurrency |
efkInt=3 | int |
efkFloat=4 | real |
efkDate=5 | date |
efkTime=6 | time |
efkDateTime=7 | date with time |
efkNone=8 | no type, special fields with no value |
GetSenderAddress
Returns the sender address that is registered on the actor.
Parameters:
none
Equivalence in nShift On-premises:
Setup --> Select actor --> Sender address setup item
Request example:
{}
Expected output:
Successful request:
{ "Kind": 2, "Name1": "Test sender", "Street1": "Test Address", "PostCode": "0580", "City": "OSLO", "Phone": "23249480", "Mobile": "04799999999", "Attention": "test", "CountryCode": "NO" }
GetSetupItems
Parameters:
Name |
Type |
Mandatory |
CarrierConceptID or CarrierCSID |
ID |
Yes |
SubcarrierConceptID or SubcarrierCSID |
ID |
Yes |
ProdConceptID or ProdCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Setup --> Actor
Request example:
{}
Expected output:
Successful request:
{ "CODAccounts": [ { "CountryCode": "DK", "AccountNumber": "5678", "CurrencyCode": "DKK" }, { "CountryCode": "SE", "AccountNumber": "1234", "CurrencyCode": "SEK" } ], "CarrierAccount": { "Account": "123456", "AgentNo": "234q", "PickupTerminal": "A2" }, "SenderAddress": { "Kind": 2, "Name1": "Johnny", "Street1": "street name", "PostCode": "0192", "City": "OSLO", "Phone": "5555555555", "Mobile": "5445566567", "Email": "johndoe@maildomain.com", "Attention": "John Doe", "CountryCode": "NO" }, "DefaultInvoiceCurrency": "NOK", "DefaultCountry": "NOR", "DefaultInsuranceCurrency": "NOK" }
GetShipAdvise
Displays delivery options.
Parameters:
Name |
Type |
Mandatory |
Shipment |
Shipment object |
Yes |
Options
Name |
Type |
Mandatory |
ServiceLevel |
String |
No |
Price |
1 or 2 or CSR* |
No |
TimeSlots |
1/0 |
No |
DropPoints |
1/0 |
No |
DropPointCount |
Number of drop points to return for each product |
No |
PickupLockers |
1/0 |
No |
EarliestPickup |
ISO datetime format |
No |
RequiredDeliveryDate |
Datetime (Products without ETA set up will not be included in the result. |
No |
Deliverydate |
Use value ETAWS |
No |
* Use the value "CSR" to return the price from CSR. If you do not use the Price node in CSR, you can also trigger CPC with the values "1" or "2" to return Price1 or Price2. If you use the value "1" or "2" and the product is connected to a Price node, the price from CSR will be used instead of the price from CPC.
Request example, options:
"options": {
"ServiceLevel": "default",
"EarliestPickup": "2020-09-22T06:00",
"LatestPickup": "2020-09-22T21:00",
"PickupWindowCount": 1,
"TimeSlots": 1,
"TimeLog": 1
},
Request example:
Data:
{ "Addresses": [ { "Kind": 1, "Name1": "Name1 - Receiver", "Street1": "Test address 1", "PostCode": "8210", "City": "Aarhus V", "CountryCode": "DK" }, { "Kind": 2, "Name1": "Name1 - Sender", "Street1": "Test address 1", "PostCode": "7400", "City": "Herning", "CountryCode": "DK" } ], "Amounts": [ { "Kind": 9, "CurrencyCode": 5, "Value": 500 } ], "References": [ { "Kind": 63, "Value": "SameDay" } ], "Lines": [ { "PkgWeight": 2000, "PkgVol": 0, "Pkgs": [ { "ItemNo": 1 } ] } ] }
Expected output:
Successful request:
{ "ProdConceptID": 1551, "ProdCSID": 356, "ProdName": "GLS DK - Pakkeshop med Drop Points", "CustomFields": { "CarrierCode": "1551", "catecory": "b2b" }, "Services": [ { "serviceid": 11018, "name": "GLS sender email" } ], "Token": "11018_0_0_547_517_356_1551_0_0__0__30\/12\/1899_30\/12\/1899___", "SupportsDropPoint": 1 }
GetShipment
Get shipment data by ShpCSID, OrderNoCS or OrderNo.
If the Shipment Server account is configured with a Web Integration ( like a web shop, ERP system or ShipAdvisor), the OrderNo parameter will fetch the order from the integration and not the shipment with that order number in Shipment Server. In this combination the OrderNoCS parameter should be used if you want the shipment data on order number from a shipment created in Shipment Server, rather than fetching the order data from the integration. If no integration is enabled, both OrderNoCS and OrderNo parameter will return the Shipment Server shipment.
Note: When OrderNo / OrderNoCS is used, there can be more shipments with the same order number. All Shipments with the given order number will then be returned. ShpCSID is unique so only one shipment will be returned.
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Alternate |
OrderNo |
String |
Alternate |
OrderNoCS |
String |
Alternate |
InboxOnly |
0 or 1 |
No |
ExternalParams |
Array of strings |
No |
Options:
Name |
Type |
Mandatory |
Labels |
String |
No |
Equivalence in nShift On-premises:
Load shipment from inbox/draft/etc.
Request example:
{ "ShpCSID": 60 }
Expected output:
Successful request:
{ "ShpCSID": 24686922, "ShpESID": 3108600590, "InstallationID": "30000096724", "PhysicalInstallationID": "20001795127", "Kind": 1, "PickupDt": "2018-07-27T00:00:00", "LabelPrintDt": "2018-07-27T08:42:11", "SubmitDt": "2018-07-27T08:42:11", "DimensionalWeight": 5000, "Weight": 5000, "ActorCSID": 1378, "CarriagePayer": 1, "CarrierConceptID": 9, "CarrierCSID": 140, "SubcarrierConceptID": 100, "SubcarrierCSID": 248, "ProdConceptID": 3563, "ProdCSID": 2427, "StackCSID": 20302, "PickupTerminal": "0502", "PayerAccountAtCarrier": "000001000", "SenderAccountAtCarrier": "000001000", "Addresses": [ { "Kind": 1, "Name1": "John Doe", "Name2": "John Doe", "Street1": "Test address 1", "Street2": "Test address 2", "PostCode": "0580", "City": "OSLO", "Mobile": "12345678", "Email": "test@mail.com", "CountryCode": "NO" }, { "Kind": 11, "Name1": "PostNord Danmark", "Street1": "Stakkesvang 15, Taulov", "PostCode": "7000", "City": "Fredericia", "CustNo": "0502", "CountryCode": "DK", "ERPRef": "0502" }, { "Kind": 2, "Name1": "nshift", "Street1": "Bredskifte Alle 11", "PostCode": "8210", "City": "AARHUS V", "CountryCode": "DK" } ], "References": [ { "Kind": 98, "Value": "$AUTO$$FNC1$4215780580$FNC1$9011000000100018" }, { "Kind": 56, "Value": "Parcel" }, { "Kind": 76, "Value": "18" } ], "CSEvents": [ { "Kind": 4, "Date": "2018-07-27T08:42:11", "User": "SS\/1378\/SubmitShipment" } ], "Lines": [ { "LineCSID": 25261506, "LineWeight": 5000, "PkgWeight": 5000, "Pkgs": [ { "PkgCSID": 26072726, "ItemNo": 1, "PkgNo": "00370726202993001056", "CSEvents": [ { "Kind": 8, "Date": "2018-07-27T08:42:11", "User": "wsuser" } ] } ], "References": [ { "Kind": 52, "Value": "PNLU15" } ] } ] }
Shipment not found:
{ "ErrorMessages": [ "Cannot find given Shipment ID" ] }
Shipment deleted:
{ "ErrorMessages": [ "The requested shipment has been deleted" ] }
GetShipmentAlternatives
Parameters:
Name |
Type |
Mandatory |
Shipment object |
Shipment object |
Yes |
Equivalence in nShift On-premises:
Production View --> Submit
Request example:
[see shipment used at SubmitShipment]
Expected output:
Successful request:
{ "Fields": [ { "DisplayName": "ID", "FieldName": "Id" }, { "DisplayName": "Book latest", "FieldName": "BookLatestDateTime" }, { "DisplayName": "Earliest delivery", "FieldName": "EarliestDeliveryDateTime" }, { "DisplayName": "Latest delivery", "FieldName": "LatestDeliveryDateTime" }, { "DisplayName": "Price", "FieldName": "PriceExludingVat" }, { "DisplayName": "Extraservice", "FieldName": "VIP" } ], "TransportAlternatives": [ { "Id": "181516009", "BookLatestDateTime": "2016-09-28 09:00", "EarliestDeliveryDateTime": "N\/A", "LatestDeliveryDateTime": "2016-09-28 18:09", "PriceExludingVat": "6306.15", "VIP": "VIP delivery" }, { "Id": "181516010", "BookLatestDateTime": "2016-09-28 09:00", "EarliestDeliveryDateTime": "N\/A", "LatestDeliveryDateTime": "2016-09-28 18:09", "PriceExludingVat": "6306.15", "VIP": "VIP delivery" }, { "Id": "181516011", "BookLatestDateTime": "2016-09-28 10:35", "EarliestDeliveryDateTime": "N\/A", "LatestDeliveryDateTime": "2016-09-28 18:34", "PriceExludingVat": "5773.15", "VIP": "No VIP" }, { "Id": "181516012", "BookLatestDateTime": "2016-09-28 09:00", "EarliestDeliveryDateTime": "N\/A", "LatestDeliveryDateTime": "2016-09-28 18:39", "PriceExludingVat": "5773.15", "VIP": "No VIP" }, { "Id": "181516013", "BookLatestDateTime": "2016-09-28 09:00", "EarliestDeliveryDateTime": "N\/A", "LatestDeliveryDateTime": "2016-09-28 18:39", "PriceExludingVat": "5773.15", "VIP": "No VIP" }, { "Id": "181516014", "BookLatestDateTime": "2016-09-28 09:00", "EarliestDeliveryDateTime": "N\/A", "LatestDeliveryDateTime": "2016-09-28 20:05", "PriceExludingVat": "6451.15", "VIP": "VIP delivery" } ] }
GetShipmentPrice
Calculates price based on the shipment if price calculation is activated on product.
Parameters:
Name |
Type |
Mandatory |
Shipment object |
Shipment object |
Yes |
Equivalence in nShift On-premises:
Production --> Price1 --> […] button
Request example:
{ "Kind": 1, "PickupDt": "2016-10-18T00:00:00", "DimensionalWeight": 900, "Weight": 900, "ActorCSID": 4621, "CarriagePayer": 1, "ProdConceptID": 2, "StackCSID": "10416", "PayerAccountAtCarrier": "00001234567", "SenderAccountAtCarrier": "00001234567", "SenderAccountAtBank": "12346789", "Addresses": [ { "Kind": 11 }, { "Kind": 1, "Name1": "Tech A\/S", "Street1": "Krokstaddalen 12", "PostCode": "5863", "City": "BERGEN", "CustNo": "1183", "ContactCSID": 622150, "CountryCode": "NO" }, { "Kind": 14 }, { "Kind": 4, "CountryCode": "NO" }, { "Kind": 3, "CountryCode": "NO" }, { "Kind": 9, "CountryCode": "NO" }, { "Kind": 2, "Name1": "Teknikk AS", "Street1": "Ryensvingen 26", "PostCode": "0680", "City": "Oslo", "CountryCode": "NO" } ], "Lines": [ { "LineWeight": 900, "PkgWeight": 900, "Number": 1 } ] }
Expected output:
Successful request:
{ "ListPrice": 0, "Price1": 118, "Price2": 76, "Currency": 1, "StatusCode": 0, "Response": "PGh[...]" }
Validation failure:
{ "ErrorMessages": [ "Shipment validation failed", "Shipment weight should be more than 0 (Unknown \u2013 Weight(g))" ] }
GetShippingRulesPostCodeFiles
Parameters:
None
Equivalence in nShift On-premises:
Setup --> Shipping rules --> see the list of postcode validation files
Request example:
Data:
{}
Context:
{ "CarrierConceptID": 5, "SubcarrierConceptID": 10, "ProdConceptID": 60 }
Expected output:
Successful request:
{ "data": [ "PostDK.txt", "Sweden.txt" ] }
GetStacks
A stack is a placeholder for shipments ready for transmitting EDI to the carrier. When shipments are submitted they are placed in a stack at sub carrier level. The method returns data on all stacks along with the carrier data which the stack belongs to. A stack contains StackCSID that is the identifier ID for the stack, this ID is used to get all the shipments that is in a stack (see GetstackShipments method), stack name and stack count (how many shipments that exist in the stack).
Parameters:
None
Equivalence in nShift On-premises:
Outbox
Request example:
{}
Expected output:
Successful request:
{ "Carriers": [ { "CarrierCSID": "216", "CarrierConceptID": "221", "CarrierShortName": "DHL", "CarrierFullName": "DHL Express", "Subcarriers": [ { "SubcarrierCSID": "431", "SubcarrierConceptID": "434", "SubcarrierName": "DHL Express", "Stacks": [ { "StackCSID": "14014", "StackName": "Stack 1", "StackCount": "0",
"SupportsLeadGroups": "0",
"SupportsBreakBulk": "0" } ] } ] } ] }
GetStackShipments
The method returns all the shipments within a stack on the given StackCSID.
Parameters:
Name |
Type |
Mandatory |
StackCSID |
ID |
Alternate |
SubcarrierCSID |
ID |
Alternate |
CarrierCSID |
ID |
Alternate |
SubcarrierConceptID |
ID |
Alternate |
CarrierConceptID |
ID |
Alternate |
StartIndex |
Integer |
No |
Count |
Integer |
No |
SortField |
String |
No |
SortDirection |
0 or 1 |
No |
Only one parameter between (StackCSID, SubcarrierCSID, CarrierCSID, SubcarrierConceptID, CarrierConceptID) needed.
Equivalence in nShift On-premises:
Outbox --> Click on stack
Request example:
{ "SubcarrierConceptID": 60 }
Expected output:
Successful request:
{ "Shipments": [ { "ShpCSID": 25236, "ShpESID": 2001114162, "Addresses": [ { "Name1": "rectest2", "Street1": "test2", "PostCode": "1111", "City": "K\u00d8BENHAVN K", "Country": "Denmark" } ], "SubmitDt": "2014-11-20T16:51:40", "ProdConceptID": 109, "ProdName": "Stykgods", "ShpNo": "DK350716" }, { "ShpCSID": 25237, "ShpESID": 2001114163, "Addresses": [ { "Name1": "rectest2", "Street1": "test2", "PostCode": "1111", "City": "K\u00d8BENHAVN K", "Country": "Denmark" } ], "SubmitDt": "2014-11-20T16:52:59", "ProdConceptID": 109, "ProdName": "Stykgods", "ShpNo": "DK350717" } ] }
GetTimeSlots
Return available timeslots for a product.
Parameters:
Name |
Type |
Mandatory |
Shipment |
Shipment object |
Yes |
Options
Name |
Type |
Mandatory |
Token |
string |
Not if ProdConceptI is in Data |
EarliestPickup |
ISO date |
Mandatory if LatestPickup is specified. What values that are valid can differ between carriers. For some carriers EarliestPickup can be mandatory regardless. |
LatestPickup |
ISO date |
Mandatory if EarliestPickup is specified. What values that are valid can differ between carriers. For some carriers LatestPickup can be mandatory regardless. |
Token |
Token from GetShipAdvise |
Mandatory if product is not specified in Data |
Request example, options:
{ "EarliestPickup": "2020-08-13T06:00", "LatestPickup": "2020-08-13T21:00", "Token": "_-1_0_4784_5799_4784_5799_0_0__0__12/30/1899_12/30/1899___" }
GetTrackingURL
Returns the tracking URL (s) for the requested shipment on both shipment and package level.
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Shipment Viewer --> Click on “Shipment Number” or “Parcel Number” links
Request example:
{ "ShpCSID": "7766026" }
Expected output:
Successful request:
{ "Pkgs": [ { "PkgNo": "050210072267", "TrackingURL": "http:\/\/www.gls-group.eu\/276-I-PORTAL-WEB\/content\/GLS\/DK01\/DA\/5004.htm?txtRefNo=050210072267&txtAction=71000" } ] }
Shipment not found:
{ "ErrorMessages": [ "Cannot find given shipment ID" ] }
GetWaybill
Parameters:
Name |
Type |
Mandatory |
CountryCode |
String |
Yes |
BatchCSID |
ID |
Yes |
Additionally, some parameters are based on the type of waybill:
waybill_pnldk_pnl (Bring SE):
Name |
Type |
Mandatory |
CustNo |
String |
No |
EDIShp |
String |
No |
Sender |
String |
No |
Receiver |
String |
No |
Terminal |
String |
No |
AnnexedDocs |
String |
No |
EURPallet |
String |
No |
OtherPallets |
String |
No |
OtherLoadCarrier |
String |
No |
GrossWeight |
String |
No |
NetWeight |
String |
No |
VATAgent |
String |
No |
VATReceiver |
String |
No |
Invoice |
String |
No |
EURCertificate |
String |
No |
ExportNotification |
String |
No |
ProdUnits1 |
String |
No |
ProdWeight1 |
String |
No |
ProdUnits2 |
String |
No |
ProdWeight2 |
String |
No |
ProdUnits3 |
String |
No |
ProdWeight3 |
String |
No |
ProdUnits4 |
String |
No |
ProdWeight4 |
String |
No |
ProdUnits5 |
String |
No |
ProdWeight5 |
String |
No |
ProdUnits6 |
String |
No |
ProdWeight6 |
String |
No |
ProdUnits7 |
String |
No |
ProdWeight7 |
String |
No |
ProdUnits8 |
String |
No |
ProdWeight8 |
String |
No |
ProdUnits9 |
String |
No |
ProdWeight9 |
String |
No |
ProdUnits10 |
String |
No |
ProdWeight10 |
String |
No |
ParcelDescriptionWeight1 |
String |
No |
ParcelDescriptionUnits1 |
String |
No |
ParcelDescriptionWeight2 |
String |
No |
ParcelDescriptionUnits2 |
String |
No |
ParcelDescriptionWeight3 |
String |
No |
ParcelDescriptionUnits3 |
String |
No |
ParcelDescriptionWeight4 |
String |
No |
ParcelDescriptionUnits4 |
String |
No |
ParcelDescriptionWeight5 |
String |
No |
ParcelDescriptionUnits5 |
String |
No |
PalletDescriptionWeight1 |
String |
No |
PalletDescriptionUnits1 |
String |
No |
PalletDescriptionWeight2 |
String |
No |
PalletDescriptionUnits2 |
String |
No |
PalletDescriptionWeight3 |
String |
No |
PalletDescriptionUnits3 |
String |
No |
PalletDescriptionWeight4 |
String |
No |
PalletDescriptionUnits4 |
String |
No |
PalletDescriptionWeight5 |
String |
No |
PalletDescriptionUnits5 |
String |
No |
Place |
String |
No |
Date |
String |
No |
waybill_postdk_udland_v2 (PostDenmark):
Name |
Type |
Mandatory |
Sender |
String |
No |
CustNo |
String |
No |
DestinationCountryTerminal |
String |
No |
AgentNorge |
String |
No |
AgentReceiver |
String |
No |
DestinationCountry |
String |
No |
BookingNo |
String |
No |
CustomsRefNo |
String |
No |
ExportNotification |
String |
No |
EURCertificate |
String |
No |
Invoice |
String |
No |
AnnexedDocuments |
String |
No |
ContentsPallet |
String |
No |
HalfPallet |
String |
No |
QuarterPallet |
String |
No |
Oversize |
String |
No |
Other |
String |
No |
SendersPlace |
String |
No |
Date |
String |
No |
PackageIDPallet |
String |
No |
BusinessBulksplit.ColliNo |
String |
No |
BusinessBulksplit.TotalNetWeight |
String |
No |
BusinessBulksplit.AddedServices.0.Type |
String |
No |
BusinessBulksplit.AddedServices.0.ColliNo |
String |
No |
BusinessBulksplit.AddedServices.1.Type |
String |
No |
BusinessBulksplit.AddedServices.1.ColliNo |
String |
No |
BusinessBulksplit.AddedServices.2.Type |
String |
No |
BusinessBulksplit.AddedServices.2.ColliNo |
String |
No |
BusinessBulksplit.AddedServices.3.Type |
String |
No |
BusinessBulksplit.AddedServices.3.ColliNo |
String |
No |
MyPackBulksplit.ColliNo |
String |
No |
MyPackBulksplit.TotalNetWeight |
String |
No |
MyPackBulksplit.AddedServices.0.Type |
String |
No |
MyPackBulksplit.AddedServices.0.ColliNo |
String |
No |
MyPackBulksplit.AddedService.s1.Type |
String |
No |
MyPackBulksplit.AddedServices.1.ColliNo |
String |
No |
MyPackBulksplit.AddedServices.2.Type |
String |
No |
MyPackBulksplit.AddedServices.2.ColliNo |
String |
No |
MyPackBulksplit.AddedServices.3.Type |
String |
No |
MyPackBulksplit.AddedServices.3.ColliNo |
String |
No |
Pallet.ColliNo |
String |
No |
Pallet.TotalNetWeight |
String |
No |
Pallet.AddedServices.0.Type |
String |
No |
Pallet.AddedServices.0.ColliNo |
String |
No |
Pallet.AddedServices.1.Type |
String |
No |
Pallet.AddedServices.1.ColliNo |
String |
No |
Pallet.AddedServices.2.Type |
String |
No |
Pallet.AddedServices.2.ColliNo |
String |
No |
Pallet.AddedServices.3.Type |
String |
No |
Pallet.AddedServices.3.ColliNo |
String |
No |
waybill_postdk_breve_varebrev and waybill_postdk_udland_ems (PostDenmark):
Name |
Type |
Mandatory |
SenderName |
String |
No |
SenderAddress |
String |
No |
SenderPostNo |
String |
No |
SenderCity |
String |
No |
SenderPhone |
String |
No |
Reference |
String |
No |
Bemaerkninger |
String |
No |
AntalSaekke |
String |
No |
AntalPostcontainere |
String |
No |
Equivalence in nShift On-premises:
Outbox --> Right click on a subcarrier --> New
Request example:
{ "BookingNo": "255664", "CustomsRefNo": "Norway", "ContentsPallet": "", "HalfPallet": "1", "QuarterPallet": "", "Oversize": "", "Other": "", "SendersPlace": "Hiller\u00f8d", "Date": "17.10.2016", "Sender": "Test ApS, Frydenborgvej 32, 3400 Hiller\u00f8d, Denmark", "CustNo": "10432061", "DestinationCountryTerminal": "Norway, POSTNORD", "AgentNorge": "", "AgentReceiver": "Test, 0484 Oslo, Norway", "DestinationCountry": "Norway", "BusinessBulksplit.ColliNo": "", "BusinessBulksplit.TotalNetWeight": "", "BusinessBulksplit.AddedServices.0.Type": "", "BusinessBulksplit.AddedServices.0.ColliNo": "", "BusinessBulksplit.AddedServices.1.Type": "", "BusinessBulksplit.AddedServices.1.ColliNo": "", "BusinessBulksplit.AddedServices.2.Type": "", "BusinessBulksplit.AddedServices.2.ColliNo": "", "BusinessBulksplit.AddedServices.3.Type": "", "BusinessBulksplit.AddedServices.3.ColliNo": "", "MyPackBulksplit.ColliNo": "29", "MyPackBulksplit.TotalNetWeight": "13", "MyPackBulksplit.AddedServices.0.Type": "", "MyPackBulksplit.AddedServices.0.ColliNo": "", "MyPackBulksplit.AddedService.s1.Type": "", "MyPackBulksplit.AddedServices.1.ColliNo": "", "MyPackBulksplit.AddedServices.2.Type": "", "MyPackBulksplit.AddedServices.2.ColliNo": "", "MyPackBulksplit.AddedServices.3.Type": "", "MyPackBulksplit.AddedServices.3.ColliNo": "", "Pallet.ColliNo": "", "Pallet.TotalNetWeight": "", "Pallet.AddedServices.0.Type": "", "Pallet.AddedServices.0.ColliNo": "", "Pallet.AddedServices.1.Type": "", "Pallet.AddedServices.1.ColliNo": "", "Pallet.AddedServices.2.Type": "", "Pallet.AddedServices.2.ColliNo": "", "Pallet.AddedServices.3.Type": "", "Pallet.AddedServices.3.ColliNo": "", "PackageIDPallet": "", "BatchCSID": 4948000, "CountryCode": "NO" }
Expected output:
Successful request:
{ "Documents": [ { "DocumentName": "waybill_pnldk_pnl", "FileCSID": 4552786, "Content": "JVBE\u2026" } ] }
GetWaybillDefaults
Parameters:
Name |
Type |
Mandatory |
BatchID |
ID |
Yes |
Equivalence in nShift On-premises:
None
Request example:
{ "BatchCSID": 35 }
Expected output:
Successful request:
{ "Date": "13.10.2016", "GrossWeight": "0", "ProdUnits7": "5" }
ImportUpload
This method allow you to upload a file
- txt, csv, edi or custom
- xml is also supported, but a (XSLT version 1) stylesheet is required in order to translate the file into a CSV file.
before it can be processed.
Request Example
curl --location --request POST "http://demo.shipmentserver.com/ship/ShipmentServerModule.dll"
--form "actor="89""
--form "key="sample""
--form "command="ImportUpload""
--form "options="{}""
--form "data="{
\"filename\":\"test.csv\",
\"filecontent\":\"U0UuQ2FycmllckNvZGU7VGVzdCBvcmRlcjE7O25hbWUgMTtyb2FkIDE7MjIyMjI7THVuZDtTRTsxMjM0MTIzNDsxMjM0MTIzNDtub3JlcGx5QG5zaGlmdC5jb207OzE7MTsxMDA7MTAwOzEwMDs7OztEaXNhYmxlQ1NS\"
}""
{
"filename": "test.csv",
"filecontent": "U0UuQ2FycmllckNvZGU7VGVzdCBvcmRlcjE7O25hbWUgMTtyb2FkIDE7MjIyMjI7THVuZDtTRTsxMjM0MTIzNDsxMjM0MTIzNDtub3JlcGx5QG5zaGlmdC5jb207OzE7MTsxMDA7MTAwOzEwMDs7OztEaXNhYmxlQ1NS"
}
Request body
The request body takes a multipart/form-data or application/x-www-form-urlencoded object with the following keys:
actor, key, command, data, options
{
"actor": "INT",
"key": "STRING",
"command": "STRING",
"data": {
"filename": "STRING",
"filecontent": "BASE64 ENCODED STRING"
},
"options": {
"Labels": "STRING",
"ImportOnLocation": "INT (0/1)",
"TicketUserName": "STRING",
"WorkstationID": "UUID"
}
}
Data
- filename - name and extention of the file
- filecontent - the content of the file to be uploaded, encoded in base64
Options
- Labels - the label type to generate, more information here
ZPL, ZPLGK, EPL, PNG, PDF, DATAMAXLP2, DATAMAXDPL, none
- - ImportOnLocation - target the Setup Item - Import Setup on Actor (0) or Location (1)
- TicketUserName - login name used in the DropZone client
- WorkstationID - uuid of the installed DropZone client
MoveContacts
Parameters:
Name |
Type |
Mandatory |
ContactListCSID |
ID |
Yes |
ContactCSID |
Array of IDs |
Yes |
Equivalence in nShift On-premises:
Outbox --> Right click on a subcarrier --> New
Request example:
{ "ContactListCSID": 2810, "ContactCSID": [ "5132373" ] }
Expected output:
Successful request:
{ "Messages": [ "Contacts moved to new ContactList" ] }
MoveShipments
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
Array of IDs |
Yes |
StackCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox --> Select --> Drag and drop to another stack
Request example:
{ "StackCSID": 26692, "ShpCSID": [ 11051767 ] }
Expected output:
Successful request:
{ "ErrorMessages": [ "Shipments moved to new Stack" ] }
NewLine
Creates new line on an already existing shipment.
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Yes |
+ the line fields as in the Shipment object
Equivalence in nShift On-premises:
No equivalent in COP GUI; update shipment in Import
Request example:
{ "ShpCSID": 74493, "LineWeight": 5000, "PkgWeight": 5000, "LineVol": 1000000, "PkgVol": 1000000, "Loadmeter": 20, "GoodsTypeID": 1, "GoodsTypeName": "Paket", "RecycleTypeID": 1, "RecycleTypeName": "EUR", "RecycleTypeCode": "EUR", "GoodsTypeKey1": "PC", "GoodsTypeKey2": "PKT", "Pkgs": [ { "ItemNo": 1 } ] }
Expected output:
Successful request:
{ "LineCSID": 94559, "LineWeight": 5000, "PkgWeight": 5000, "LineVol": 1000000, "PkgVol": 1000000, "Loadmeter": 20, "GoodsTypeID": 1, "GoodsTypeName": "Paket", "RecycleTypeID": 1, "RecycleTypeName": "EUR", "RecycleTypeCode": "EUR", "GoodsTypeKey1": "PC", "GoodsTypeKey2": "PKT", "Pkgs": [ { "PkgCSID": 122027, "ItemNo": 1 } ], "Labels": [ { "Content": "iVBORw0KGgoAAA\u2026" } ] }
PreAdviseOrder
Creates a new shipment using Shipping Rules and ETA web service. It will select a product based on the shipment data and required delivery date. To use this function, you must have a CSR setup for the actor, and if you use Required delivery date, you should also have configured ETA. The flow is like this.
- CSR validates all products in a given service level.
- A call to ETA web service with all valid products from the previous step together with the required delivery date.
- ETA web service returns the delivery date and production cut-off time for all products that can deliver within the date specified.
- If more than one product can deliver, the allocation rule in Shipping Rules will decide which one to use.
- If no products can deliver, products close to the requested date will be selected
Parameters:
Name |
Type |
Mandatory |
shipment |
Shipment data (refers to the content in data below) |
Yes |
Options:
Name |
Type |
Mandatory |
ServiceLevel |
String |
Yes |
ValidatePostCode |
1 or 0 |
No, default is 1 – validates post code format for country |
RequiredDeliveryDate |
Datetime |
No |
Submit |
1 or 0 |
No, default is 0 |
Visibility |
String |
No, set to “extended” to get name of selected product and carrier in returned JSON |
If Submit is 1, shipment is submitted directly and expected output would be as for SubmitOrder – in this case, you also have to provide Options parameter required for SubmitOrder.
Equivalence in nShift On-premises:
No equivalent in COP GUI.
{ "Kind": 1, "OrderNo": "PMORD501-BIG-01", "DetailGroups": [ { "KindID": 1, "RowNo": 1, "GroupID": 1, "Value": "A", "DataType": 1, "GroupDisplayName": "A", "DisplayName": "A", "Listing": 1 } ], "Addresses": [ { "Kind": 2, "Name1": "test", "Street1": "test1", "PostCode": "1405", "City": "Langhus", "CountryCode": "NO" }, { "Kind": 1, "Name1": "Test", "Street1": "Radhusgata", "Street2": "", "PostCode": "0580", "City": "Oslo", "CountryCode": "NO" } ], "Lines": [ { "PkgWeight": 5000, "Pkgs": [ { "ItemNo": 1 } ] } ] }
Options:
{ "ServiceLevel": "Standard", "RequiredDeliveryDate": "2018-08-10", "ValidatePostCode": 0,
"Visibility": "extended" }
Expected output:
Successful request:
{ "Shipment": { "ShpCSID": 3689, "InstallationID": "30000065620", "Kind": 1, "OrderNo": "RET_PMORD501-BIG-01", "PickupDt": "2018-07-24T01:00:00", "ImportDt": "2018-07-24T15:51:45", "DimensionalWeight": 5000, "Weight": 5000, "ActorCSID": 63, "CarriagePayer": 1, "CarrierConceptID": 142, "CarrierCSID": 132, "SubcarrierConceptID": 211, "SubcarrierCSID": 301, "ProdConceptID": 1041, "ProdCSID": 1576, "StackCSID": 1, "PayerAccountAtCarrier": "12345678900", "SenderAccountAtCarrier": "12345678900", "CarrierShortName": "Bring", "CarrierFullName": "Bring", "ProdName": "Kliman\u00f8ytralservicepakke", "Addresses": [ { "Kind": 1, "Name1": "Test", "Street1": "Radhusgata", "PostCode": "0580", "City": "Oslo", "CountryCode": "NO" }, { "Kind": 14, "CountryCode": "NO" }, { "Kind": 4, "CountryCode": "NO" }, { "Kind": 11 }, { "Kind": 3, "CountryCode": "NO" }, { "Kind": 9, "CountryCode": "NO" }, { "Kind": 2, "Name1": "test", "Street1": "test1", "PostCode": "1405", "City": "Langhus", "CountryCode": "NO" } ], "Amounts": [ ], "References": [ { "Kind": 307, "Value": "1" }, { "Kind": 281, "Value": "Standard" }, { "Kind": 296, "Value": "2018-08-06T23:59:00" }, { "Kind": 293, "Value": "2018-08-10T23:59:00" }, { "Kind": 308, "Value": "2018-08-10T23:59:59" } ], "Lines": [ { "LineCSID": 3942, "LineWeight": 5000, "PkgWeight": 5000, "GoodsTypeID": 1, "GoodsTypeName": "Packages", "GoodsTypeKey1": "PK", "Pkgs": [ { "PkgCSID": 4092, "ItemNo": 1 } ] } ] }, "Status": "0-Success", "PerformanceLog": ";Import=0;DefaultHandler=15;PostCodeValidation=0;FindDeliveryAndCutOffTime=172;ApplyResultOnShipment=0;Save=31;Serialize=0" }
PrintLabel
This method is used to print one label on a shipment found in Outbox.
Data:
Name | Type | Mandatory |
ShpCSID | ID | Yes |
LineReferenceID | 225 | Yes |
LineReferenceValue | String | Yes |
Options:
Name | Type | Mandatory |
Labels | String | No |
Possible values: ZPL, ZPLGK, EPL, PNG, PDF |
||
TicketUserName | String | No- only for cloud print |
WorkstationID | String (GUID) | No- only for cloud print |
PrintLabel | request example:
"Data": {
"ShpCSID": 1457,
"LineReferenceID": 225,
"LineReferenceValue": "Unique_ID"
}
"Options": { "Labels": "ZPLGK" }
Expected output:
Successful request, shipment with one line:
{
"Labels": [
{
"Content": "iVBORw0KGgoAAAANS....",
"Type": 10,
"Copies": 1
}
]
}
SubmitShipment | request example if using more than one line:
How the LineReference need to be contructed on the Lines Array
Note: The value need to be unique across all lines.
If the same value is exist on more than one line, only the first will be printed
"Lines": [
{
"Number": 1,
"PkgWeight": 3000,
"References": [
{ "Kind": 225, "Value": "OrderNo_Line_1" }
]
},{
"Number": 1,
"PkgWeight": 3000,
"References": [
{ "Kind": 225, "Value": "OrderNo_Line_2" }
]
}
]
Prototype
It returns a sample prototype shipment that includes all the properties in a shipment object.
Parameters:
None
Request example:
{}
Expected output:
Successful request:
{ "ShpCSID": 1, "ShpESID": 1, "ShpTag": "A", "InstallationID": "A", "Kind": 1, "ShpNo": "A", "OrderNo": "A", "PickupDt": "2012-05-25T09:33:40", "LabelPrintDt": "2012-05-25T09:33:40", "SubmitDt": "2012-05-25T09:33:40", "TransmitDt": "2012-05-25T09:33:40", "ImportDt": "2012-05-25T09:33:40", "ExpireDt": "2012-05-25T09:33:40", "DimensionalWeight": 1, "Vol": 1, "Weight": 1, "Height": 1, "Length": 1, "Width": 1, "ActorCSID": 1, "ComebackParentCSID": 1, "GroupParentCSID": 1, "BulksplitMainCSID": 1, "Temperature": 1, "CarriagePayer": 1, "CarrierConceptID": 1, "CarrierCSID": 1, "SubcarrierConceptID": 1, "SubcarrierCSID": 1, "ProdConceptID": 1, "ProdCSID": 1, "StackCSID": 1, "BatchCSID": 1, "BatchDt": "2012-05-25T09:33:40", "Barcode1": "A", "Barcode2": "A", "OriginPostcode": "A", "OriginTerminal": "A", "PickupTerminal": "A", "AgentNo": "A", "PayerAccountAtCarrier": "A", "SenderAccountAtCarrier": "A", "InsuranceGroup": 1, "ReturnPackaging": 1, "LabelsCount": 1, "FreightBillsCount": 1, "SearchKey": "A", "SenderAccountAtBank": "A", "Loadmeter": 1, "Operator": "A", "PrintBoxCSID": 1, "ServiceLevel": "A", "DetailGroups": [ { "KindID": 1, "RowNo": 1, "GroupID": 1, "Value": "A", "DataType": 1, "GroupDisplayName": "A", "DisplayName": "A", "Listing": 1 } ], "Addresses": [ { "Kind": 1, "Name1": "A", "Name2": "A", "Street1": "A", "Street2": "A", "PostCode": "A", "City": "A", "State": "A", "POBox": "A", "POPostCode": "A", "POCity": "A", "Phone": "A", "Mobile": "A", "Email": "A", "Attention": "A", "CustNo": "A", "ContactCSID": "A", "Fax": "A", "CountryCode": "A", "ERPRef": "A", "OpeningHours": "A", "ReceiverRef": "A", "Region": "A", "County": "A", "District": "A", "Province": "A" } ], "Amounts": [ { "Kind": 1, "CurrencyCode": "A", "Value": 1.1 } ], "Lines": [ { "LineTag": "A", "LineWeight": 1, "PkgWeight": 1, "Number": 1, "DimensionalWeight": 1, "Height": 1, "Length": 1, "Width": 1, "LineVol": 1, "PkgVol": 1, "Loadmeter": 1, "GoodsTypeID": 1, "GoodsTypeName": "A", "RecycleCount": 1, "RecycleTypeID": 1, "RecycleTypeName": "A", "RecycleTypeCode": "A", "GoodsTypeKey1": "A", "GoodsTypeKey2": "A", "References": [ { "Kind": 1, "Value": "A" } ], "LineUnits": [ { "Name": "A", "KindID": 1, "Count": 1.1, "Weight": 1, "Vol": 1 } ], "Pkgs": [ { "ItemNo": 1, "PkgTag": "A", "PkgNo": "A", "Barcode1": "A", "Barcode2": "A", "References": [ { "Kind": 1, "Value": "A" } ], "CSEvents": [ { "Kind": 1, "Date": "A", "User": "A" } ] } ] } ], "Services": [ 1 ], "References": [ { "Kind": 1, "Value": "A" } ], "Messages": [ { "Kind": 1, "Text": "A" } ], "DangerousGoods": [ { "Kind": 1, "UN": 1, "Name": "A", "ShortName": "A", "Description": "A", "Class": 1, "Classification": "A", "PackingGroup": 1, "IdentificationNo": "A", "Count": 1, "GrossWeight": 1, "NetWeight": 1, "ItemGrossWeight": 1, "ItemNetWeight": 1, "Vol": 1, "EMSNo": "A", "MfagNo": "A", "FlashPoint": "A", "StowingCategory": "A", "PageNo": "A", "Labels": "A", "PackingTypeName": "A", "PackingTypeKey": "A", "SpecialProvisions": "A", "LimitedQuantities": "A", "ExceptedQuantities": "A", "PackingInstructions": "A", "SpecialPackingProvision": "A", "MixedPackingProvision": "A", "PortTankBulkContInstructions": "A", "PortTankBulkContSpecialProvisions": "A", "ADRtankTankCode": "A", "ADRtankSpecialProvisions": "A", "Vehicle": "A", "TransportCategory": "A", "SpecialProvisionsPackages": "A", "SpecialProvisionsBulk": "A", "SpecialProvisionsHandling": "A", "SpecialProvisionsOperation": "A", "GoodsLineID": 1, "GoodsLineNo": 1, "MarinePollutant": 1, "SecondaryClasses": "A", "SubsidiaryRisk": "A", "LQCount": 1, "LQGrossWeight": 1 } ], "CSEvents": [ { "Kind": 1, "Date": "A", "User": "A" } ], "ShpConnections": [ { "Kind": 1, "ChildCSID": 1 } ] }
RenameStack
Parameters:
Name |
Type |
Mandatory |
StackCSID |
ID |
Yes |
StackName |
string |
Yes |
Equivalence in nShift On-premises:
Outbox --> Right click on a stack --> Rename
Request example:
{ "StackCSID": 60, "StackName": "Warehouse" }
Expected output:
Successful request:
{ "StackCSID": 41746 }
Duplicate stack name:
{ "ErrorMessages": [ "Stack name already exists" ] }
Stack name too long:
{ "ErrorMessages": [ "Stack name too long (maximum 50 characters)" ] }
Empty string stack name:
{ "ErrorMessages": [ "Missing parameter StackName" ] }
ReprintLabels
Reprints labels on the shipment with the label type requested. Use either ShpCSID to print all labels on a shipment or PkgCSID to print individual package labels.
NOTE: For some carriers that uses booking e.g UPS and FedEx, it is not possible to reprint a label if it was not requested when the shipment was created (SubmitShipment).
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Yes, but only if PkgCSID is not included. |
PkgCSID |
ID |
Yes, but only if ShpCSID is not included. |
CompletionShpCSID |
ID |
No |
Options:
Name |
Type |
Mandatory |
Labels |
String |
Yes |
TicketUserName |
String |
No. Only used for Cloud Print |
WorkstationID |
String |
No. Only used for Cloud Print |
DropZoneLabelPrinterKey |
String |
No. Only used for Cloud Print |
DropZoneDocPrinterKey |
String |
No. Only used for Cloud Print |
Equivalence in nShift On-premises:
Outbox --> Double click on a shipment --> Print Freight Documents
Request example:
Data:
{ "ShpCSID": 60 }
Expected output:
Successful request:
{ "Labels": [ { "Content": "iVBORw0KG", "Type": 10, "Copies": 1 } ] }
SaveContact
Name |
Type |
Mandatory |
ContactListCSID |
ID |
Yes |
Name1 |
String |
Yes |
CountryCode |
String |
Yes |
Name2 |
String |
No |
Street1 |
String |
No |
Street2 |
String |
No |
PostCode |
String |
No |
City |
String |
No |
Country |
String |
No |
State |
String |
No |
POBox |
String |
No |
POPostCode |
String |
No |
POCity |
String |
No |
Phone |
String |
No |
Mobile |
String |
No |
|
String |
No |
Attention |
String |
No |
CustNo or ERPRef |
String |
No |
Fax |
String |
No |
ReceiverRef |
String |
No |
OpeningHours |
String |
No |
Region |
String |
No |
County |
String |
No |
District |
String |
No |
Province |
String |
No |
Equivalence in nShift On-premises:
Contact Lists --> Right click on grid --> New contact
Request example:
{ "Name1": "nShift AB", "Street1": "Gr\u00f6nbrinksgatan 7", "PostCode": "11759", "City": "STOCKHOLM", "POPostCode": "11759", "POCity": "STOCKHOLM", "Phone": "08-50733370", "Email": "test@nshift.com", "Attention": "John Doe", "CountryCode": "SE" }
Expected output:
Successful request:
{ "ContactCSID": 41746 }
SaveContactList
Parameters:
Name |
Type |
Mandatory |
ContactListCSID |
ID |
No – if not given, a new contact list is created. |
ContactListName |
string |
Yes |
DefaultContactList |
0 or 1 |
Yes |
ContactListKinds |
Array of int |
Yes |
Equivalence in nShift On-premises:
Contact List --> right click on contact list --> Properties or New contact list
Request example:
{ "ContactListCSID": "5166", "ContactListName": "Receivers List", "DefaultContactList": 1, "ContactListKinds": [ 2 ] }
Expected output:
Successful request:
{ "ContactListCSID": 5166 }
No contact kinds given:
{ "ErrorMessages": [ "You must select at least one kind (ContactListKinds cannot be empty)." ] }
No contact kinds given:
{ "ErrorMessages": [ "No contact kinds given (ContactListKinds cannot be empty)." ] }
SaveSenderAddress
Parameters:
Name |
Type |
Mandatory |
Name1 |
String |
Yes |
CountryCode |
String |
Yes |
Name2 |
String |
No |
Street1 |
String |
No |
Street2 |
String |
No |
PostCode |
String |
No |
City |
String |
No |
Country |
String |
No |
State |
String |
No |
POBox |
String |
No |
POPostCode |
String |
No |
POCity |
String |
No |
Phone |
String |
No |
Mobile |
String |
No |
|
String |
No |
Attention |
String |
No |
CustNo or ERPRef |
String |
No |
Fax |
String |
No |
ReceiverRef |
String |
No |
OpeningHours |
String |
No |
Region |
String |
No |
County |
String |
No |
District |
String |
No |
Province |
String |
No |
Equivalence in nShift On-premises:
Production View --> Sender --> Save
Request example:
{ "Name1": "nShift AB", "Street1": "Gr\u00f6nbrinksgatan 7", "PostCode": "11759", "City": "STOCKHOLM", "POPostCode": "11759", "POCity": "STOCKHOLM", "Phone": "08-50733370", "Email": "test@nshift.com", "Attention": "John Doe", "CountryCode": "SE" }
Expected output:
Successful request:
{ "Messages": [ "Sender address saved." ] }
SaveSetupItems
Parameters:
Name |
Type |
Mandatory |
SenderAddress |
JSON object. See SaveSenderAddress for details |
No |
CarrierAccount |
string |
No |
CODAccounts |
Array of COD |
No |
AccountNumber |
string |
Yes |
CountryCode |
string |
Yes |
CurrencyCode |
string |
Yes |
AccountType |
string |
Yes |
AccountIBAN |
string |
Yes |
AccountBIC |
string |
Yes |
TimeZone |
string |
No |
DefaultCountry |
string |
No |
Context:
Name |
Type |
Mandatory |
CarrierConceptID or CarrierCSID |
ID |
Yes |
SubcarrierConceptID or SubcarrierCSID |
ID |
Yes |
ProdConceptID or ProdCSID |
ID |
Yes |
Equivalence in nShift On-premises:
Outbox --> Right click on a subcarrier --> New
Request example:
{ "SenderAddress": { "Kind": 2, "Name1": "nShift AB", "Street1": "Gr\u00f6nbrinksgatan 7", "PostCode": "11759", "City": "STOCKHOLM", "Phone": "08-50733370", "Email": "test@nshift.com", "Attention": "John Doe", "CountryCode": "SE" } }
Expected output:
Successful request:
{ "Messages": [ "Setup items saved." ] }
SaveShipment
This method is much like the SubmitShipment method except that is does not have any options and the shipments are saved to draft, inbox or autoprint. The SaveShipment method is useful if for example the shipment should be processed and submitted later. It is also possible to edit the shipment and save the changes again. In this case the flow would be: Get the shipment using the method GetShipment. Use the shipment object from the response as input to the SubmitShipment method to finalize the shipment and retrieve the labels to be printed.
Parameters:
Name |
Type |
Mandatory |
Shipment |
Shipment object |
Yes |
Options:
Name |
Type |
Mandatory |
Place |
String |
No |
Equivalence in nShift On-premises:
Production view --> Save shipment
Request example:
Data:
{ "Kind": 1, "DimensionalWeight": 4000, "ActorCSID": 63, "CarriagePayer": 1, "ProdConceptID": 60, "StackCSID": 184, "PayerAccountAtCarrier": "5695226", "SenderAccountAtCarrier": "5695226", "Addresses": [ { "Kind": 1, "Name1": "Sorin", "Street1": "A1", "PostCode": "0580", "City": "OSLO", "CustNo": "5", "CountryCode": "NO", "ERPRef": "5" }, { "Kind": 10, "Name1": "KIWI 380 \u00d8KERN", "Street1": "\u00d8KERNV 145", "PostCode": "0580", "City": "OSLO", "CustNo": "3425964", "CountryCode": "NO", "ERPRef": "3425964" }, { "Kind": 2, "Name1": "Sender for all", "Street1": "OSLO GATE", "PostCode": "0192", "City": "OSLO", "Email": "johndoe@nshift.com", "CountryCode": "NO" } ], "Amounts": [ { "Kind": 1, "CurrencyCode": 1, "Value": 75 }, { "Kind": 2, "CurrencyCode": 1, "Value": 75 } ], "References": [ { "Kind": 27, "Value": "PER" }, { "Kind": 9, "Value": "15.10.2012" }, { "Kind": 34, "Value": "4215780580" } ], "Lines": [ { "LineWeight": 4000, "PkgWeight": 4000, "GoodsTypeName": "Helpall", "GoodsTypeKey1": "PE", "Pkgs": [ { "ItemNo": 1 } ] } ] }
Options:
{ "Place": "Inbox" }
Expected output:
Successful request:
{ "ShpCSID": 64085, "InstallationID": "00000000018", "Kind": 1, "PickupDt": "2018-10-21T00:00:00", "DimensionalWeight": 4000, "Weight": 4000, "ActorCSID": 63, "CarriagePayer": 1, "CarrierConceptID": 5, "CarrierCSID": 7, "SubcarrierConceptID": 10, "SubcarrierCSID": 16, "ProdConceptID": 60, "ProdCSID": 113, "StackCSID": 184, "PickupTerminal": "\u00e5\u00e6\u00e2\u00e9\u00e8\u00ea\u00f8\u00f3\u00f2\u00f4", "AgentNo": "234q", "PayerAccountAtCarrier": "5695226", "SenderAccountAtCarrier": "5695226", "Addresses": [ { "Kind": 1, "Name1": "Sorin", "Street1": "A1", "PostCode": "0580", "City": "OSLO", "CustNo": "5", "CountryCode": "NO", "ERPRef": "5" }, { "Kind": 10, "Name1": "KIWI 380 \u00d8KERN", "Street1": "\u00d8KERNV 145", "PostCode": "0580", "City": "OSLO", "CustNo": "3425964", "CountryCode": "NO", "ERPRef": "3425964" }, { "Kind": 11, "CustNo": "\u00e5\u00e6\u00e2\u00e9\u00e8\u00ea\u00f8\u00f3\u00f2\u00f4", "ERPRef": "\u00e5\u00e6\u00e2\u00e9\u00e8\u00ea\u00f8\u00f3\u00f2\u00f4" }, { "Kind": 2, "Name1": "Sender for all", "Street1": "OSLO GATE", "PostCode": "0192", "City": "OSLO", "Email": "johndoe@nshift.com", "CountryCode": "NO" } ], "Amounts": [ { "Kind": 1, "CurrencyCode": 1, "Value": 75 }, { "Kind": 2, "CurrencyCode": 1, "Value": 75 } ], "References": [ { "Kind": 27, "Value": "PER" }, { "Kind": 9, "Value": "2018-10-15" }, { "Kind": 34, "Value": "4215780580" }, { "Kind": 140, "Value": "johndoe@nshift.com" } ], "Lines": [ { "LineWeight": 4000, "PkgWeight": 4000, "GoodsTypeID": 2, "GoodsTypeName": "Helpall", "GoodsTypeKey1": "PE", "Pkgs": [ { "ItemNo": 1 } ] } ] }
SaveShippingRules
Parameters:
Name |
Type |
Mandatory |
ShippingRules |
Base64 string |
Yes |
Equivalence in nShift On-premises:
Setup --> Select actor --> Right click --> List files --> ConsignorShippingRules.xml
Request example:
{ "ShippingRules": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxDU1I+DQogIDxQcm9kdWN0IG5hbWU9IlZhcmVicmV2IiBjb25jZXB0aWQ9IjE5NzMiIGNvbW1lbnQ9IkdCIiByYW5rPSIxMDAiPg0KICAgIDxWYWxpZGF0aW9uUnVsZXM+DQogICAgICA8VmFsaWRhdGlvblJ1bGUgbmFtZT0iZmxvYXRsaW1pdHMiIG1pbj0iMTAwIiBtYXg9IjEwMDAiIGZpZWxkPSJmbGRfTExlbmd0aCIvPg0KICAgIDwvVmFsaWRhdGlvblJ1bGVzPg0KICA8L1Byb2R1Y3Q+DQogIDxTZWxlY3RSdWxlcz4NCiAgICA8U2VsZWN0UnVsZSBuYW1lPSJjb3VudHJ5IiBhbGxvd2NvdW50cmllcz0iTk8iIGZpZWxkPSJmbGRfQWRyQ291bnRyeSI+DQogICAgICA8UHJvZHVjdCBjb25jZXB0aWQ9IjE3NDEiIG5hbWU9IlZhcmVicmV2IG1lZCBNeXBhY2siLz4NCiAgICA8L1NlbGVjdFJ1bGU+DQogIDwvU2VsZWN0UnVsZXM+DQogIDxTZXJ2aWNlTGV2ZWxzPg0KICAgIDxTZXJ2aWNlTGV2ZWwgbmFtZT0iU3RhbmRhcmQiPg0KICAgICAgPFByb2R1Y3RzPg0KICAgICAgICA8UHJvZHVjdCBuYW1lPSJCdWQiIGNvbmNlcHRpZD0iNzA2IiBjb21tZW50PSJHQiIgcmFuaz0iMTAwIj4NCiAgICAgICAgICA8VmFsaWRhdGlvblJ1bGVzPg0KICAgICAgICAgICAgPFZhbGlkYXRpb25SdWxlIG5hbWU9ImZsb2F0bGltaXRzIiBtaW49IjEwMCIgbWF4PSIxMDAwIiBmaWVsZD0iZmxkX0xMZW5ndGgiLz4NCiAgICAgICAgICA8L1ZhbGlkYXRpb25SdWxlcz4NCiAgICAgICAgPC9Qcm9kdWN0Pg0KICAgICAgICA8UHJvZHVjdCBuYW1lPSJQYWxsIiBjb25jZXB0aWQ9IjcwOCIgY29tbWVudD0iR0IiIHJhbms9IjUwIj4NCiAgICAgICAgICA8UG9zdGNvZGVWYWxpZGF0aW9ucz4NCiAgICAgICAgICAgIDxQb3N0Y29kZVZhbGlkYXRpb24gY291bnRyeT0iTk8iIGV4Y2x1ZGU9IjAiIHR5cGU9Ik5PIj4NCiAgICAgICAgICAgICAgPFJhbmdlIG1pbj0iMDU1NSIgbWF4PSIiLz4NCiAgICAgICAgICAgIDwvUG9zdGNvZGVWYWxpZGF0aW9uPg0KICAgICAgICAgIDwvUG9zdGNvZGVWYWxpZGF0aW9ucz4NCiAgICAgICAgICA8VmFsaWRhdGlvblJ1bGVzPg0KICAgICAgICAgICAgPFZhbGlkYXRpb25SdWxlIG5hbWU9ImNvdW50cnkiIGFsbG93Y291bnRyaWVzPSJOTyIgZmllbGQ9ImZsZF9BZHJDb3VudHJ5Ii8+DQogICAgICAgICAgPC9WYWxpZGF0aW9uUnVsZXM+DQogICAgICAgIDwvUHJvZHVjdD4NCgkJPFByb2R1Y3QgbmFtZT0iVmFyZSIgY29uY2VwdGlkPSI3MDkiIGNvbW1lbnQ9IkdCIiByYW5rPSIxMCI+DQogICAgICAgICAgPFZhbGlkYXRpb25SdWxlcz4NCiAgICAgICAgICAgIDxWYWxpZGF0aW9uUnVsZSBuYW1lPSJmbG9hdGxpbWl0cyIgbWluPSI1MCIgbWF4PSI5OSIgZmllbGQ9ImZsZF9MTGVuZ3RoIi8+DQogICAgICAgICAgPC9WYWxpZGF0aW9uUnVsZXM+DQogICAgICAgIDwvUHJvZHVjdD4NCgkJPFByb2R1Y3QgbmFtZT0iTGFzdGViaWwiIGNvbmNlcHRpZD0iNzEwIiBjb21tZW50PSJHQiIgcmFuaz0iNSI+DQogICAgICAgICAgPFZhbGlkYXRpb25SdWxlcz4NCiAgICAgICAgICAgIDxWYWxpZGF0aW9uUnVsZSBuYW1lPSJmbG9hdGxpbWl0cyIgbWluPSIxMCIgbWF4PSI0OSIgZmllbGQ9ImZsZF9MTGVuZ3RoIi8+DQogICAgICAgICAgPC9WYWxpZGF0aW9uUnVsZXM+DQogICAgICAgIDwvUHJvZHVjdD4NCiAgICAgIDwvUHJvZHVjdHM+DQogICAgICA8QWxsb2NhdGlvblJ1bGVzPg0KICAgICAgICA8QWxsb2NhdGlvblJ1bGUgdHlwZT0iaGlnaGVzdHJhbmsiLz4NCiAgICAgIDwvQWxsb2NhdGlvblJ1bGVzPg0KICAgIDwvU2VydmljZUxldmVsPg0KICAgIDxTZXJ2aWNlTGV2ZWwgbmFtZT0iRXhwcmVzcyIgPg0KICAgICAgPFByb2R1Y3RzPg0KICAgICAgICA8cHJvZHVjdCBOYW1lPSJFeHByZXNzIiBjb25jZXB0aWQ9IjcwNSIvPg0KICAgICAgICA8cHJvZHVjdCBOYW1lPSJEaXN0cmlidXNqb24iIGNvbmNlcHRpZD0iNzA3Ii8+DQogICAgICA8L1Byb2R1Y3RzPgkgIA0KICAgICAgPEFsbG9jYXRpb25SdWxlIHR5cGU9Im1pbmNvdW50Zm9ycHJvZHVjdCIgTmFtZT0iRXhwcmVzcyIgY29uY2VwdGlkPSI3MDUiIG1pbmNvdW50PSIzMCIgc2NvcGU9ImxvY2F0aW9uIi8+DQogICAgICA8QWxsb2NhdGlvblJ1bGUgdHlwZT0iZGlzdHJpYnV0aW9uIiBzY29wZT0ibG9jYXRpb24iPg0KICAgICAgICA8cHJvZHVjdCBOYW1lPSJFeHByZXNzIiBjb25jZXB0aWQ9IjI2OTgiICAgc2hhcmU9IjQwIi8+DQogICAgICAgIDxwcm9kdWN0IE5hbWU9IkRpc3RyaWJ1c2pvbiIgY29uY2VwdGlkPSIyNjM5IiAgIHNoYXJlPSI2MCIvPg0KICAgICAgPC9BbGxvY2F0aW9uUnVsZT4NCiAgICA8L1NlcnZpY2VMZXZlbD4NCiAgPC9TZXJ2aWNlTGV2ZWxzPg0KPC9DU1I+DQo=" }
Expected output:
Successful request:
{ "Message": "Shipping rules saved." }
SaveTransmitSchedule
Parameters:
Name |
Type |
Mandatory |
StackCSID |
ID |
Yes |
TransmitAtSubmit |
0 or 1 |
Yes |
ScheduledTransmits |
Array |
No |
Recurrent |
0 or 1 |
No |
WeekDays |
Array of string |
No |
TransmitTime |
String |
No |
TransmitDate |
String |
No |
PickupSchedule |
integer |
No |
ManualTransmit |
0 or 1 |
Yes |
Equivalence in nShift On-premises:
Outbox --> Right click on a stack --> Schedule time for transmit
Request example:
{ "StackCSID": 31808, "TransmitAtSubmit": 0, "ScheduledTransmits": [ { "Recurrent": 1, "WeekDays": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], "TransmitTime": "13:15:00", "PickupSchedule": 0 }, { "Recurrent": 1, "WeekDays": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], "TransmitTime": "14:20:00", "PickupSchedule": 0 }, { "Recurrent": 1, "WeekDays": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], "TransmitTime": "15:20:00", "PickupSchedule": 0 }, { "Recurrent": 1, "WeekDays": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], "TransmitTime": "16:25:00", "PickupSchedule": 0 }, { "Recurrent": 1, "WeekDays": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], "TransmitTime": "17:30:00", "PickupSchedule": 0 }, { "Recurrent": 1, "WeekDays": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], "TransmitTime": "18:10:00", "PickupSchedule": 0 } ], "ManualTransmit": 0 }
Alternative request instead of data:
{
"StackCSID": 24927,
"TransmitAtSubmit": 1
}
Expected output:
Successful request:
{ "Messages": [ "Schedules saved" ] }
StoreOrder
Store an order (shipment) in Order Databases for later use with nShift On-premises or Shipment Server.
Data: shipment JSON - does not need to be complete shipment
Options {"OrderID":"<order id>"}
Installation id for actor is used as ClientID when calling Order Database web service.
Parameters:
Data
Name |
Type |
Mandatory |
Shipment |
Shipment object |
Yes |
Data
Name |
Type |
Mandatory |
OrderID |
Client defined order id |
Yes |
Request example:
Options:
{
" OrderID": "123654789ABC14"
}
Read more about the StoreOrder feature in this article: Using StoreOrder to save orders for import.
SubmitOrder
Submits an existing order; optionally it also creates a return label; prints the labels on a certain workstation. Normally you would have called PreAdviseOrder and use shipment ShpCSID return from that call as input to here
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
int |
Mandatory. If OrderNo is included, ShpCSID can be filled in or contain 0. See request examples below. |
OrderNo |
string |
Mandatory if ShpCSID is set to 0. See request examples below. |
Updated shipment fields |
Shipment data (refers to the content in data below) |
Yes |
Options:
Name |
Type |
Mandatory |
ServiceLevel |
String |
No |
ReturnShipmentServiceLevel |
String |
No |
TicketUserName |
String |
No- only for cloud print |
WorkstationID |
String (GUID) |
No- only for cloud print |
UseCopy |
Int (0/1) |
No (default 0) |
ReturnShipmentFirst |
Int (0/1) |
No (default 0) |
Labels |
String |
Yes |
UseShippingRules |
Int (0/1) |
No - only used together with Shipping Rules |
Vibility |
String |
No, set to “extended” to get name of selected product and carrier in returned JSON |
If ServiceLevel is specified and different from PreAdviseOrder, all result from PreAdviseOrder will be ignored and CSR will run again without calling ETA Web Service.
If UseCopy=1, original shipment will stay in inbox.
WorkstationID is from DropZone, TicketUserName must be what you have logged on as in DropZone
Equivalence in nShift On-premises:
Open shipment in production view from Inbox, change values or not and then submit to cloud print or as base 64 encoded text.
Request examples:
{ "ShpCSID": 3689, "OrderNo": "PMORD501-BIG-01", "DetailGroups": [ { "KindID": 1, "RowNo": 1, "GroupID": 1, "Value": "A", "DataType": 1, "GroupDisplayName": "A", "DisplayName": "A", "Listing": 1 } ], "Addresses": [ { "Kind": 2, "Name1": "test", "Street1": "test1", "PostCode": "1405", "City": "Langhus", "CountryCode": "NO" }, { "Kind": 1, "Name1": "Test", "Name2": "", "Street1": "Radhusgata", "Street2": "", "PostCode": "0580", "City": "Oslo", "CountryCode": "NO" } ], "Lines": [ { "PkgWeight": 5000, "Pkgs": [ { "ItemNo": 1 } ] } ] }
Data examples with OrderNo and ShpCSID. ShpCSID is always mandatory but may be set to 0 if Ordernumber is present as in sample 2.
Sample 1
{
"Kind": 1,
"ShpCSID":70585
}
Or
Sample 2
{
"Kind": 1,
"OrderNo": "699797","ShpCSID":0
}
Options:
{ "ReturnShipmentServiceLevel": "Return SL", "ReturnShipmentFirst": 1, "Labels": "ZPLGK", "Visibility": "extended",
"UseShippingRules":1, "TicketUserName": "johndoe", "WorkstationID": "{3dbdeb1d-5056-4651-8699-f969114d8876}" }
Expected output:
Successful request:
{ "Status": 1, "Shipment": { "ShpCSID": 75512, "ShpESID": 2001128593, "InstallationID": "00000000018", "PhysicalInstallationID": "30000041126", "Kind": 1, "ShpNo": "40170716484085760047", "PickupDt": "2017-12-21T00:00:00", "LabelPrintDt": "2017-12-21T14:40:07", "SubmitDt": "2017-12-21T14:40:07", "DimensionalWeight": 1000, "Weight": 1000, "ActorCSID": 63, "CarriagePayer": 1, "CarrierConceptID": 8, "CarrierCSID": 10, "SubcarrierConceptID": 16, "SubcarrierCSID": 24, "ProdConceptID": 184, "ProdCSID": 139, "StackCSID": 5, "References": [ { "Kind": 281, "Value": "Express" }, { "Kind": 293, "Value": "2017-12-24" }, { "Kind": 296, "Value": "2017-12-21" } ], "Addresses": [ { "Kind": 1, "Name1": "John Smith", "PostCode": "0045", "City": "Oslo", "CountryCode": "NO" }, { "Kind": 4 }, { "Kind": 2, "Name1": "Sender Company", "PostCode": "0034", "City": "Oslo", "CountryCode": "NO" } ], "Amounts": [ ], "CSEvents": [ { "Kind": 4, "Date": "2017-12-21T14:40:07", "User": "SS\/63\/SubmitShipment" } ], "Lines": [ { "LineCSID": 95583, "LineWeight": 1000, "PkgWeight": 1000, "Pkgs": [ { "PkgCSID": 123054, "ItemNo": 1, "PkgNo": "00370716484085760055", "CSEvents": [ { "Kind": 8, "Date": "2017-12-21T14:40:07", "User": "nShift" } ] } ] } ], "Labels": [ { "Content": "iVBO[...]rkJggg==", "Type": 10, "Copies": 1 } ] }, "ReturnShipment": { "ShpCSID": 75512, "ShpESID": 2001128593, "InstallationID": "00000000018", "PhysicalInstallationID": "30000041126", "Kind": 1, "ShpNo": "40170716484085760047", "PickupDt": "2017-12-21T00:00:00", "LabelPrintDt": "2017-12-21T14:40:07", "SubmitDt": "2017-12-21T14:40:07", "DimensionalWeight": 1000, "Weight": 1000, "ActorCSID": 63, "CarriagePayer": 1, "CarrierConceptID": 8, "CarrierCSID": 10, "SubcarrierConceptID": 16, "SubcarrierCSID": 24, "ProdConceptID": 184, "ProdCSID": 139, "StackCSID": 5, "References": [ { "Kind": 281, "Value": "Express" }, { "Kind": 293, "Value": "2017-12-24" }, { "Kind": 296, "Value": "2017-12-21" } ], "Addresses": [ { "Kind": 1, "Name1": "John Smith", "PostCode": "0045", "City": "Oslo", "CountryCode": "NO" }, { "Kind": 4 }, { "Kind": 2, "Name1": "Sender Company", "PostCode": "0034", "City": "Oslo", "CountryCode": "NO" } ], "Amounts": [ ], "CSEvents": [ { "Kind": 4, "Date": "2017-12-21T14:40:07", "User": "SS\/63\/SubmitShipment" } ], "Lines": [ { "LineCSID": 95583, "LineWeight": 1000, "PkgWeight": 1000, "Pkgs": [ { "PkgCSID": 123054, "ItemNo": 1, "PkgNo": "00370716484085760055", "CSEvents": [ { "Kind": 8, "Date": "2017-12-21T14:40:07", "User": "nShift" } ] } ] } ], "Labels": [ { "Content": "iVBO[...]rkJggg==", "Type": 10, "Copies": 1 } ] } }
SubmitShipment
Submits shipment to server, returns created shipment along with labels if requested.
Data:
Name |
Type |
Mandatory |
Shipment |
Object |
Yes |
Shipment data (refers to the content in data below) |
Options:
Name |
Type |
Mandatory |
Labels |
String |
Yes |
Possible values: |
||
ShippingRulesAlternatives |
Int (0/1) |
No |
No - only used together with Shipping Rules. It will return the shipping options that Shipping Rules return. See example below. |
||
TicketUserName |
String |
No |
WorkstationID |
String |
No |
DropZoneLabelPrinterKey |
String |
No |
DropZoneDocPrinterKey |
String |
No |
used for Cloud Print. |
||
ServiceLevel |
String |
No |
UseLocalPrint |
Int (0/1) |
No |
UseShippingRules |
Int (0/1) |
No |
only used together with Shipping Rules. | ||
PriceCalculation |
Int (0/1) |
No |
used to get price back from Price Calculation setup. | ||
RerunCSROnError |
Int (0/1) | No |
Used to rerun CSR if the product specified in the token key is no longer valid |
||
Token |
String |
No |
Value from the method GetShipAdvise response which describes the product to create the shipment with |
||
ReturnShipment |
Int (0/1) |
No |
Creates a return shipment in addition to the other shipment. |
Labels
All label types are encoded as Base64.
- none will not return any label but creates the shipment.
- PNG labels in PNG format.
- PDF labels in PDF format.
- EPL labels in EPL format for printers that are supporting this e.g. LP2844, ZM400 and GK420D.
- ZPL labels in ZPL format but will have a margin of 30 on top of the label. This label type is optimized for LP2844-Z printers and may print too far down on the label for other printers, if this issue occurs try the ZPLGK type.
- ZPLGK is also in ZPL format but without the top margin. Supported by printers like GK420D, ZM400 and may also work with other printers that are supporting ZPL language.
- DATAMAXLP2 label for Datamax printer
Note: Unicode ( e.g. Cyrillic characters ) are only supported for PNG, PDF and ZPLGK label type.
DateTime
If you include DateTime in your request, please note that we support the ISO 8601 extended notations format, e.g. 2019-06-27T10:25:00.
We do not support the basic notations without hyphens, so e.g. 20190627 will not be accepted. Timezones will be removed from the request and milliseconds are ignored. If the carrier only requires date, it is fine to omit the time.
Request example:
"Data": { "Kind": 1, "DimensionalWeight": 4000, "ActorCSID": 63, "CarriagePayer": 1, "ProdConceptID": 60, "StackCSID": 184, "PayerAccountAtCarrier": "5695226", "SenderAccountAtCarrier": "5695226", "Addresses": [ { "Kind": 1, "Name1": "Sorin", "Street1": "A1", "PostCode": "0580", "City": "OSLO", "CountryCode": "NO" }, { "Kind": 2, "Name1": "Sender for all", "Street1": "OSLO GATE", "PostCode": "0192", "City": "OSLO", "Email": "noreply@nshift.com", "CountryCode": "NO" } ], "References": [ { "Kind": 27, "Value": "PER" } ], "Lines": [ {
"Number": 1, "PkgWeight": 4000, "GoodsTypeKey1": "PE" } ] }
"Options": { "Labels": "ZPLGK" }
Expected output:
Successful request:
{ "ShpCSID": 64079, "ShpESID": 2001123867, "InstallationID": "00000000018", "Kind": 1, "ShpNo": "40170716480962130163", "PickupDt": "2018-10-21T00:00:00", "LabelPrintDt": "2018-10-21T13:59:20", "SubmitDt": "2018-10-21T13:59:20", "DimensionalWeight": 4000, "Weight": 4000, "ActorCSID": 63, "CarriagePayer": 1, "CarrierConceptID": 5, "CarrierCSID": 7, "SubcarrierConceptID": 10, "SubcarrierCSID": 16, "ProdConceptID": 60, "ProdCSID": 113, "StackCSID": 184, "AgentNo": "234q", "PayerAccountAtCarrier": "5695226", "SenderAccountAtCarrier": "5695226", "Addresses": [ { "Kind": 1, "Name1": "Sorin", "Street1": "A1", "PostCode": "0580", "City": "OSLO", "CustNo": "5", "CountryCode": "NO", "ERPRef": "5" }, { "Kind": 2, "Name1": "Sender for all", "Street1": "OSLO GATE", "PostCode": "0192", "City": "OSLO", "Email": "johndoe@maildomain.com", "CountryCode": "NO" } ], "References": [ { "Kind": 27, "Value": "PER" } ], "Lines": [ { "LineWeight": 4000, "PkgWeight": 4000, "GoodsTypeID": 2, "GoodsTypeName": "Helpall", "GoodsTypeKey1": "PE", "Pkgs": [ { "ItemNo": 1, "PkgNo": "00370716480962130171", "CSEvents": [ { "Kind": 8, "Date": "2018-10-21T13:59:18", "User": "nshift" } ] } ], "References": [ { "Kind": 52, "Value": "PNLU15" } ] } ], "Labels": [ { "Content": "iVBORw0KGgoAAAA....", "Type": 10, "Copies": 1 } ] }
Expected output, example using "ShippingRulesAlternatives":"1"
{ "Products": [ { "ProdConceptID": 3201, "ProdCSID": 2284, "ProdName": "Best Transport - Best Hemleverans 18:00-22:00", "Price": "130", "CurrencyCode": "SEK", "Token": "_-1_0_1150_517_2284_3201_0_0__0__12\/30\/1899_12\/30\/1899___" }, { "ProdConceptID": 517, "ProdCSID": 1150, "ProdName": "DHL Sverige - DHL Paket", "Price": "56.3", "CurrencyCode": "SEK", "Token": "_-1_0_1150_517_1150_517_0_0__0__12\/30\/1899_12\/30\/1899___" }, { "ProdConceptID": 380, "ProdCSID": 1185, "ProdName": "PostNord SE - PostNord Parcel", "Price": "85", "CurrencyCode": "SEK", "Token": "_-1_0_1150_517_1185_380_0_0__0__12\/30\/1899_12\/30\/1899___" }, { "ProdConceptID": 408, "ProdCSID": 1148, "ProdName": "DHL Sverige - DHL Stycke", "Token": "_-1_0_1150_517_1148_408_0_0__0__12\/30\/1899_12\/30\/1899___" }, { "ProdConceptID": 296, "ProdCSID": 1259, "ProdName": "Schenker Sverige - Parcel Ombud", "Price": "99", "CurrencyCode": "SEK", "Token": "_-1_0_1150_517_1259_296_0_0__0__12\/30\/1899_12\/30\/1899___" } ], "Log": [ "Loading and merging 1 CSR files took 0ms", "Using ServiceLevel: Standard", "Validation OK for product: Best Transport - Best Hemleverans 18:00-22:00", "Validation OK for product: DHL Sverige - DHL Paket", "Validation OK for product: PostNord SE - PostNord Parcel", "Validation OK for product: DHL Sverige - DHL Stycke", "Validation OK for product: Schenker Sverige - Parcel Ombud" ], "Status": 8 }
TransmitShipments
This method will only transmit the specified shipment(s) within a stack. ShipmentCSIDs contain a comma delimited list of one or multiple ShpCSIDs, which identify the shipments that should be transmitted. The selection of shipments will be transmitted to carrier when the method is executed.
Parameters:
Name |
Type |
Mandatory |
ShipmentCSIDs |
Array of IDs |
Yes |
IsThisATest |
0 or 1 |
No |
Equivalence in nShift On-premises:
Outbox --> Right click on a subcarrier --> Right click --> Transmit selected shipments
Request example:
{ "ShipmentCSIDs": [ 5436, 5437 ] }
Expected output:
Successful request:
{ "Messages": [ "Job successful" ], "BatchCSID": 123 }
Successful request, timeout:
{ "Messages": [ "Transmit job started" ] }
TransmitStack
Transmits all the shipments within the given stack to the carrier.
Parameters:
Name |
Type |
Mandatory |
StackCSIDs |
ID |
Yes |
IsThisATest |
0 or 1 |
No |
Outbox --> Check a stack --> Click transmit checked button
Request example:
{ "StackCSID": 60 }
Expected output:
Successful request:
{ "Messages": [ "Job successful" ], "BatchCSID": 23003 }
Successful request, timeout:
{ "Messages": [ "Transmit job started" ] }
TryApplyShippingRules
Used to get the selected product or products without submitting. To get a list of products, allocation rule in Shipment Server must be of type "userselect".
Parameters:
Name |
Type |
Mandatory |
shipment |
Shipment object |
Yes |
Equivalence in nShiftOn-premises:
Print in PV with Shipping rules.
Request example:
See request for SumbitShipment
Expected output:
Successful request, if allocation rule is of type "userselect".
{ "Products": [ { "ProdConceptID": 1041, "ProdCSID": 170, "ProdName": "Bring - Kliman\u00f8ytral servicepakke" }, { "ProdConceptID": 1032, "ProdCSID": 160, "ProdName": "Bring -Bedriftspakke" } ], "Services": [ ], "Log": [ ], "Status": 8 }
Status 8 means "Success: list of valid products returned".
When a single product is selected:
{ "Products": [ ], "Services": [ ], "Log": [ ], "ProdCSID": 170, "Status": 11 }
Status 11 means "Sucess: list of valid products returned".
UpdateDetails
Updates details for a shipment. Existing Details on the shipment will be removed before adding the supplied Details.
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Yes |
DetailGroups |
JSON array |
Yes |
Equivalence in nShift On-premises:
None
Request example:
{ "ShpCSID": 17338, "DetailGroups": [ { "GroupID": 1, "GroupDisplayName": "Customs Article", "Rows": [ { "RowNo": 1, "LineNo": 1, "Details": [ { "KindID": 1, "Value": "Updated A for l1", "DisplayName": "Article No" }, { "KindID": 7, "Value": "Updated desc l1", "DisplayName": "Description of Goods" } ] }, { "RowNo": 2, "LineNo": 2, "Details": [ { "KindID": 1, "Value": "A for l2", "DisplayName": "Article No" }, { "KindID": 7, "Value": "desc l2", "DisplayName": "Description of Goods" } ] } ] }, { "GroupID": 2, "GroupDisplayName": "Customs Information", "Details": [ { "KindID": 11, "Value": "Updated VAT Sender", "DisplayName": "Vat No (Sender)" } ] } ] }
Expected output:
Complete shipment object, see under SubmitShipment.
UpdateLine
Parameters:
Name |
Type |
Mandatory |
ShpCSID |
ID |
Yes |
LineCSID |
ID |
Yes |
+ the line fields as in the Shipment object
Equivalence in nShift On-premises:
Outbox --> Double click shipment --> Edit Shipment
Request example:
{ "ShpCSID": 74493, "LineCSID": 94559, "LineWeight": 5000, "PkgWeight": 5000, "LineVol": 1000000, "PkgVol": 1000000, "Loadmeter": 20, "GoodsTypeID": 1, "GoodsTypeName": "Paket", "RecycleTypeID": 1, "RecycleTypeName": "EUR", "RecycleTypeCode": "EUR", "GoodsTypeKey1": "PC", "GoodsTypeKey2": "PKT", "Pkgs": [ { "PkgCSID": 122027, "ItemNo": 1 } ] }
Expected output:
Successful request:
{ "LineCSID": 94560, "LineWeight": 5000, "PkgWeight": 5000, "LineVol": 1000000, "PkgVol": 1000000, "Loadmeter": 20, "GoodsTypeID": 1, "GoodsTypeName": "Paket", "RecycleTypeID": 1, "RecycleTypeName": "EUR", "RecycleTypeCode": "EUR", "GoodsTypeKey1": "PC", "GoodsTypeKey2": "PKT", "Pkgs": [ { "PkgCSID": 122028, "ItemNo": 1 } ], "Labels": [ { "Content": "iVBORw0KggoA\u2026" } ] }
ValidateShipment
Validates the shipment based on the input for the shipment object (data).
Parameters:
Name |
Type |
Mandatory |
Shipment |
Shipment object |
Yes |
Equivalence in nShift On-premises:
Production View --> hover over Print button
Request example:
{ "Kind": 1, "DimensionalWeight": 4000, "ActorCSID": 63, "CarriagePayer": 1, "ProdConceptID": 60, "StackCSID": 184, "PayerAccountAtCarrier": "5695226", "SenderAccountAtCarrier": "5695226", "Addresses": [ { "Kind": 1, "Name1": "Sorin", "Street1": "A1", "PostCode": "0580", "City": "OSLO", "CustNo": "5", "CountryCode": "NO", "ERPRef": "5" }, { "Kind": 10, "Name1": "KIWI 380 \u00d8KERN", "Street1": "\u00d8KERNV 145", "PostCode": "0580", "City": "OSLO", "CustNo": "3425964", "CountryCode": "NO", "ERPRef": "3425964" }, { "Kind": 2, "Name1": "Sender for all", "Street1": "OSLO GATE", "PostCode": "0192", "City": "OSLO", "Email": "johndoe@maildomain.com", "CountryCode": "NO" } ], "Amounts": [ { "Kind": 1, "CurrencyCode": 1, "Value": 75 }, { "Kind": 2, "CurrencyCode": 1, "Value": 75 } ], "References": [ { "Kind": 27, "Value": "PER" }, { "Kind": 9, "Value": "15.10.2018" }, { "Kind": 34, "Value": "4215780580" } ], "Lines": [ { "LineWeight": 4000, "PkgWeight": 4000, "GoodsTypeName": "Helpall", "GoodsTypeKey1": "PE", "Pkgs": [ { "ItemNo": 1 } ] } ] }
Expected output:
Successful request:
{ "Messages": [ "Validation OK" ] }
Validation fail:
{ "ErrorMessages": [ "Shipment validation failed", "You need to enter the contents of the package for all the goodslines. (Goods - Contents)" ] }
VoidPickupLocker
Void a pickup locker earlier allocated by AllocatePickupLocker, AllocatePickupLocker will return this:
{
"Result": "Success",
"AllocatedPickupLockerToken": "198798;2020-05-28T06:00:00;2020-05-28T21:00:00;57,83,542,933,4784"
}
Note : This is currently not supported by any carriers
Parameters:
Data not needed.
Options:
Name |
Type |
Mandatory |
AllocatedPickupLockerToken |
string |
Yes |
Request example, options:
{
"AllocatedPickupLockerToken": "198798;2020-05-28T06:00:00;2020-05-28T21:00:00;57,83,542,933,4784"
}
Expected output:
Successful request:
{
"Result": "Success",
}
VoidTimeSlot
Remove a time slot earlier allocated by AllocateTimeSlot. Read more in the article about Creating Shipments using TimeSlots.
Parameters:
Data not needed.
Options:
Name |
Type |
Mandatory |
AllocatedTimeSlotToken |
string |
Yes |
Request example, options:
"options": {
"AllocatedTimeSlotToken": "YXRzdDtmZjIxYTlkMi1mM2ZhLTExZWEtYjY3N..."
}
Expected output:
Successful request:
{
"Result": "Success",
"AllocatedTimeSlotToken": "198798;2020-05-28T06:00:00;2020-05-28T21:00:00;57,83,542,933,4784"
}