POST api/CreatePickupRequest_V1

Create pickup Request

Request Information

URI Parameters

None.

Body Parameters

Create Pickup Request request

WS_Repository.Models.Requests.Pickup.CreatePickupRequest
NameDescriptionTypeAdditional information
WS_Key

(Mandatory) Webservice Key provided by 2ship support

string

None.

CarrierId

(Mandatory) CarrierId

integer

None.

LocationId

(Optional) If not set will use the Pickup address to match the right Location to use.

integer

None.

PickupAddress

(Mandatory) The Address where you want to call the carrier driver for pickup

WS_Repository.Models.Requests.Pickup.PickupAddress

None.

PackageLocation

(Optional) the Location of your building where the package is located

WS_Repository.Models.Requests.Pickup.PackageLocation

None.

BuildingPart

(Optional) Building part

WS_Repository.Models.Requests.Pickup.BuildingPart

None.

PickupDescription

(Optional) Building Part description (Instructions for the driver (e.g., use back door, use side entrance, bring a dolly))

string

None.

ShipmentData

(Mandatory) Shipment Data

WS_Repository.Models.Requests.Pickup.ShipmentData

None.

PickupDate

(Mandatory) Pickup Date

date

None.

ReadyTime

(Mandatory) The time when your package(s) is/are ready (24H format - ex: 13:45)

string

None.

CompanyCloseTime

(Mandatory) The time when your company is closing or until the driver can be at your location (24H format - ex: 13:45)

string

None.

LTLData

(Optional) Freight Info

WS_Repository.Models.Requests.Pickup.FreightData

None.

RetrieveBase64StringDocuments

(Optional) Use to get in the responso also the documents in Base64String format

boolean

None.

CarrierEmails

(Optional) Carrier Emails list

Collection of string

None.

Request Formats

application/json, text/json

