I receive a 401 when creating a webhook with ORDER_ITEM_****
in the event-types for a test merchant.
The principal does not have read access to the resource: /orders/items
I do NOT see this error and can successfully create a webhook with ORDER_****
.
ORDER_ITEM_ORDERED
-> fails
#----- Request
poynt.Hook.create_hook(
****
event_types=['ORDER_ITEM_ORDERED'])
#----- Response
({'code': 'UNAUTHORIZED_ACCESS',
'developerMessage': 'The principal does not have read access to the resource: /orders/items',
'httpStatus': 401,
'message': 'Access not authorized for the requested resource.',
'requestId': 'de25de1d-334d-401f-a7b7-970dbb5ea050'},
401)
ORDER_OPENED
-> succeeds
poynt.Hook.create_hook(
****
event_types=['ORDER_OPENED']
)
Out[12]:
({ ****** }, 201)
Under Developer > Apps > [My App] > Cloud Permissions, I selected all permissions, saved, then granted permissions to my test merchant.
I notice there are permissions for Orders
, not OrderItems
– I assume Orders would contain OrderItems though??