简体   繁体   中英

Amazon SP-API, Get Report GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING (getReportDocument )

I need help.

I'm trying to get a report (GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING) using the function getReportDocument of the library https://github.com/double-break , but the api return this error:

"errors": [
{
"message": "Access to requested resource is denied.",
"code": "Unauthorized",
"details": ""
}
]
and when we add the path : /reports/2021-06-30/reports, the api return this error :
{
"errors": [
{
"code": "InvalidInput",
"message": "Invalid or unsupported document ID found",
"details": ""
}
]
}

Here are all our app authorization: https://prnt.sc/SR840DY3LRt1

Selling Partner Insights
Amazon Fulfillment
Pricing
Finance and Accounting
Product Listing
Inventory and Order Tracking
Direct-to-Consumer Shipping
Tax Remittance
Tax Invoicing

This is our code to call the function getRdtCredentials:

$cred = $credentials->getRdtCredentials([
'restrictedResources' => [
[
'method' => 'GET',
'path' => '/orders/v0/orders'
],
[
'method' => 'GET',
'path' => '/orders/v0/orders/{orderId}/orderItems'
],
[
'method' => 'GET',
'path' => '/orders/v0/orders/{orderId}/address'
],
[
'method' => 'GET',
'path' => '/orders/v0/orders/{orderId}/buyerInfo'
],
// [
// 'method' => 'GET',
// 'path' => '/reports/2021-06-30/reports'
// ]
]
]);

$request = new Reports($cred, $config);
$reportDocumentId = $params['reportDocumentId'];
$reports = $request->getReportDocument($reportDocumentId)

I really appreciate your help

Thank you.

Freddy Urbina Could you please kindly tell me how to get PII access? actually I need to get buyer's information in order api in amazon selling partner api

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM