Skip to content

Time Bills

Works with time bill records. The TimeBill record is the "raw" time entry record in NetSuite.

Keyset Paging with custparam_afterid

The TimeBills GET endpoint supports keyset paging (also called cursor or continuation-token paging). Instead of asking for "page 5," you ask for "the rows after the last id I saw." This is much faster than offset paging on large tables because the database can jump straight to the cursor position instead of scanning and skipping all the rows before it.

  1. Request the first page with custparam_afterid=0.
  2. Read nextAfterId from the response.
  3. Request the next page with custparam_afterid=<that nextAfterId>.
  4. Repeat until nextAfterId comes back null — that means you've reached the end.

Notes & gotchas

  • Ordering is by internal id, ascending. That order is stable, which is what makes the cursor reliable — new records get higher ids and appear at the end, so an in-progress crawl won't skip or duplicate existing rows.
  • nextAfterId is null only at the true end (when a page comes back with fewer rows than pageSize). A full page always returns a cursor, even if the next request turns out to be empty.
  • custparam_afterid must be a non-negative integer. Anything else returns an INVALID_PARAMETER error.
  • Prefer keyset over offset paging for large or growing result sets — it stays fast no matter how deep into the results you page.

Base URL

https://{{accountid}}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=customscript_prac_api_timebills&deploy=customdeploy_prac_api_timebills_v1

HTTP: GET

Gets the list of time bill records.

Required Parameters

Name Value Notes
script customscript_prac_api_timebills
deploy customdeploy_prac_api_timebills_v1

Optional Parameters

Name Value Notes
custparam_lastmodifieddate {{datetime}} UTC DateTime in the format 'YYYY-MM-DDTHH24:MI:SSZ' for example: '2024-09-20T12:38:32Z'. Passing this parameter will instruct the server to retrieve all records that have been modified AFTER this date.
custparam_subsidiary {{integer}} Limit to this subsidiary (internal ID)
custparam_employee {{integer}} Limit to this employee (internal ID)
custparam_employeecode {{string}} Limit to this employee code (custentity_gvcpa_employeecode)
custparam_tfproject {{integer}} Limit to this taskflow project (internal ID)
custparam_workclient {{integer}} Limit to this work client (internal ID)
custparam_workclientid {{string}} Limit to this work client (entity ID)
custparam_billclient {{integer}} Limit to this billing client (internal ID)
custparam_billclientid {{string}} Limit to this billing client (entity ID)
custparam_afterid {{integer}} Get records after this internal ID. Start with 0 to get the first page.

Response Information

Results are Paged