how do i search for salesorders using the rest api...
# ask-stanley-ai
v
how do i search for salesorders using the rest api by external_id
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To search for SalesOrders using the REST API by
external_id
, you would need to perform a search operation. The
external_id
is not directly used to load or create records, but it can be used to find the associated internal ID. Here's a general idea of how you can do it: 1. Use the
GET /record/v1/salesOrder
endpoint to retrieve a list of sales orders. 2. Add a query parameter to filter by
external_id
. The parameter should look something like this:
?q=externalId ANY_OF '["your_external_id"]'
Please note that the
external_id
should be replaced with the actual external ID you're searching for. Remember that the REST API will return a list of sales orders that match the query. If the
external_id
is unique, you should only get one result. From there, you can extract the internal ID or any other information you need from the sales order. Also, please note that the REST API is case sensitive, so make sure to use the correct case when specifying field names and operators.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846549869
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811022401
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808842301
Please provide your feedback on this answer.