POST api/GetCarrierInfo_V1
Get Carrier Info: name, type, services, shipment options, etc...
Request Information
URI Parameters
None.
Body Parameters
The request is presented below!
WS_Repository.Models.Requests.Carrier.GetCarrierRequestName | Description | Type | Additional information |
---|---|---|---|
CarrierId |
Mandatory; Carrier id for which to get info |
integer |
None. |
ServiceCode |
Optional; Service Code of the carrier for which to get the info |
string |
None. |
WS_Key |
(Mandatory) Webservice Key provided by 2ship support |
string |
None. |
Request Formats
application/json, text/json
Sample:
{ "CarrierId": 1, "ServiceCode": "sample string 2", "WS_Key": "sample string 3" }
application/xml, text/xml
Sample:
<GetCarrierRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Carrier"> <CarrierId>1</CarrierId> <ServiceCode>sample string 2</ServiceCode> <WS_Key>sample string 3</WS_Key> </GetCarrierRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
WS_Repository.Models.Responses.Carrier.CarrierReplyName | Description | Type | Additional information |
---|---|---|---|
Id |
Carrier Id |
integer |
None. |
SCAC |
Carrier SCAC (Standard Carrier Alfa Code) |
string |
None. |
Name |
Carrier Name |
string |
None. |
Type |
Carrier Type |
WS_Repository.Models.Responses.Carrier.CarrierType |
None. |
Services |
Array of Carrier Services |
Collection of WS_Repository.Models.Responses.Carrier.CarrierService |
None. |
Options |
Array of Carrier ShipmentOptions |
Collection of WS_Repository.Models.Responses.Carrier.ShipmentOption |
None. |
HasQRCodeLabelPrinting |
QR Code Label Printing |
boolean |
None. |
Response Formats
application/json, text/json
Sample:
{ "Id": 1, "SCAC": "sample string 2", "Name": "sample string 3", "Type": 0, "Services": [ { "Name": "sample string 1", "Code": "sample string 2", "Origin": "sample string 3", "Destination": "sample string 4" }, { "Name": "sample string 1", "Code": "sample string 2", "Origin": "sample string 3", "Destination": "sample string 4" } ], "Options": [ { "code": 2, "name": "sample string 3", "HasAdditionalOptionInfo": true, "AdditionalOptionInfo": { "OptionType": 0, "OptionTypeFieldName": "sample string 1", "AdditionalFieldsType": { "HaveNotes": true, "HaveContactPerson": true, "HavePhoneNumber": true } }, "HasSubOptions": true, "SubOptions": [ { "Type": 0, "Name": "sample string 1", "Code": "sample string 2", "ValidValues": "sample string 3" }, { "Type": 0, "Name": "sample string 1", "Code": "sample string 2", "ValidValues": "sample string 3" } ] }, { "code": 2, "name": "sample string 3", "HasAdditionalOptionInfo": true, "AdditionalOptionInfo": { "OptionType": 0, "OptionTypeFieldName": "sample string 1", "AdditionalFieldsType": { "HaveNotes": true, "HaveContactPerson": true, "HavePhoneNumber": true } }, "HasSubOptions": true, "SubOptions": [ { "Type": 0, "Name": "sample string 1", "Code": "sample string 2", "ValidValues": "sample string 3" }, { "Type": 0, "Name": "sample string 1", "Code": "sample string 2", "ValidValues": "sample string 3" } ] } ], "HasQRCodeLabelPrinting": true }
application/xml, text/xml
Sample:
<CarrierReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Carrier"> <HasQRCodeLabelPrinting>true</HasQRCodeLabelPrinting> <Id>1</Id> <Name>sample string 3</Name> <Options> <ShipmentOption> <AdditionalOptionInfo> <AdditionalFieldsType> <HaveContactPerson>true</HaveContactPerson> <HaveNotes>true</HaveNotes> <HavePhoneNumber>true</HavePhoneNumber> </AdditionalFieldsType> <OptionType>Checkbox</OptionType> <OptionTypeFieldName>sample string 1</OptionTypeFieldName> </AdditionalOptionInfo> <HasAdditionalOptionInfo>true</HasAdditionalOptionInfo> <HasSubOptions>true</HasSubOptions> <SubOptions> <SubShipmentOption> <Code>sample string 2</Code> <Name>sample string 1</Name> <Type>IsFlag</Type> <ValidValues>sample string 3</ValidValues> </SubShipmentOption> <SubShipmentOption> <Code>sample string 2</Code> <Name>sample string 1</Name> <Type>IsFlag</Type> <ValidValues>sample string 3</ValidValues> </SubShipmentOption> </SubOptions> <code>2</code> <name>sample string 3</name> </ShipmentOption> <ShipmentOption> <AdditionalOptionInfo> <AdditionalFieldsType> <HaveContactPerson>true</HaveContactPerson> <HaveNotes>true</HaveNotes> <HavePhoneNumber>true</HavePhoneNumber> </AdditionalFieldsType> <OptionType>Checkbox</OptionType> <OptionTypeFieldName>sample string 1</OptionTypeFieldName> </AdditionalOptionInfo> <HasAdditionalOptionInfo>true</HasAdditionalOptionInfo> <HasSubOptions>true</HasSubOptions> <SubOptions> <SubShipmentOption> <Code>sample string 2</Code> <Name>sample string 1</Name> <Type>IsFlag</Type> <ValidValues>sample string 3</ValidValues> </SubShipmentOption> <SubShipmentOption> <Code>sample string 2</Code> <Name>sample string 1</Name> <Type>IsFlag</Type> <ValidValues>sample string 3</ValidValues> </SubShipmentOption> </SubOptions> <code>2</code> <name>sample string 3</name> </ShipmentOption> </Options> <SCAC>sample string 2</SCAC> <Services> <CarrierService> <Code>sample string 2</Code> <Destination>sample string 4</Destination> <Name>sample string 1</Name> <Origin>sample string 3</Origin> </CarrierService> <CarrierService> <Code>sample string 2</Code> <Destination>sample string 4</Destination> <Name>sample string 1</Name> <Origin>sample string 3</Origin> </CarrierService> </Services> <Type>SmallPack</Type> </CarrierReply>