Vielen Dank für deinen Besuch. Diese Seite ist nur in Englisch verfügbar.
 Setting up delivery notifications | Amazon Pay

Setting up delivery notifications

The Amazon Pay Delivery Tracker API lets you provide shipment tracking information to Amazon Pay so that Amazon Pay can notify buyers on Alexa when shipments are delivered. This API is channel-agnostic. That means that anywhere you use Amazon Pay, you can use the Delivery Tracker API.

Here's what your customer will experience

Customer: Alexa, read my notifications.

Alexa: One new notification, from Amazon Pay. Your shipment from <yourstorename> has been delivered.

Before you begin

Complete the following steps before integrating with the Amazon Pay Delivery Tracker API.

  1. Open Command Prompt or Terminal and generate a one-time private and public key pair by running the following commands:

        > openssl genrsa -out <directory path>/<private key file name>.pem 2048
        > openssl rsa -in <directory path>/<private key file name>.pem -pubout > <directory path>/<public key file name>.pub
    
  2. Get the Public Key ID by providing the Seller ID and Public Key in email to Amazon Pay at amazon-pay-delivery-notifications@amazon.com.
    For the security of your account, Amazon Pay will email your Public Key ID to the email associated with your Seller Central account. Your Public Key ID will also be available in your Seller Central account within 1–2 business days.
  3. Sign all requests made to the Delivery Tracker API with the private key.
  4. Include the Public Key ID in the authorization header in all requests made to the Delivery Tracker API.

API reference

You can call the HTTP POST request with the endpoint, path, and headers specified below.

Region Endpoint
NA pay-api.amazon.com

Path: /live/v1/deliveryTrackers

Request headers

Header Description Type
Authorization
(required)
The signature algorithm, public key ID, signed headers, and the signature in the following format: Signature_Algorithm PublicKeyId=publicKeyId, SignedHeaders=SignedHeaders, Signature=signature String
X-Amz-Pay-Date
(required)
The time at which the signature was generated. The signature, including timestamp, is generated in the payload. The date is in format YYYYMMDD’T’HHMMS’Z’ String

Request parameters

Parameter Description Type
amazonOrderReferenceId
(required)
The Amazon Order Reference ID associated with the order for which the shipments need to be tracked String
trackingNumber
(required)
The tracking number for the shipment provided by the shipping company String
carrierCode
(required)
The shipping company code used for delivering goods to the customer
Download carrierCode list
String

Sample requests and responses

Request message example

    Host: pay-api.amazon.com 
    Accept: application/json 
    Authorization: AMZN-PAY-RSASSA-PSS PublicKeyId=f4fc06fc-c5a7-11e7-abc4-cec278b6b50a, SignedHeaders=content-type;x-amz-pay-date, Signature=4164128ec5d1b9da1700167ab2ccda8125f472c8bb9de447cebf5d741ee317c8
    
    X-Amz-Pay-Date: 20190305T024410Z
    Content-type: application/json
    
    POST https://pay-api.amazon.com/live/v1/deliveryTrackers 
    {
        "amazonOrderReferenceId" : "P01-5728498-6728743",
        "deliveryDetails" : [{
        "trackingNumber" : "1Z999AA10123456784",
        "carrierCode" : "UPS"
      }]
    }

Successful response message example

HTTP/1.1 200 OK 
Host: pay-api.amazon.com
Content-type: application/json
{
  "amazonOrderReferenceId" : "P01-5728498-6728743",
  "deliveryDetails" : [{
    "trackingNumber" : "1Z999AA10123456784",
    "carrierCode" : "UPS"
  }]
}

Successful response headers

Header Description
Content-Type application/json

Successful response parameters

Parameter Description Type
amazonOrderReferenceId The order reference ID associated with the order for which the shipments need to be tracked String
trackingNumber The tracking number for the shipment provided by the shipping company String
carrierCode The shipping company used for delivering goods to the customer String

Error response message example

HTTP/1.1 400 Bad Request 
Content-Type: application/json; 
{ 
    "errorCode": "InvalidParameterValue", 
    "errorMessage": " The amazonOrderReferenceId that you submitted in this request is invalid.”
}

Error response parameters

Parameter Description Type
errorCode Machine readable error code String
errorMessage Human-readable error description String

Error response message examples

If there is a problem fulfilling your request, you receive an HTTP error. The error codes for Delivery Tracker API request include:

Status Error code Description
400 InvalidInputFormat The input provided is not in the required format.
400 InvalidParameterValue The [parameterName] parameter is required.
400 InvalidParameterValue The amazonOrderReferenceId that you submitted in this request is invalid.
400 InvalidParameterValue The trackingNumber or carrierCode that you submitted in this request is invalid.
401 UnauthorizedAccess The specified seller account is not authorized to execute this request.
500 InternalServerError There was an unknown error in the service.