Pickup Request API
簡介
收件要求 API 允許您查看可供使用的收件服務、安排速遞員收件及取消收件要求。
收件要求 API 適用於所有地區的 FedEx Express 和 FedEx Ground (回件及出口) 貨件的新包裹或之前已處理的包裹。這份詳盡的指南可助您快速上手,並教您有關收件要求 API 的所有知識。
收件要求 API 詳情
以下是與收件要求 API 相關的主要功能:
可供使用的收件服務
可供使用的收件服務讓您可以根據輸入的請求查看可供使用的收件服務。可供使用的收件服務取決於兩個因素:截止時間和收件所需時間。
截止時間 - 允許安排收件的最遲時間。此處的時間為收件郵政編碼的本地時間。
收件所需時間 - 可收件的時間 (包裹可供收件) 與司機可收件的時間之間的時間。
建立收件
此選項可讓您安排收件,適用於 FedEx Express® 和 FedEx Ground® 本地和國際貨件。FedEx Ground 和 Express 收件要求 API 會發回收件確認號碼,還會隨已預約收件的 Express 收件要求發回地點代碼。您還可以使用此 API 預約收取退回的貨件。
額外的收件人地址行 (地址行 3) 允許您提供更完整和更準確的地點詳情,以便更快送遞 FedEx Express® 貨件。預約 FedEx 速遞員前往您的地址或前往另一地點 (須支付附加費) 收取貨件,可協助您節省時間和精力。
取消收件
此選項允許您取消之前預約的收件安排。此選項適用於 FedEx Express 和 FedEx Ground 本地和國際貨件。FedEx Express 本地和國際收件服務可在同一天取消。FedEx Ground 本地和國際貨件可在提交收件請求 24 小時後取消。如果已經收取了您的貨件,請致電 800 FedEx (800 3339) 聯絡 FedEx 顧客服務部以安排取消。
收件請求詳情
FedEx Express 收件請求
- 您的包裹可供收件的時間不得遲於您所在地點郵政編碼的截止時間。可使用「可供使用的收件服務」請求檢索截止時間。
- 從您的包裹可供收取直至速遞員無法進入場所收取包裹的一段時間,必須不能短於「收件所需的時間」,您可以使用「可供使用的收件服務」請求檢索該時間。
- FedEx Express 收件服務可以安排在當日或下一個工作天。
- 單次收件請求所含包裹數量的上限為 99 件。
- 如果您已經有定期預約收件,則無需預約一次收件或添加另一個定期預約收件。
- 您不能更改收件請求。如要更改請求,您必須取消原有的請求並輸入新的請求。
- FedEx 系統現在支援英國本地收件功能。
例如:「PT4H0M」表示收件所需時間為 4 小時 0 分鐘。
FedEx Ground 收件請求
- 可預約在下一個工作天收件或提前預約在兩星期內的任何工作天收件。
- 單次收件請求所含包裹數量的上限為 99 件。
- 如果您已經有定期預約收件,則無需預約一次收件或添加另一個定期預約收件。
- 可在住址收件,需要支付額外附加費。
- 您不能更改收件請求。如要更改請求,您必須取消原有的請求並輸入新的請求。
收件要求 API 服務類型
FedEx Express 收件
當您請求 FedEx Express 收件時 (包括透過 fedex.com 和 FedEx 顧客服務部提出的請求),將收取速遞員收件費用。
FedEx Ground 收件
FedEx Ground 可應要求提供收件服務,但需支付額外費用。就定期預約收件顧客,我們會根據與定期預約收件關聯的帳號評估每週收件費用。
- 如顧客沒有定期預約收件,我們會按每件包裹徵收待命收件費用。如果您在 FedEx 託運服務站投遞包裹,則不收取待命收件費用。此外,待命收件費用不適用於 FedEx Ground® Economy (前稱 FedEx SmartPost®) 列印回件標籤、FedEx Ground® Economy (前稱 FedEx SmartPost®) 電郵回件標籤及 FedEx Ground® 包裹回件計劃收件。
- 對於定期預約收件顧客,FedEx Ground 可應要求提供 FedEx Ground 帳號託運服務站以外地址的收件服務。每週每個唯一地址的額外備用地址收件費用適用於此服務。
FedEx 額外時間
FedEx 額外時間服務提供週一至週五翌日 1 天運送收件,使零售商能夠使用 FedEx Express 翌日本地遞送以完成夜間訂單。
有關可提供的服務詳情,請瀏覽 fedex.com。
收件要求 API 的運作方式
以下是收件要求 API 提供的收件選項:
查看可供使用的收件服務
使用此端點索取收件服務的預約安排詳情。
與此請求相關的關鍵輸入資料為:
- 收件地址/郵寄詳情。
- 收件請求類型 (例如:同日/未來日子)。
- 收件的 FedEx 運輸承運人 (例如:express/ground)。
- 是否在本地/國際收件。
成功回應此要求將發回收件服務的預約安排詳情,例如收件截件時間、收件日期、收件存取時間、預設備妥時間,以及其他可選的收件服務預約安排詳情。如果未能成功,它還提供錯誤訊息和說明。
建立收件
使用此端點為需要收件的包裹建立收件要求。
與此請求相關的關鍵輸入資料為:
- FedEx 帳戶號碼,可供開立收件服務的發票。
- 寄件地詳情 (地址、地點和收件地址類型,例如帳戶/寄件人/其他)。
- 收件的 FedEx 運輸承運人 (express/ground)。
- 關聯帳戶的地址詳情。
成功收件請求將發回收件確認號碼、收件通知和預約收件的地點代碼。如果出現任何故障,它還提供錯誤訊息和描述。
取消收件
使用此請求取消已預約的包裹收件請求。
與此請求相關的關鍵輸入資料為:
- 收件確認代碼 (在提交收件請求時獲得)
- 收件的 FedEx 運輸承運人 (Express/Ground)
- 已預約日期 (收件發貨的日期)
- 地點 (負責處理收件請求的 FedEx Express 地點)
成功取消收件將發回確認號碼和取消收件確認訊息。如果出現任何故障,它還提供錯誤訊息和描述。
注意:提交收件確認號碼和相應的地點代碼 (僅適用於 FDXE) 以取消已預約的收件。在提交收件請求時,獲取的收件確認號碼和相應的地點代碼 (僅適用於 FDXE) 資訊。如果您在 FedEx 速遞員派送至收件服務站後嘗試取消收件,則會發回失敗通知
業務規則
- 要為其他國家/地區請求收件,請在您希望 FedEx 收取貨件的國家/地區包含相應國家/地區代碼的國家/地區元素。
- FedEx 會為成功的請求發回派送確認號碼。除非您添加的包裹超出原本請求的尺寸或重量,否則派送請求應限制為每天一個請求。
- 如果您輸入的包裹可收件和業務休息之間的時段不足,則發送請求可能會失敗。如果您對收件時間有任何疑問,請聯絡您所在地區的 FedEx 支援熱線。
- 收件要求 API 支援的重量單位類型為「磅」和「公斤」。包裹和商品的重量單位要一致,否則收件要求會出錯。
- 如果您需要為 FedEx Express (包括墨西哥境內運輸) 和 FedEx Ground 包裹預約收件,您需要分別為每個承運人預約一次收件。
- 如果您的收件地點位於偏遠地區,請確保提前準備好包裹,以配合偏遠地區收件時間。
- 請始終包括可收取包裹的最遲時間 (或您公司休息的時間)。
- FedEx Express 包裹在全球指定地點提供星期六取件服務,還有眾多 FedEx 服務站提供星期六投遞服務。使用服務站服務終端收取星期六投遞地點的清單。
- 對於 FedEx Ground 和 FedEx Express 收件,您可以請求一個替代的收件地址,而不是附加至 FedEx 帳號的託運地點。
- 如果您需要定期使用 FedEx Express 或 FedEx Ground 收件服務,請聯絡您的 FedEx 帳戶管理員。
- 只有在以下情況,您才能取消 FedEx Express 或 FedEx Ground 收件服務:
- 未能符合請求包裹的可收件時間,以及
- 速遞員沒有派送。
JSON API 系列
Pickup Request API (1.0.0)
Create Pickup
Use this endpoint to create a pickup request for a package.
Note: FedEx APIs do not support Cross-Origin Resource Sharing (CORS) mechanism.
header Parameters
x-customer-transaction-id | string Example: 624deea6-b709-470c-8c39-4b5511281492 This element allows you to assign a unique identifier to your transaction. This element is also returned in the reply and helps you match the request to the reply. |
content-type required | string Example: application/json This is used to indicate the media type of the resource. The media type is a string sent along with the file indicating format of the file. |
x-locale | string Example: en_US This indicates the combination of language code and country code. Click here to see Locales |
authorization required | string Example: Bearer XXX This indicates the authorization token for the input request. |
Request Body schema: application/json
- Full_Schema_Create_Pickup
- Create_Pickup_Ground
- Create_Pickup_Express
- MinimumSamplePayload-ExpressFreightPickup
associatedAccountNumber required | object (AccountNumber) This is the FedEx account number. |
originDetail required | object The origin address if different than the one associated with the shipper account. This element value is required when the package is to be picked up from an address other than the shipper account address. |
associatedAccountNumberType | string This enumeration represents a kind of legacy account number from a FedEx operating entity for the account number associated to the pickup. |
totalWeight | object Specify The total weight of the packages for the pickup. Unit of measure is LB. |
packageCount | integer <int32> Specify the total number of packages for the pickup. |
carrierCode required | string Enum: "FDXE" "FDXG" Specify the four letter code of a FedEx operating company that meets your requirements.
|
accountAddressOfRecord | object The city name, state or province code and the address classification associated with the customer account which requested the pickup. |
remarks | string Placeholder for any message to be passed to the FedEx pickup courier. |
countryRelationships | string Enum: "DOMESTIC" "INTERNATIONAL" Describes the country relationship among the shipments being picked up. This element is not mandatory for this request, but when added, the mandatory values are DOMESTIC or INTERNATIONAL. Empty or incorrect values will result in to errors. |
pickupType | string Indicate the pickup type method by which the shipment to be tendered to FedEx. |
trackingNumber | string This is a Tracking number for FedEx packages used for tracking a single package or group of packages. |
commodityDescription | string Description of the commodity being shipped. |
expressFreightDetail | object Placeholder for Express Freight pickup details. |
oversizePackageCount | integer <int32> Specify the number of oversize packages that are tendered to FedEx Ground. |
pickupNotificationDetail | object This object allows user to request for pickup confirmation email. User can specify upto 5 email addresses. |
Responses
Success
Bad Request
Unauthorized
Forbidden
Not Found
Failure
Service Unavailable
Sandbox Server
Production Server
Request samples
- Payload
- C#
- JAVA
- JAVASCRIPT
- PHP
- PYTHON
- RUST
- SWIFT
- "associatedAccountNumber": {
- "value": "Your account number"
- "originDetail": {
- "pickupAddressType": "ACCOUNT",
- "pickupLocation": {
- "contact": {
- "companyName": "Fedex",
- "personName": "John Taylor",
- "phoneNumber": "7194446666",
- "phoneExtension": "phone extension"
- "address": {
- "streetLines": [
- "123 Ship Street",
- "Suite 302"
- "urbanizationCode": "URB FAIR OAKS",
- "city": "Memphis",
- "stateOrProvinceCode": "TN",
- "postalCode": "38017",
- "countryCode": "US",
- "residential": false,
- "addressClassification": "MIXED"
- "accountNumber": {
- "value": "XXX289837"
- "deliveryInstructions": "deliveryInstructions"
- "readyDateTimestamp": "2020-04-02T11:00:00Z",
- "customerCloseTime": "18:00:00",
- "pickupDateType": "SAME_DAY",
- "packageLocation": "FRONT",
- "buildingPart": "APARTMENT",
- "buildingPartDescription": "111",
- "earlyPickup": false,
- "suppliesRequested": "Supplies requested by customer",
- "geographicalPostalCode": "geographicalPostalCode"
- "associatedAccountNumberType": "FEDEX_GROUND",
- "totalWeight": {
- "units": "KG",
- "value": 20
- "packageCount": 5,
- "carrierCode": "FDXE",
- "accountAddressOfRecord": {
- "streetLines": [
- "123 Ship Street"
- "city": "Memphis",
- "stateOrProvinceCode": "TN",
- "postalCode": "38017",
- "countryCode": "US",
- "residential": false,
- "addressClassification": "MIXED"
- "remarks": "Please ring bell at loading dock.",
- "countryRelationships": "DOMESTIC",
- "pickupType": "ON_CALL, PACKAGE_RETURN_PROGRAM, REGULAR_STOP.",
- "trackingNumber": "795803657326",
- "commodityDescription": "This field contains CommodityDescription",
- "expressFreightDetail": {
- "truckType": "DROP_TRAILER_AGREEMENT",
- "service": "FEDEX_1_DAY_FREIGHT",
- "trailerLength": "TRAILER_28_FT",
- "bookingNumber": "1234AGTT",
- "dimensions": {
- "length": 20,
- "width": 15,
- "height": 12,
- "units": "CM"
- "oversizePackageCount": 2,
- "pickupNotificationDetail": {
- "emailDetails": [
- {
- "address": "sample@gmail.com",
- "locale": "en_US"
- "format": "HTML",
- "userMessage": "This is the user message"
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
- "transactionId": "624deea6-b709-470c-8c39-4b5511281492",
- "customerTransactionId": "AnyCo_order123456789",
- "output": {
- "pickupConfirmationCode": "3001",
- "message": "Courier on the way",
- "location": "COSA",
- "alerts": [
- {
- "code": "SHIP.RECIPIENT.POSTALCITY.MISMATCH",
- "alertType": "NOTE",
- "message": "Recipient Postal-City Mismatch."
Check Pickup Availability
Use this endpoint to check the availability of a pickup service.
Note: FedEx APIs do not support Cross-Origin Resource Sharing (CORS) mechanism.
header Parameters
x-customer-transaction-id | string Example: 624deea6-b709-470c-8c39-4b5511281492 This element allows you to assign a unique identifier to your transaction. This element is also returned in the reply and helps you match the request to the reply. |
content-type required | string Example: application/json This is used to indicate the media type of the resource. The media type is a string sent along with the file indicating format of the file. |
x-locale | string Example: en_US This indicates the combination of language code and country code. Click here to see Locales |
authorization required | string Example: Bearer XXX This indicates the authorization token for the input request. |
Request Body schema: application/json
- Full_Schema_Pickup_Availability
- Check_Pickup_Availability_Domestic_Express
- Check_Pickup_Availability_Domestic_Ground
- Check_Pickup_Availability_International_Express
pickupAddress required | object (PickupAddress) Specify the address for which pickup availability inquiry has been made. |
dispatchDate | string Specify the date the package is to be picked up. The format is YYYY-MM-DD. If left blank, the system considers current date as dispatch date. |
packageReadyTime | string Specify the time that the package will be ready for pickup. The time format is HH:MM:SS and it refers to the local timezone. The driver should pick up the package/shipment by the given pickup time. |
customerCloseTime | string Specify the latest time the driver gets access to pick up the package. The time format is in HH:MM:SS and it refers to the local timezone. The driver should pick up the package by the given pickup time. |
pickupType | string Enum: "ON_CALL" "TAG" Indicate the pickup type method by which the shipment to be tendered to FedEx. |
pickupRequestType required | Array of strings Items Enum: "SAME_DAY" "FUTURE_DAY" Specify pickup request type. |
shipmentAttributes | object (ShipmentAttributes) Specify the shipment details, such as service type, packaging type, weight and dimensions. |
numberOfBusinessDays | integer <int32> Specify number of business days to consider when checking availability. |
packageDetails | Array of objects (RequestedPickupPackageDetail) This object is used to specify the package details. |
associatedAccountNumber | string The associated account number, which will be invoiced for the pickup. |
associatedAccountNumberType | string Enum: "FEDEX_EXPRESS" "FEDEX_GROUND" This represents a kind of legacy account number from a FedEx operating entity for the account number associated to the pickup. |
carriers required | Array of strings Items Enum: "FDXE" "FDXG" Specify the four letter code of a FedEx operating company thet meets your requirements.
|
countryRelationship required | string Enum: "DOMESTIC" "INTERNATIONAL" Specify the country relationship among the shipments being picked up. Empty or incorrect values will result in to errors. |
Responses
Success
Bad Request
Unauthorized
Forbidden
Not Found
Failure
Service Unavailable
Sandbox Server
Production Server
Request samples
- Payload
- C#
- JAVA
- JAVASCRIPT
- PHP
- PYTHON
- RUST
- SWIFT
- "pickupAddress": {
- "streetLines": [
- "123 Ship Street"
- "urbanizationCode": "URB FAIR OAKS",
- "city": "Memphis",
- "stateOrProvinceCode": "TN",
- "postalCode": "38017",
- "countryCode": "US",
- "residential": false,
- "addressClassification": "MIXED"
- "dispatchDate": "2020-10-14",
- "packageReadyTime": "15:30:00",
- "customerCloseTime": "18:00:00",
- "pickupType": "ON_CALL",
- "pickupRequestType": [
- "SAME_DAY"
- "shipmentAttributes": {
- "serviceType": "FEDEX_FREIGHT_PRIORITY",
- "weight": {
- "units": "KG",
- "value": 20
- "packagingType": "YOUR_PACKAGING",
- "dimensions": {
- "length": 7,
- "width": 8,
- "units": "CM",
- "height": 9
- "numberOfBusinessDays": 1,
- "packageDetails": [
- {
- "packageSpecialServices": {
- "specialServiceTypes": [
- "SIGNATURE_OPTION"
- "associatedAccountNumber": "613787364",
- "associatedAccountNumberType": "FEDEX_EXPRESS",
- "carriers": [
- "FDXE"
- "countryRelationship": "INTERNATIONAL"
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
- "transactionId": "624deea6-b709-470c-8c39-4b5511281492",
- "customerTransactionId": "AnyCo_order123456789",
- "output": {
- "requestTimestamp": "2020-04-02T04:19:00",
- "options": [
- {
- "carrier": "FDXE",
- "available": true,
- "pickupDate": "2019-01-20",
- "cutOffTime": "18:30:00",
- "accessTime": {
- "hours": 1,
- "minutes": 30
- "residentialAvailable": true,
- "countryRelationship": "INTERNATIONAL",
- "scheduleDay": "SAME_DAY",
- "defaultReadyTime": "14:00:00",
- "defaultLatestTimeOptions": "19:00:00",
- "earlyCutOffTime": "14:30:00",
- "earlyAccessTime": {
- "hours": 1,
- "minutes": 30
- "earlyPickupLocationId": "PITA",
- "readyTimeOptions": [
- "11:00:00"
- "latestTimeOptions": [
- "12:00:00"
- "alerts": [
- {
- "code": "SHIP.RECIPIENT.POSTALCITY.MISMATCH",
- "alertType": "NOTE",
- "message": "Recipient Postal-City Mismatch."
Cancel Pickup
Use this endpoint to cancel the already scheduled pickup request.
Note: A failure notification will be sent if you attempt to cancel a pickup after the FedEx courier has been dispatched to the pickup location.
Note: FedEx APIs do not support Cross-Origin Resource Sharing (CORS) mechanism.
header Parameters
x-customer-transaction-id | string Example: 624deea6-b709-470c-8c39-4b5511281492 This element allows you to assign a unique identifier to your transaction. This element is also returned in the reply and helps you match the request to the reply. |
content-type required | string Example: application/json This is used to indicate the media type of the resource. The media type is a string sent along with the file indicating format of the file. |
x-locale | string Example: en_US This indicates the combination of language code and country code. Click here to see Locales |
authorization required | string Example: Bearer XXX This indicates the authorization token for the input request. |
Request Body schema: application/json
- Full_Schema_Cancel_Pickup
- Cancel_Pickup_Ground
- Cancel_Pickup_Express
associatedAccountNumber required | object (AccountNumber) This is the FedEx account number. |
pickupConfirmationCode required | string The confirmation number provided by FedEx to the customer when the pickup was scheduled or requested. |
remarks | string Placeholder for any message to be passed to the FedEx pickup courier. |
carrierCode | string Enum: "FDXE" "FDXG" This is a placeholder to provide the FedEx operating company (transportation) code used for package delivery. Required for FedEx Ground. |
accountAddressOfRecord | object (AccountAddressOfRecord) Address details for the associated pickup account. Indicates if the address is residential. Specifies the city name, country code, streetline number, postal code, address verification Identifier, and state or province code. |
scheduledDate required | string Indicates the date the pickup dispatch occurs. |
location | string The FedEx Express location identifier responsible for processing the pickup request. This is returned in the CreatePickup response and is required to cancel a FedEx Express dispatch.Required only for FedEx Express Pickups. Optional for FedEx Ground. Example: LOSA |
Responses
Success
Bad Request
Unauthorized
Forbidden
Not Found
Failure
Service Unavailable
Sandbox Server
Production Server
Request samples
- Payload
- C#
- JAVA
- JAVASCRIPT
- PHP
- PYTHON
- RUST
- SWIFT
- "associatedAccountNumber": {
- "value": "Your account number"
- "pickupConfirmationCode": "7",
- "remarks": "Please ring bell at loading dock.",
- "carrierCode": "FDXE",
- "accountAddressOfRecord": {
- "streetLines": [
- "123 Ship Street"
- "urbanizationCode": "URB FAIR OAKS",
- "city": "Memphis",
- "stateOrProvinceCode": "ON",
- "postalCode": "38017",
- "countryCode": "US",
- "residential": false,
- "addressClassification": "MIXED"
- "scheduledDate": "2019-10-15",
- "location": "LOSA"
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
- "transactionId": "624deea6-b709-470c-8c39-4b5511281492",
- "customerTransactionId": "AnyCo_order123456789",
- "output": {
- "pickupConfirmationCode": "NQAA97",
- "cancelConfirmationMessage": "Requested pickup has been cancelled Successfully.",
- "alerts": [
- {
- "code": "SHIP.RECIPIENT.POSTALCITY.MISMATCH",
- "alertType": "NOTE",
- "message": "Recipient Postal-City Mismatch."
Response