"403 forbidden" even though rights seem correct

SomeDeveloperSomeDeveloper Member Posts: 2

We provide warehouse management for webshops, and some of our customers manage their webshop with lightspeed.

For those customers we do stock syncs when stock of their products is adjusted.

To do this we queue the products to sync and then we call the end-point:

https://{AppKey}:{AuthInfo}@api.webshopapp.com/{Language}/variants/bulk.json

However from time to time this fails with a 403 forbidden response. (seemingly randomly though usually it then starts a streak of fails)

The weird thing is that we've seen cases where 5 minutes later we do the call again for exactly the same variants and then it succeeds.

Also since it implies a right problem I've verified our rights right after a failed call and received a result that implies that, even though we receive a forbidden, it's not a rights issue:

{

    "accountPermissions": {

        "products": {

            "read": true,

            "write": true

        },

        "customers": {

            "read": true,

            "write": true

        },

        "orders": {

            "read": true,

            "write": true

        }

    }

}

(After this call the next call failed with a forbidden as well)

Furthermore we notice that if we manually split the bulk update into smaller chunks most of them succeed. However it's trial and error to determine what will succeed and what not.

It gets especially bad when we onboard a new customer since that will result in large bulk sets.

So what's going on here?

Thanks for reading, have an amazing day!

1 comment

  • Ali_MasoumieAli_Masoumie Moderator, Lightspeed Staff Posts: 348 moderator
    edited March 2021

    Hi,

    I will make a support ticket and ask you for some additional information to investigate this issue further.

Sign In or Register to comment.