POST api/ImportShipment_V1
Add a shipment in 2ship shipments history
Request Information
URI Parameters
None.
Body Parameters
The request is presented below!
WS_Repository.Models.Requests.Shipments.ImportShipmentRequestName | Description | Type | Additional information |
---|---|---|---|
WS_Key |
Required - Webservice Key provided by 2ship support |
string |
None. |
WSKeyLevel |
(Mandatory) Specify the WS_Key type ( User or Owner) |
WS_Repository.Models.Requests.Shipments.ImportShipmentsWSKeyLevelType |
None. |
ClientId |
Mandatory if WSKeyLevel = Owner and ExternalClientID = null. It specify the client id where to import the shipment |
integer |
None. |
ExternalClientID |
Mandatory if WSKeyLevel = Owner and ClientId = null. It is used to lookup the client where to import the shipment |
string |
None. |
CarrierId |
(Optional) Carrier Id |
integer |
None. |
CarrierName |
(Optional) Carrier Name |
string |
None. |
ServiceCode |
(Optional) Service Code |
string |
None. |
ServiceName |
(Optional) Service Name |
string |
None. |
AccountNumber |
(Optional) Carrier Account Number |
string |
None. |
LocationId |
(Optional) Location Id |
integer |
None. |
LocationName |
(Optional) Location Name |
string |
None. |
Sender |
(Mandatory) Sender Contact |
WS_Repository.Models.Requests.Shipments.Contact |
None. |
Recipient |
(Mandatory) Recipient Contact |
WS_Repository.Models.Requests.Shipments.Contact |
None. |
Packages |
(Mandatory) Array of Package |
Collection of WS_Repository.Models.Requests.Shipments.Package |
None. |
ShipmentReference |
(Optional) Global Shipment reference, when is provided it is used to fill the package reference when there is no value. Also is save as Shipment Reference |
string |
None. |
ShipmentReference2 |
(Optional) Global Shipment reference 2, when is provided it is used to fill the package reference 2 when there is no value. Also is save as Shipment Reference |
string |
None. |
ShipmentPONumber |
(Optional) Global Shipment PO number, when is provided it is used to fill the package PO Numbeer when there is no value. Also is save as Shipment PO Number |
string |
None. |
ShipmentInstructions |
(Optional) Shipment Instructions, used for 4x8 doctab label |
string |
None. |
ShipDate |
(Optional) The Ship Date (default is today) |
date |
None. |
OrderNumber |
(Optional) Your internal order number of the order |
string |
None. |
IsInboundShipment |
(Optional) the shipment will be treated as an inbound |
boolean |
None. |
InboundShipmentLocationId |
(Optional) if shipment is Inbound then add inbound location id. Note: can be null, inbound location id can be assigned in OPS |
integer |
None. |
InboundShipmentLocationName |
(Optional) if shipment is Inbound then add inbound location name. Note: can be null, inbound location name can be assigned in OPS |
string |
None. |
TrackingNumber |
(Optional) Tracking Number pre-assign - Used by some carriers that accept this feautere |
string |
None. |
Price |
(Optional) Shipment Cost |
WS_Repository.Models.Requests.Shipments.ImportShipmentCosts |
None. |
IsReturn |
(Optional) Is Return |
boolean |
None. |
DeliveryDate |
(Optional) The Delivery Date (default is today) |
date |
None. |
ShipWithoutAPrinter |
(Optional) Use this filter to find the Carrier services that allow you to ship without the need for a printed label |
boolean |
None. |
Billing |
(Optional) Freight Billing Options |
WS_Repository.Models.Requests.Shipments.BillingOptions |
None. |
InternationalOptions |
(Optional) International Options of the shipment(if the shipment is intranational) |
WS_Repository.Models.Requests.Shipments.InternationalOptions |
None. |
Request Formats
application/json, text/json
{ "WS_Key": "sample string 1", "WSKeyLevel": 0, "ClientId": 1, "ExternalClientID": "sample string 2", "CarrierId": 3, "CarrierName": "sample string 4", "ServiceCode": "sample string 5", "ServiceName": "sample string 6", "AccountNumber": "sample string 7", "LocationId": 8, "LocationName": "sample string 9", "Sender": { "Id": "sample string 1", "PersonName": "sample string 2", "CompanyName": "sample string 3", "Country": "sample string 4", "State": "sample string 5", "City": "sample string 6", "PostalCode": "sample string 7", "Address1": "sample string 8", "Address2": "sample string 9", "Address3": "sample string 10", "Telephone": "sample string 11", "TelephoneExtension": "sample string 12", "Email": "sample string 13", "IsResidential": true, "TaxID": "sample string 15" }, "Recipient": { "Id": "sample string 1", "PersonName": "sample string 2", "CompanyName": "sample string 3", "Country": "sample string 4", "State": "sample string 5", "City": "sample string 6", "PostalCode": "sample string 7", "Address1": "sample string 8", "Address2": "sample string 9", "Address3": "sample string 10", "Telephone": "sample string 11", "TelephoneExtension": "sample string 12", "Email": "sample string 13", "IsResidential": true, "TaxID": "sample string 15" }, "Packages": [ { "Weight": 1.0, "Width": 2.0, "Length": 3.0, "Height": 4.0, "FreightClassId": 5.0, "NMFCItem": "sample string 6", "NMFCSub": "sample string 7", "WeightType": 0, "DimensionType": 0, "InsuranceAmount": 8.0, "InsuranceCurrency": "sample string 9", "Reference1": "sample string 10", "Reference2": "sample string 11", "PONumber": "sample string 12", "TrackingNumber": "sample string 13" }, { "Weight": 1.0, "Width": 2.0, "Length": 3.0, "Height": 4.0, "FreightClassId": 5.0, "NMFCItem": "sample string 6", "NMFCSub": "sample string 7", "WeightType": 0, "DimensionType": 0, "InsuranceAmount": 8.0, "InsuranceCurrency": "sample string 9", "Reference1": "sample string 10", "Reference2": "sample string 11", "PONumber": "sample string 12", "TrackingNumber": "sample string 13" } ], "ShipmentReference": "sample string 10", "ShipmentReference2": "sample string 11", "ShipmentPONumber": "sample string 12", "ShipmentInstructions": "sample string 13", "ShipDate": "2024-04-23T22:46:22.9534605Z", "OrderNumber": "sample string 15", "IsInboundShipment": true, "InboundShipmentLocationId": 17, "InboundShipmentLocationName": "sample string 18", "TrackingNumber": "sample string 19", "Price": { "TotalClientFuelCost": 1.0, "TotalClientFreight": 2.0, "TotalClientSurcharges": 3.0, "TotalClientTaxes": 4.0 }, "IsReturn": true, "DeliveryDate": "2024-04-23T22:46:22.9534605Z", "ShipWithoutAPrinter": true, "Billing": { "BillingType": 1, "BillingAddress": { "Id": "sample string 1", "PersonName": "sample string 2", "CompanyName": "sample string 3", "Country": "sample string 4", "State": "sample string 5", "City": "sample string 6", "PostalCode": "sample string 7", "Address1": "sample string 8", "Address2": "sample string 9", "Address3": "sample string 10", "Telephone": "sample string 11", "TelephoneExtension": "sample string 12", "Email": "sample string 13", "IsResidential": true, "TaxID": "sample string 15" }, "BillingAccount": "sample string 1" }, "InternationalOptions": { "CustomsBillingOptions": { "BillingType": 1, "BillingAddress": { "Id": "sample string 1", "PersonName": "sample string 2", "CompanyName": "sample string 3", "Country": "sample string 4", "State": "sample string 5", "City": "sample string 6", "PostalCode": "sample string 7", "Address1": "sample string 8", "Address2": "sample string 9", "Address3": "sample string 10", "Telephone": "sample string 11", "TelephoneExtension": "sample string 12", "Email": "sample string 13", "IsResidential": true, "TaxID": "sample string 15" }, "BillingAccount": "sample string 1" } } }
application/xml, text/xml
<ImportShipmentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Shipments"> <AccountNumber>sample string 7</AccountNumber> <Billing> <BillingAccount>sample string 1</BillingAccount> <BillingAddress> <Address1>sample string 8</Address1> <Address2>sample string 9</Address2> <Address3>sample string 10</Address3> <City>sample string 6</City> <CompanyName>sample string 3</CompanyName> <Country>sample string 4</Country> <Email>sample string 13</Email> <Id>sample string 1</Id> <IsResidential>true</IsResidential> <PersonName>sample string 2</PersonName> <PostalCode>sample string 7</PostalCode> <State>sample string 5</State> <TaxID>sample string 15</TaxID> <Telephone>sample string 11</Telephone> <TelephoneExtension>sample string 12</TelephoneExtension> </BillingAddress> <BillingType>Prepaid</BillingType> </Billing> <CarrierId>3</CarrierId> <CarrierName>sample string 4</CarrierName> <ClientId>1</ClientId> <DeliveryDate>2024-04-23T22:46:22.9534605Z</DeliveryDate> <ExternalClientID>sample string 2</ExternalClientID> <InboundShipmentLocationId>17</InboundShipmentLocationId> <InboundShipmentLocationName>sample string 18</InboundShipmentLocationName> <InternationalOptions> <CustomsBillingOptions> <BillingAccount>sample string 1</BillingAccount> <BillingAddress> <Address1>sample string 8</Address1> <Address2>sample string 9</Address2> <Address3>sample string 10</Address3> <City>sample string 6</City> <CompanyName>sample string 3</CompanyName> <Country>sample string 4</Country> <Email>sample string 13</Email> <Id>sample string 1</Id> <IsResidential>true</IsResidential> <PersonName>sample string 2</PersonName> <PostalCode>sample string 7</PostalCode> <State>sample string 5</State> <TaxID>sample string 15</TaxID> <Telephone>sample string 11</Telephone> <TelephoneExtension>sample string 12</TelephoneExtension> </BillingAddress> <BillingType>Prepaid</BillingType> </CustomsBillingOptions> </InternationalOptions> <IsInboundShipment>true</IsInboundShipment> <IsReturn>true</IsReturn> <LocationId>8</LocationId> <LocationName>sample string 9</LocationName> <OrderNumber>sample string 15</OrderNumber> <Packages> <Package_ShipmentImport> <DimensionType>Inches</DimensionType> <FreightClassId>5</FreightClassId> <Height>4</Height> <InsuranceAmount>8</InsuranceAmount> <InsuranceCurrency>sample string 9</InsuranceCurrency> <Length>3</Length> <NMFCItem>sample string 6</NMFCItem> <NMFCSub>sample string 7</NMFCSub> <PONumber>sample string 12</PONumber> <Reference1>sample string 10</Reference1> <Reference2>sample string 11</Reference2> <TrackingNumber>sample string 13</TrackingNumber> <Weight>1</Weight> <WeightType>Pounds</WeightType> <Width>2</Width> </Package_ShipmentImport> <Package_ShipmentImport> <DimensionType>Inches</DimensionType> <FreightClassId>5</FreightClassId> <Height>4</Height> <InsuranceAmount>8</InsuranceAmount> <InsuranceCurrency>sample string 9</InsuranceCurrency> <Length>3</Length> <NMFCItem>sample string 6</NMFCItem> <NMFCSub>sample string 7</NMFCSub> <PONumber>sample string 12</PONumber> <Reference1>sample string 10</Reference1> <Reference2>sample string 11</Reference2> <TrackingNumber>sample string 13</TrackingNumber> <Weight>1</Weight> <WeightType>Pounds</WeightType> <Width>2</Width> </Package_ShipmentImport> </Packages> <Price> <TotalClientFreight>2</TotalClientFreight> <TotalClientFuelCost>1</TotalClientFuelCost> <TotalClientSurcharges>3</TotalClientSurcharges> <TotalClientTaxes>4</TotalClientTaxes> </Price> <Recipient> <Address1>sample string 8</Address1> <Address2>sample string 9</Address2> <Address3>sample string 10</Address3> <City>sample string 6</City> <CompanyName>sample string 3</CompanyName> <Country>sample string 4</Country> <Email>sample string 13</Email> <Id>sample string 1</Id> <IsResidential>true</IsResidential> <PersonName>sample string 2</PersonName> <PostalCode>sample string 7</PostalCode> <State>sample string 5</State> <TaxID>sample string 15</TaxID> <Telephone>sample string 11</Telephone> <TelephoneExtension>sample string 12</TelephoneExtension> </Recipient> <Sender> <Address1>sample string 8</Address1> <Address2>sample string 9</Address2> <Address3>sample string 10</Address3> <City>sample string 6</City> <CompanyName>sample string 3</CompanyName> <Country>sample string 4</Country> <Email>sample string 13</Email> <Id>sample string 1</Id> <IsResidential>true</IsResidential> <PersonName>sample string 2</PersonName> <PostalCode>sample string 7</PostalCode> <State>sample string 5</State> <TaxID>sample string 15</TaxID> <Telephone>sample string 11</Telephone> <TelephoneExtension>sample string 12</TelephoneExtension> </Sender> <ServiceCode>sample string 5</ServiceCode> <ServiceName>sample string 6</ServiceName> <ShipDate>2024-04-23T22:46:22.9534605Z</ShipDate> <ShipWithoutAPrinter>true</ShipWithoutAPrinter> <ShipmentInstructions>sample string 13</ShipmentInstructions> <ShipmentPONumber>sample string 12</ShipmentPONumber> <ShipmentReference>sample string 10</ShipmentReference> <ShipmentReference2>sample string 11</ShipmentReference2> <TrackingNumber>sample string 19</TrackingNumber> <WSKeyLevel>User</WSKeyLevel> <WS_Key>sample string 1</WS_Key> </ImportShipmentRequest>
application/x-www-form-urlencoded
Response Information
Resource Description
WS_Repository.Models.Responses.Shipments.ImportShipmentResponseName | Description | Type | Additional information |
---|---|---|---|
Success |
Indicate if the import was successfully or not |
boolean |
None. |
ErrorMessage |
Error Message if the SuccessfullyUpdated = false |
string |
None. |
Response Formats
application/json, text/json
{ "Success": true, "ErrorMessage": "sample string 2" }
application/xml, text/xml
<ImportShipmentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Shipments"> <ErrorMessage>sample string 2</ErrorMessage> <Success>true</Success> </ImportShipmentResponse>