Sample:
{
  "WS_Key": "sample string 1",
  "CarrierId": 2,
  "LocationId": 3,
  "PickupAddress": {
    "PersonName": "sample string 1",
    "CompanyName": "sample string 2",
    "Country": "sample string 3",
    "State": "sample string 4",
    "City": "sample string 5",
    "PostalCode": "sample string 6",
    "Address1": "sample string 7",
    "Address2": "sample string 8",
    "Telephone": "sample string 9",
    "Email": "sample string 10",
    "IsResidential": true,
    "StreetNumber": "sample string 12",
    "StreetType": "sample string 13"
  },
  "PackageLocation": 0,
  "BuildingPart": 0,
  "PickupDescription": "sample string 4",
  "ShipmentData": {
    "NumberOfPackage": 1,
    "TotalWeight": 2.0,
    "Length": 3.0,
    "Width": 4.0,
    "Height": 5.0,
    "MeasurementsType": 0,
    "ShipmentIsOnSkid": true,
    "NumberOfSkids": 7,
    "FiveTonFlag": true,
    "LoadingDockAvailable": true,
    "Trailer53Accessible": true,
    "ServiceType": 0,
    "DestinationCountry": "sample string 11",
    "ServiceCode": "sample string 12",
    "OverweightIndicator": true
  },
  "PickupDate": "2020-04-05T10:13:13.7340388-04:00",
  "ReadyTime": "sample string 6",
  "CompanyCloseTime": "sample string 7",
  "LTLData": {
    "BOLNumbersList": [
      "sample string 1",
      "sample string 2"
    ],
    "ReferencesList": [
      "sample string 1",
      "sample string 2"
    ],
    "PONumbersList": [
      "sample string 1",
      "sample string 2"
    ]
  },
  "RetrieveBase64StringDocuments": true,
  "CarrierEmails": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<CreatePickupRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Pickup">
  <BuildingPart>BUILDING</BuildingPart>
  <CarrierEmails xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </CarrierEmails>
  <CarrierId>2</CarrierId>
  <CompanyCloseTime>sample string 7</CompanyCloseTime>
  <LTLData>
    <BOLNumbersList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </BOLNumbersList>
    <PONumbersList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </PONumbersList>
    <ReferencesList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </ReferencesList>
  </LTLData>
  <LocationId>3</LocationId>
  <PackageLocation>NONE</PackageLocation>
  <PickupAddress>
    <Address1>sample string 7</Address1>
    <Address2>sample string 8</Address2>
    <City>sample string 5</City>
    <CompanyName>sample string 2</CompanyName>
    <Country>sample string 3</Country>
    <Email>sample string 10</Email>
    <IsResidential>true</IsResidential>
    <PersonName>sample string 1</PersonName>
    <PostalCode>sample string 6</PostalCode>
    <State>sample string 4</State>
    <StreetNumber>sample string 12</StreetNumber>
    <StreetType>sample string 13</StreetType>
    <Telephone>sample string 9</Telephone>
  </PickupAddress>
  <PickupDate>2020-04-05T10:13:13.7340388-04:00</PickupDate>
  <PickupDescription>sample string 4</PickupDescription>
  <ReadyTime>sample string 6</ReadyTime>
  <RetrieveBase64StringDocuments>true</RetrieveBase64StringDocuments>
  <ShipmentData>
    <DestinationCountry>sample string 11</DestinationCountry>
    <FiveTonFlag>true</FiveTonFlag>
    <Height>5</Height>
    <Length>3</Length>
    <LoadingDockAvailable>true</LoadingDockAvailable>
    <MeasurementsType>Imperial</MeasurementsType>
    <NumberOfPackage>1</NumberOfPackage>
    <NumberOfSkids>7</NumberOfSkids>
    <OverweightIndicator>true</OverweightIndicator>
    <ServiceCode>sample string 12</ServiceCode>
    <ServiceType>Express</ServiceType>
    <ShipmentIsOnSkid>true</ShipmentIsOnSkid>
    <TotalWeight>2</TotalWeight>
    <Trailer53Accessible>true</Trailer53Accessible>
    <Width>4</Width>
  </ShipmentData>
  <WS_Key>sample string 1</WS_Key>
</CreatePickupRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'WS_Repository.Models.Requests.Pickup.CreatePickupRequest'.

Response Information

Resource Description

Create Pickup Response

WS_Repository.Models.Responses.Pickup.CreatePickupResponse
NameDescriptionTypeAdditional information
PickupId

Internal 2Ship Pickup Id - needed when you want to delete a Pickup Request

integer

None.

PickupCarrierNumber

Pickup Number

string

None.

PickupCarrierLocationCode

Pickup Carrier Location Code

string

None.

PickupRequestDocuments

Array of Pickup Documents Documents

Collection of WS_Repository.Models.Responses.Pickup.PickupRequestDocument

None.

Response Formats

application/json, text/json

Sample:
{
  "PickupId": 1,
  "PickupCarrierNumber": "sample string 2",
  "PickupCarrierLocationCode": "sample string 3",
  "PickupRequestDocuments": [
    {
      "Href": "sample string 1",
      "DocumentBase64String": "sample string 2"
    },
    {
      "Href": "sample string 1",
      "DocumentBase64String": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<CreatePickupResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Pickup">
  <PickupCarrierLocationCode>sample string 3</PickupCarrierLocationCode>
  <PickupCarrierNumber>sample string 2</PickupCarrierNumber>
  <PickupId>1</PickupId>
  <PickupRequestDocuments>
    <PickupRequestDocument>
      <DocumentBase64String>sample string 2</DocumentBase64String>
      <Href>sample string 1</Href>
    </PickupRequestDocument>
    <PickupRequestDocument>
      <DocumentBase64String>sample string 2</DocumentBase64String>
      <Href>sample string 1</Href>
    </PickupRequestDocument>
  </PickupRequestDocuments>
</CreatePickupResponse>