curl --request POST \
--url https://sandbox.nmbr.co/services/payroll/accounting_codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"business_entity_id": "<id>",
"title": "Expense Code",
"type": "expense",
"code": "5100"
}
'import requests
url = "https://sandbox.nmbr.co/services/payroll/accounting_codes"
payload = {
"business_entity_id": "<id>",
"title": "Expense Code",
"type": "expense",
"code": "5100"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
business_entity_id: '<id>',
title: 'Expense Code',
type: 'expense',
code: '5100'
})
};
fetch('https://sandbox.nmbr.co/services/payroll/accounting_codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.nmbr.co/services/payroll/accounting_codes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'business_entity_id' => '<id>',
'title' => 'Expense Code',
'type' => 'expense',
'code' => '5100'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.nmbr.co/services/payroll/accounting_codes"
payload := strings.NewReader("{\n \"business_entity_id\": \"<id>\",\n \"title\": \"Expense Code\",\n \"type\": \"expense\",\n \"code\": \"5100\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.nmbr.co/services/payroll/accounting_codes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"business_entity_id\": \"<id>\",\n \"title\": \"Expense Code\",\n \"type\": \"expense\",\n \"code\": \"5100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.nmbr.co/services/payroll/accounting_codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business_entity_id\": \"<id>\",\n \"title\": \"Expense Code\",\n \"type\": \"expense\",\n \"code\": \"5100\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<id>",
"object": "accounting_code",
"data": {
"business_entity": {
"id": "<id>",
"object": "business_entity",
"links": {
"self": "/business_entities/<id>"
}
},
"type": "expense",
"code": "5100",
"title": "Expense Code",
"title_translations": null,
"title_translated": "Expense Code",
"description": null,
"description_translations": null,
"description_translated": null,
"mapping": {
"xero": false,
"quickbooks": false
},
"fallback_mappings": [],
"created_at": "2026-01-01T00:00:00.000000Z",
"updated_at": "2026-01-01T00:00:00.000000Z"
},
"links": {
"self": "/accounting_codes/<id>"
}
}Create an accounting code
curl --request POST \
--url https://sandbox.nmbr.co/services/payroll/accounting_codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"business_entity_id": "<id>",
"title": "Expense Code",
"type": "expense",
"code": "5100"
}
'import requests
url = "https://sandbox.nmbr.co/services/payroll/accounting_codes"
payload = {
"business_entity_id": "<id>",
"title": "Expense Code",
"type": "expense",
"code": "5100"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
business_entity_id: '<id>',
title: 'Expense Code',
type: 'expense',
code: '5100'
})
};
fetch('https://sandbox.nmbr.co/services/payroll/accounting_codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.nmbr.co/services/payroll/accounting_codes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'business_entity_id' => '<id>',
'title' => 'Expense Code',
'type' => 'expense',
'code' => '5100'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.nmbr.co/services/payroll/accounting_codes"
payload := strings.NewReader("{\n \"business_entity_id\": \"<id>\",\n \"title\": \"Expense Code\",\n \"type\": \"expense\",\n \"code\": \"5100\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.nmbr.co/services/payroll/accounting_codes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"business_entity_id\": \"<id>\",\n \"title\": \"Expense Code\",\n \"type\": \"expense\",\n \"code\": \"5100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.nmbr.co/services/payroll/accounting_codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business_entity_id\": \"<id>\",\n \"title\": \"Expense Code\",\n \"type\": \"expense\",\n \"code\": \"5100\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<id>",
"object": "accounting_code",
"data": {
"business_entity": {
"id": "<id>",
"object": "business_entity",
"links": {
"self": "/business_entities/<id>"
}
},
"type": "expense",
"code": "5100",
"title": "Expense Code",
"title_translations": null,
"title_translated": "Expense Code",
"description": null,
"description_translations": null,
"description_translated": null,
"mapping": {
"xero": false,
"quickbooks": false
},
"fallback_mappings": [],
"created_at": "2026-01-01T00:00:00.000000Z",
"updated_at": "2026-01-01T00:00:00.000000Z"
},
"links": {
"self": "/accounting_codes/<id>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
255The type of accounting code.
bank, expense, liability The accounting code identifier as it appears in the chart of accounts.
255Line Item type/subtype pairs that default to this accounting code when no specific mapping is configured. Each entry contains type and subtype.
Must be an array of valid type and subtype pairs
The combination of type and subtype must be unique within the business entities accounting codes, for the same accounting code type.
Hide child attributes
Hide child attributes
The type of accounting code.
allowance, deduction, earning, employee_benefit, employer_benefit, employer_statutory_withholding, reimbursement, statutory_withholding accident_insurance_plan, automobile_and_motor_vehicle, bonus_discretionary, bonus_non_discretionary, bonus_non_taxable, cell_phone_allowance, charitable_donation, child_care_expenses, child_eduction_non_taxable, child_eduction_taxable, clothing_non_taxable, clothing_taxable, commission, commission_periodic, commission_self_employed, cpp, cpp_2, critical_illness, death_benefit, debt_relief, dental, education_and_professional_development, eht, ei, employee_assistance_program, federal_income_tax, fondaction, fondaction_rrsp, fonds_solidarite_ftq, fonds_solidarite_ftq_rrsp, garnishment_order, gift_cash, gift_near_cash, gift_non_cash_non_taxable, gift_non_cash_taxable, gratuity, group_dependent_life_insurance, group_term_life_insurance, health, health_spending_account, housing_allowance_cash, in_lieu_wages, income_replacement_indemnity_non_taxable, income_replacement_indemnity_taxable, income_tax, internet_allowance, invoice_payment, invoice_sales_tax, leave_bereavement, leave_citizenship, leave_domestic_and_sexual_violence, leave_general, leave_jury_duty, leave_maternity, leave_organ_donor, leave_parental, leave_paternity, leave_personal, leave_sick, leave_voting, leave_wedding, long_term_disability, meals_subsidized_non_cash, meals_taxable, moving_allowance_non_taxable, moving_allowance_taxable, municipal_officers_expense, non_group_long_term_disability, non_group_short_term_disability, non_taxable_allowance, non_taxable_reimbursement, other_deduction, overtime, overtime_meals_non_taxable, parental_top_up_insurable, parental_top_up_non_insurable, parking, parking_allowance, pension, pension_dbpp, pension_dcpp, pension_mfpp, pension_prpp, pension_restricted_rrsp, pension_rrsp, pension_rrsp_non_periodic, pension_unregistered_prpp, pension_vrsp, professional_membership, professional_membership_dues_taxable, profit_sharing_dpsp, provincial_income_tax, qpip, qpp, qpp_2, retiring_allowance, retiring_allowance_eligible, retroactive_pay, retroactive_pay_increase, salary, salary_continuance, savings_tfsa, second_opinion_medical_consultation, severance_pay, short_term_disability, social_event_allowance, statutory_holiday_pay, supplemental_unemployment, taxable_cash_allowance, taxable_reimbursement, territorial_income_tax, tools_allowance, transit_pass, transportation_to_from_work, travelling_allowance_non_taxable, travelling_allowance_taxable, union_dues, union_dues_post_tax, utilities_allowance, vacation_accrual_adjustment, vacation_pay, vacation_pay_employee_terminated, vacation_pay_no_time_taken, vacation_pay_time_taken, vehicle_allowance_non_taxable, vehicle_employer_provided, virtual_health_service, wage, wcb, wellness_spending_account Response
Created
The unique identifier of the object in Nmbr.
The type of the object in Nmbr ("accounting_code").
Hide child attributes
Hide child attributes
The type of accounting code.
bank, expense, liability The accounting code identifier as it appears in the chart of accounts.
255255The translation of the title property for the request locale. Computed using the values in title and title_translations and the value of the request's Accept-Language header.
The translation of the description property for the request locale. Computed using the values in description and description_translations and the value of the request's Accept-Language header.
Line Item type/subtype pairs that default to this accounting code when no specific mapping is configured. Each entry contains type and subtype.
The date and time the object was created in Nmbr.
The date and time the object was last updated in Nmbr.

