Creating a Sale via Retail API - Invalid foreign keys for Item

I'm attempting to create a Sale via retail API with a POST request, Invalid foreign keys for Item: 210000010698'
keeps getting returned.
Below is the error returned from lightspeed api,
Below is the request body appended to the POST request
Above is the actual code executing the request
Below is the parameters passed to the "createSale" function which invocke the lightspeed POST request
Any help is greatly appreciated, Thank you
Post edited by bern on
Tags:
3 comments
Isn't there a typo where it says UnityQuantity? 😀
Hope this was the easy fix!
@bern was your issue fixed?
Also, why not use a promised based library such as Axios? It will save you from needing to wrap your own function calls with the promise object
Adrian Samuel
Software Developer
Lightspeed HQ