Fedex Logo
Developer Portal

Ground End of Day Close API

簡介

Ground® 下班前關閉 API 允許您核對 FedEx Ground 帳戶的託運資料,並為司機列印 Ground 載貨單。Ground 載貨單會在成功關閉後生成,並必須在 Ground 貨件交給 FedEx 前列印好。即使已經關閉,顧客仍可繼續託運 Ground 包裹。

Ground End of Day Close API 詳情

此 API 允許您上載包裹數據給 FedEx 並生成載貨單報告,從而關閉對應的 FedEx Ground® 貨件 (美國國內及國際)。

Ground End of Day Close API 功能:

  1. 所有擁有相同參考資料欄位的貨件,可集合起來並作為單一組合結帳。
  2. 參考確認功能會識別出貨件群組,以列印已配置的報告。
  3. 帶有參考指定關閉功能的下班前關閉,會為貨件執行關閉操作。這些貨件已關聯至指定的參考欄位。
  4. 此 API 會上載 Ground 貨件資料至 FedEx 帳戶。
  5. 開放船舶驗證錯誤功能會指定回覆中傳回之錯誤處理的層級。您可於執行下班前關閉交易時,用它來分析未確認的未結賬貨件。

Ground End of Day Close API 的運作方式

以下是 FedEx Ground End of Day Close API 的一些操作:

Ground 下班前關閉請求

初始化處理顧客當天 (營業結束時間) 所提交之所有 FedEx Ground 貨件的貨件數據之最後步驟。回覆只會傳回 Ground 載貨單。Ground 載貨單僅以文字 (.txt) 格式提供。

與此請求相關的關鍵輸入資料如下:

  • 關閉日期
  • 託運文件/報告規格
  • FedEx 帳戶號碼
  • FedEx Ground 類別 (FedEx Ground)

成功回覆將關閉貨件並生成指定的報告/文件。

重新列印文件請求

生成由用戶指定的報告,該報告在處理關閉操作時建立。傳回指定日子的所有指定生成報告。最多僅可重新列印過去三天的報告。

與此請求相關的關鍵輸入資料如下:

  • 關閉日期
  • 重新列印選項
  • 託運文件/報告規格
  • FedEx 帳戶號碼
  • FedEx Ground 類別 (FedEx Ground)

成功回覆將重新列印報告/文件。

Ground 關閉

每個託運日均可執行多次關閉操作。關閉經已處理後,無須再次開啟,只須繼續託運即可。使用關閉服務來初始化處理當日 (營業結束時間) 提交的貨件資料之最後步驟。

如需 FedEx 提供之服務更詳細的資料,請參閱電子版 FedEx 服務指南。

FedEx Ground 報告

Ground 載貨單

完成當日的 FedEx Ground 託運標籤活動後,顧客必須\"關閉\"待處理的 FedEx Ground 標籤,列印 FedEx Ground 載貨單,並將載貨單交給 FedEx 司機或零售店員。此載貨單列出了所有 FedEx Ground 列印活動,它們必須交給 FedEx 以供處理。

下班前關閉後,可隨時立即列印或重新列印 FedEx Ground 報告,如果當日有超過一個關閉,則可於稍後列印或重新列印。FedEx Ground 載貨單報告將包含過去 24 小時內生成的所有 FedEx Ground 貨件。

FedEx 綜合貨件服務的 FedEx Ground 收件載貨單,等同任何類型 FedEx Ground 包裹託運所生成的標準報告。FedEx Ground 速遞員須有 FedEx Ground 收件載貨單,方可處理包裹進行託運。該載貨單向 FedEx Ground 速遞員提供了某日所收件的包裹摘要,並提供下列資料:

  • 寄件人的帳戶號碼
  • 寄件人的計量表號碼
  • 所有包裹的查詢號碼
  • 貨到付款金額 (如適用)
  • 申報價值 (如適用)
  • 超尺寸 I 類包裹數量
  • 超尺寸 II 類包裹數量
  • 需要額外處理的包裹數量
  • 住宅派送包裹數量
  • 總包裹件數
  • 收件確認號碼

