Hello All, I am trying to pull the invoices using...
# general
m
Hello All, I am trying to pull the invoices using rest api based on trandate or created date in the query parameter. But I am getting invalid query parameter error as shown in the snapshot below. Could someone please help me where I am doing wrong? I am very new to Netsuite. Thank you.
b
m
I think this is for format we should use while setting the datetime values..I am working on pulling the invoices based on date in query parameter
b
whats the url you are doing the get on
b
double quote the date
m
Yeah I tried that but it gives me encode url error as below
message has been deleted
b
are you manually encoding the query?
or are you using a library
m
I am not encoding it using library..i just replace the spaces in query with +
It’s working fine for filtering with other fields but not with date.
b
strictly speaking, your spaces are supposed to be %20
the + is used with form url encoding
its common enough that url parsing code handles both
but you should be using a library to handle encoding your query parameters
you need to encode the spaces, the quotes, and the forward slashes
m
I am not really familiar with the encoding. It would be really helpful if you could give me any sample methods to do that.
I got it..thank you so much
I was encoding whole url instead of just query. Encoded the query using urlib library and it worked fine
Thanks for the help. I really appreciate it.