amazon sp api update verification status of order

0

I am using sp api for php written by jlevers. Here is the link: https://github.com/jlevers/selling-partner-api/blob/main/docs/Api/OrdersV0Api.md#updateVerificationStatus


I want to update verification status of order. Here is the code:

$apiInstance = new \SellingPartnerApi\Api\OrdersV0Api($config);

$data1 = [ 'status'=>\SellingPartnerApi\Model\OrdersV0\VerificationStatus::APPROVED, // 'external_reviewer_id' => "reviewer1234", // How can I get this external_reviewer_id ? ]; $requestBody = new \SellingPartnerApi\Model\OrdersV0\UpdateVerificationStatusRequestBody($data1);

$data2 = [ 'regulated_order_verification_status'=>$requestBody, ]; $payload = new \SellingPartnerApi\Model\OrdersV0\UpdateVerificationStatusRequest($data2);

try { $result = $apiInstance->updateVerificationStatus($order_id, $payload); } catch (Exception $e) { echo 'Exception when calling OrdersV0Api->updateVerificationStatus: ', $e->getMessage(), PHP_EOL; }


This is the $payload object.

SellingPartnerApi\Model\OrdersV0\UpdateVerificationStatusRequest Object ( [container:protected] => Array ( [regulated_order_verification_status] => SellingPartnerApi\Model\OrdersV0\UpdateVerificationStatusRequestBody Object ( [container:protected] => Array ( [status] => Approved [external_reviewer_id] => [rejection_reason_id] => )

            )

    )

)


My queries are:

  1. How can I get this external_reviewer_id ?

  2. I am getting this exception on running above code ? How to fix this exception? All of my credentials including token are correct.

SellingPartnerApi \ ApiException (403) [403] { "errors": [ { "message": "Access to requested resource is denied.", "code": "Unauthorized", "details": "" } ] }


1개 답변
0

This forum is intended to support customers using Amazon Web Services. The API you're asking about is run by Amazon Retail so unfortunately well out of the guidance and expertise that we can offer.

I'd suggest looking at the API documentation and using the Support link on that page.

profile pictureAWS
전문가
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