業務規則

  • 關閉操作為可選功能,但建議啟用。如需所生成的任何報告,則可能需要此操作。
  • FedEx Ground 貨件可於關閉後刪除。
  • 載貨單標題中的地址會從指明日期首件託運包裹中摘取。

JSON API 系列

Ship EndofDayClose API (1.0.0)

Ground End Of Day Close

Use this endpoint to close the Ground shipments and generate the reports.
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
One of
  • FullSchema_GEOD_PUT
  • MinimumSamplePayload-Put-GroundClose
closeReqType
string
Enum: "GCDR" "RGCDR"

Specify the close request type to initiate processing of shipment data.For ground close the closeReqType is GCDR and for Reprint EndofDay the applicable value is RGCDR.

accountNumber
object (AccountNumber_2)

This is the FedEx Account number.
Example: XXX456XXX

groundServiceCategory
string
Value: "GROUND"

This is to specify FedEx ground category for which the shipment to be submitted for end of the day closing.

closeDate
string

Indicates the close date.
Example: 2020-05-05

trackingNumber
string

Specify the tracking number for reprinting the report.It is only applicable for reprint EndofDay and its not applicable for ground EndofDay close endpoint.
Example: 7XX96XX42946

reprintOption
string
Enum: "BY_SHIP_DATE" "BY_TRACKING_NUMBER"

Specify the reprint option to generate report. Either by close date or a tracking number.It is only applicable for reprint EndofDay and its not applicable for ground EndofDay close endpoint.

closeDocumentSpecification
object (CloseDocumentSpecification)

Specifies characteristics of the document to be returned for this request.

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Failure

503

Service Unavailable

put /ship/v1/endofday/

Sandbox Server

https://apis-sandbox.fedex.com/ship/v1/endofday/

Production Server

https://apis.fedex.com/ship/v1/endofday/

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "closeReqType": "GCDR",
  • "accountNumber":
    {
    },
  • "groundServiceCategory": "GROUND",
  • "closeDate": "2020-05-05",
  • "trackingNumber": "794967542946",
  • "reprintOption": "BY_SHIP_DATE",
  • "closeDocumentSpecification":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "transactionId": "624deea6-b709-470c-8c39-4b5511281492",
  • "output":
    {
    }
}

Reprint End of the day

Use this endpoint to reprint the closed Ground shipments reports.
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
One of
  • FullSchema_Reprint_POST
  • MinimumSamplePayload-Post-Reprintground
closeReqType
string
Enum: "GCDR" "RGCDR"

Specify the close request type to initiate processing of shipment data.For ground close the closeReqType is GCDR and for Reprint EndofDay the applicable value is RGCDR.

accountNumber
object (AccountNumber_2)

This is the FedEx Account number.
Example: XXX456XXX

groundServiceCategory
string
Value: "GROUND"

This is to specify FedEx ground category for which the shipment to be submitted for end of the day closing.

closeDate
string

Indicates the close date.
Example: 2020-05-05

trackingNumber
string

Specify the tracking number for reprinting the report.It is only applicable for reprint EndofDay and its not applicable for ground EndofDay close endpoint.
Example: 7XX96XX42946

reprintOption
string
Enum: "BY_SHIP_DATE" "BY_TRACKING_NUMBER"

Specify the reprint option to generate report. Either by close date or a tracking number.It is only applicable for reprint EndofDay and its not applicable for ground EndofDay close endpoint.

closeDocumentSpecification
object (CloseDocumentSpecification)

Specifies characteristics of the document to be returned for this request.

Responses

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Failure

503

Service Unavailable

post /ship/v1/endofday/

Sandbox Server

https://apis-sandbox.fedex.com/ship/v1/endofday/

Production Server

https://apis.fedex.com/ship/v1/endofday/

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "closeReqType": "GCDR",
  • "accountNumber":
    {
    },
  • "groundServiceCategory": "GROUND",
  • "closeDate": "2020-05-05",
  • "trackingNumber": "794967542946",
  • "reprintOption": "BY_SHIP_DATE",
  • "closeDocumentSpecification":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "transactionId": "624deea6-b709-470c-8c39-4b5511281492",
  • "output":
    {
    }
}
CLOSE

Response

Copy