Use Case for Fetching Invoices from a Lead Source
To fetch invoices from a lead source, query the lead source's ID in the request.
GET {{REST_SERVICES}}/record/v1/invoice/?q=leadsource EQUAL "-4"
In the response body, you will get all the invoices from the requested lead source.
{
"links": [
{
"rel": "self",
"href": "https://<accountID>.suitetalk.api.netsuite.com/services/rest/record/v1/invoice/?q=leadsource+EQUAL+%22-4%22"
}
],
"count": 2,
"hasMore": false,
"items": [
{
"links": [
{
"rel": "self",
"href": "https://<accountID>.suitetalk.api.netsuite.com/services/rest/record/v1/invoice/1109"
}
],
"id": "1109"
},
{
"links": [
{
"rel": "self",
"href": "https://<accountID>.suitetalk.api.netsuite.com/services/rest/record/v1/invoice/1115"
}
],
"id": "1115"
}
],
"offset": 0,
"totalResults": 2
}