Paycheck

A paycheck record exposes a paycheck to REST web services.

This record:

The REST API Browser includes information about the field names and field types of the paycheck record, and about the HTTP methods, request parameters, and operations available to this record. For details, see the REST API Browser’s paycheck reference page.

For information about using the REST API Browser, see The REST API Browser.

Record ID

The record ID for the paycheck REST record is paycheck.

Prerequisites

Before you can use this record with REST web services, you must enable the following features:

  • REST Web Services

  • Token-Based Authentication

  • Client SuiteScript

  • Server SuiteScript

  • Payroll

Inaccessible Elements

Reversed paychecks and paycheck adjustments do not appear in the REST web services paycheck list. However they can be accessed by an administrator by appending the paycheck ID directly at the end of the URL request.

Note:

A known issue exists in which an employee with REST permissions can see a paycheck with a future check date in the paycheck list when the Paychecks Visible to Employees setting is set to On Check Date.

The following subrecords are not exposed in REST:

  • payComm

  • payExp

Elements with Different Functionality

The following sublists are editable:

  • payContrib

  • payDeduct

  • payEarn

Other sublists are not editable.

The editing of some of this record's subrecords and sublists works differently.

  • payExp: When you edit a line item in the UI, the "Apply" checkbox can be unchecked. If the line is unchecked, the line is removed when you save. Through REST web services, this functionality is not available.

  • payPto: This sublist is not returned when querying /services/rest/record/v1/paycheck/{id}. To retrieve this record, the user needs to query /services/rest/record/v1/paycheck{id}/payPto.

    payTime: When you edit a line item in the UI, the "Apply" checkbox can be unchecked. If the line is unchecked, the line is removed when you save. Through REST web services, this functionality is not available.

Actions

The paycheck record accessed through REST web services can be edited and deleted. Accessing paycheck records through REST web services will give you information in a different format and include more detailed information about the paycheck entries. Examples include:

  • The inclusion internal IDs of the payitems shown on the paycheck record

  • The display of residential, editability and exemption status of taxes

  • The display of REST reference URLs of subresources returned in the request

  • A check date in the following format: “2023-10-23T19:12:00Z”

  • Number of total results in the requested record

Elements Related to Taxation Features

Note:

REST web services do not support legacy tax features. To work with taxation through REST web services, you must have the SuiteTax feature enabled. For more information about using SuiteTax, see SuiteTax.

Fields on the paycheck record are related to payrolltaxes and to the ANYPAYROLL feature.

the payTax sublist represents a list of taxes on the paycheck.

Additional Details

Appending "?expandSubResources=True" to the end of an individual paycheck request URL expands the obtained subresources' details.

Code Sample

The following code shows how to access the list of paycheck records:

            https://123456.suitetalk.api.netsuite.com/services/rest/record/v1/paycheck 

          

The following code shows how to access a specific paycheck by ID (123):

            https://123456.suitetalk.api.netsuite.com/services/rest/record/v1/paycheck/123 

          

The following code shows how to access a specific paycheck by ID (123), expanding the subresources returned in the response:

            https://123456.suitetalk.api.netsuite.com/services/rest/record/v1/paycheck/123?expandSubResources=True 

          

The following code shows how to get a paycheck by ID (304):

            {
   "name": "Example 3.6: Get Paycheck",
   "request": {
      "method": "GET",
      "header": [
         {
            "key": "Content-Type",
            "name": "Content-Type",
            "value": "application/json",
            "type": "text"
         },
         {
            "key": "Accept",
            "value": "application/swagger+json",
            "type": "default",
            "disabled": true
         }
      ],
      "body": {
         "mode": "raw",
         "raw": ""
      },
      "url": {
         "raw": "{{COMPANY_URL}}/services/rest/record/v1/paycheck/304/?expandSubResources=true",
         "host": [
            "{{COMPANY_URL}}"
         ],
         "path": [
            "services",
            "rest",
            "record",
            "v1",
            "paycheck",
            "304",
            ""
         ],
         "query": [
            {
               "key": "expandSubResources",
               "value": "true"
            }
         ]
      }
   }
} 

          

The following code shows how to update a paycheck by ID (606):

            {
   "name": "Example 3.5: Update paycheck memo",
   "request": {
      "method": "PATCH",
      "header": [
         {
            "key": "Content-Type",
            "name": "Content-Type",
            "value": "application/json",
            "type": "text"
         }
      ],
      "body": {
         "mode": "raw",
         "raw": "{\"memo\": \"new memo\"}"
      },
      "url": {
         "raw": "{{COMPANY_URL}}/services/rest/record/v1/paycheck/606",
         "host": [
            "{{COMPANY_URL}}"
         ],
         "path": [
            "services",
            "rest",
            "record",
            "v1",
            "paycheck",
            "606"
         ]
      }
   }
} 

          

The following code shows how to delete a paycheck by ID (705):

            {
    "name": "Example 2.4: Remove Paycheck",
    "request": {
        "method": "DELETE",
        "header": [],
        "body": {
            "mode": "raw",
            "raw": ""
        },
        "url": {
            "raw": "{{COMPANY_URL}}/services/rest/record/v1/paycheck/705",
            "host": [
                "{{COMPANY_URL}}"
            ],
            "path": [
                "services",
                "rest",
                "record",
                "v1",
                "paycheck",
                "705"
            ]
        }
    }
} 

          

Related Topics

General Notices