My objective is to develop an application that retrieves orders and customer data from Amazon. I submitted a request to Amazon for access to information such as customer addresses and shipping details, which was approved, granting me a Restricted Data Token (RDT). However, I am encountering an issue where the RDT token is not providing the desired customer address and shipping information.
curl --location 'https://sellingpartnerapi-eu.amazon.com/tokens/2021-03-01/restrictedDataToken' \
--header 'x-amz-access-token: {myToken}' \
--header 'Content-Type: application/json' \
--data '{
"restrictedResources": [
{
"method": "GET",
"path": "/orders/v0/orders",
"dataElements": {"buyerInfo": "", "shippingAddress": ""}
}
]
}
I tried using "dataElements": ["buyerInfo", "shippingAddress"] but the problem still persist.
To retrieve my orders, I use the following endpoint:
curl --location 'https://sellingpartnerapi-eu.amazon.com/orders/v0/orders?MarketplaceIds=A13V1IB3VIYZZH&CreatedAfter=2023-09-04' \
--header 'x-amz-access-token: {myRDT}'
However, the resulting payload shows empty BuyerInfo and no shipping address:
{
"payload": {
"Orders": [
{
"BuyerInfo": {},
"AmazonOrderId": "171-1216727-6611533",
"EarliestShipDate": "2023-09-07T22:00:00Z",
"SalesChannel": "Amazon.fr",
"AutomatedShippingSettings": {
"HasAutomatedShippingSettings": false
}
// ... Additional order details
}
]
}
}
Would you have any ideas please ?