Hi Professionals! I am definitely not a profession...
# general
o
Hi Professionals! I am definitely not a professional, but working on an integration with NetSuite for a project. Got the REST API tutorial working nicely, and can grab invoice and customer data. But I cannot figure out how to filter the endpoint
Copy code
{{REST_SERVICES}}/record/v1/invoice
for a customer (entity) via the q filter. I thought
Copy code
{{REST_SERVICES}}/record/v1/invoice?q=entity EQUAL '2831669'
would work, or entityid or entity.id- but no love. Appreciate any guidance. Assume it should be easy but as new to NetSuite... no luck! (posted here: https://netsuiteprofessionals.com/blog/question/filter-invoices-by-customer-entity-on-rest-api/)
b
you are using the equal query operator
which is used for numbers
and then comparing it to a string (which is supposed to be double quotes)
use numbers with number type query operators
o
double quote marks.. that gets a different error {{REST_SERVICES}}/record/v1/invoice?q=entity IS "2831669" "detail": "Invalid search query. Detailed unprocessed description follows. Search error occurred: Operator IS is not valid for given search filter.",
but... now... {{REST_SERVICES}}/record/v1/invoice?q=entity EQUAL "2831669" Works!
so your suggestion of ' vs " works - we got there 😄