Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Access PII Data in getOrder Method in v7.1.1 #780

Open
TanveerCedcoss opened this issue Sep 11, 2024 · 1 comment
Open

Cannot Access PII Data in getOrder Method in v7.1.1 #780

TanveerCedcoss opened this issue Sep 11, 2024 · 1 comment

Comments

@TanveerCedcoss
Copy link

Problem description:

In the new version v7 of the jlevers SP-API, I am unable to access Personally Identifiable Information (PII) data using the getOrders method. In v5, this was achievable by specifying data_elements (e.g., ['buyerInfo', 'shippingAddress']), but now key fields like buyerName, BuyerCustomizedInfo, CustomizedURL, and addressLine1, addressLine2, addressLine3 in shippingAddress are missing in the response.

Error:

Missing fields: buyerName, BuyerCustomizedInfo, CustomizedURL, addressLine1, addressLine2, addressLine3 in the API response when calling getOrders in version v7.

Code

$dataElements = ['buyerInfo', 'shippingAddress'];

$connector = SellingPartnerApi::seller(
    clientId: $clientCredentilas['clientId'],
    clientSecret:  $clientCredentilas['clientSecret'],
    refreshToken: $refreshToken,
    endpoint: $endpoint,
    cache: $tokenCache,
    dataElements: $dataElements
);

$orderData = $connector->OrdersV0()->getOrder($orderId)->json();
@apolitano1
Copy link

Remove the parameter $tokenCache when calling SellingPartnerApi::seller

The 5th parameter of that function is dataElements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants