Item API Questions

drancourdrancour Posts: 8Member
Hello!

I am working on an Items integration - 2 questions:

* I’m trying to call the PriceLevel XML endpoint but I’m getting “Insufficient Rights”. I have authorized the Access Scopes below but apparently these don't cover it..?

employee:register
employee:inventory
employee:customers
employee:admin

* When I'm doing a POST to create an Item, can I create more than 1 item at a time or am I limited to one item per call?

thanks!

4 comments

  • drancourdrancour Posts: 8Member
    Update: I have authorized my app for all access scopes and I still get insufficient rights when I call the PriceLevel XML endpoint. This is an issue because I have to provide the PriceLevel ID in the ItemPrice node. Please let me know what I need to do in order to call this endpoint.

    https://api.merchantos.com/API/Account/accountIdHere/PriceLevel.xml

    ---------------------------

    ---------------------------
    <?xml version="1.0"?>
    <Error><httpCode>403</httpCode><httpMessage>Forbidden</httpMessage><message>Not Authorized: Insufficient rights to perform the request</message><errorClass>InsufficientRightsError</errorClass></Error>
    ---------------------------
    OK
    ---------------------------
  • jamesratcliffejamesratcliffe Posts: 160Administrator, Lightspeed Staff moderator
    Hi Dave,

    The token scope you need for that endpoint is 'employee:admin'.

    The employee privileges also determine your token's access. The employee connected to the token has to have the 'Settings - Basic' privilege, or you won't be able to use this endpoint.
    James Ratcliffe
    Lightspeed HQ
  • drancourdrancour Posts: 8Member
    This was 100% my fault - after revoking all refresh/access tokens I was still getting the error. I discovered an invalid DB connection string in my application pulling the token data from the wrong database. After I corrected this the call worked as expected.

    Sorry for the confusion and thank you for the quick response!
  • jamesratcliffejamesratcliffe Posts: 160Administrator, Lightspeed Staff moderator
    Oops! That will do it.

    We're working on adding the necessary scopes and privileges for each endpoint to the documentation.
    James Ratcliffe
    Lightspeed HQ
Sign In or Register to comment.