sp-api-sdk
sp-api-sdk copied to clipboard
Vendor/OrdersSDK should return a VendorOrdersSDK
https://github.com/amazon-php/sp-api-sdk/blob/bccf34ac00d998429cd5a857bee745120043f3c7/src/AmazonPHP/SellingPartner/VendorSDK.php#L59-L62
If I understand correctly, this should actually return a VendorOrdersSDK instance instead of a VendorDirectFulfillmentOrdersSDK:
public function ordersSDK() : VendorOrdersSDKInterface
{
return $this->instantiateSDK(VendorOrdersSDK::class);
}
To be completely honest, I couldn't quite figure out yet what exactly the difference is, but according to the documentation, the VendorOrders namespaces has more specific usecases and uses a different endpoint path. I monkeypatched the code locally, but keep getting unauthorized responses (while calling the top level OrdersSDK directly works fine).