Error creating SKU (access rights issue?)

I have the code working smoothly on one client (3PL account), but for a new client the same code gives me the following error when it tries to create a new SKU:
{"errors":[{"message":"Cannot access the requested resource. Permission denied","operation":"product_create","field":"product_create","request_id":"6255bd21ba90ad66f3350e6d","code":9}],"data":{"product_create":null}}
Looks like an access rights issue - where should I look to fix this please?
Thank you!

Hello @Raj!

I checked that request-id, and it is being sent with a user from a child account and with customer_account_id from another child account.

If you want to create the product in the second child account, you will need to either use a user account that belongs to it or use a user from the 3PL using the customer_account_id field as you are doing now.

Please let me know if you require further help.
Kind regards,

Thank you @tomasfd, very helpful!
I was able to fix that issue and all the SKUs were created successfully - but there’s a strange issue now. A SKU that exists is giving me a ‘SKU does not exist error’ and preventing me from creating a Purchase Order!

Here’re details of that SKU creation:
{"data":{"product_create":{"request_id":"6256f2586c4baa616fb648f9","complexity":10,"product":{"id":"UHJvZHVjdEluZm86Mjg4MjU2Mzc0","legacy_id":288256374,"account_id":"QWNjb3VudDo2NjU1Nw==","name":"Vans + Mooneyes - Authentic 44 DX (Anaheim Factory Yellow)-13","sku":"VN0A5KX4AVQ1-13","price":null,"value":null,"barcode":"840235463825","country_of_manufacture":"US","dimensions":{"weight":"0.0031 lb","height":null,"width":null,"length":null},"tariff_code":"392620","kit":false,"kit_build":false,"no_air":false,"final_sale":false,"customs_value":"0.0000","customs_description":null,"not_owned":false,"dropship":false,"created_at":"2022-04-13T15:55:04"}}}}

And here’s the error I’m getting because of that same SKU:
{"errors":[{"message":"Product with SKU 'VN0A5KX4AVQ1-13' does not exist","operation":"purchase_order_create","field":"purchase_order_create","request_id":"6256f46a68d4512264975df6","code":9}],"data":{"purchase_order_create":null}}

Could you pls help?

Hi @tomasfd did you maybe get a chance to look in the above issue? Thank you

Helo @Raj!

Yes, this PO is being created with a user from the 3PL account, you will need to specify which child account you need to create it in using customer_account_id field.

Kind regards,

That fixed it, thank you @tomasfd! Though it’s interesting that omitting that field was never a problem with the other client I was using it so far with!

Hello @Raj!

Were you using it with a user that belongs to the child account? Maybe it was that. That field is used when using a 3PL account and want to make a change in a specific Child Account.

Kind regards,

@tomasfd I think that was it! Yes that makes sense, thank you for clarifying!

1 Like