curl --request POST \
--url https://sandbox.nmbr.co/services/payroll/accounting_codes/{accounting_code}/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounting_code_ids": [
"<string>"
]
}
'import requests
url = "https://sandbox.nmbr.co/services/payroll/accounting_codes/{accounting_code}/merge"
payload = { "accounting_code_ids": ["<string>"] }
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({accounting_code_ids: ['<string>']})
};
fetch('https://sandbox.nmbr.co/services/payroll/accounting_codes/{accounting_code}/merge', 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/{accounting_code}/merge",
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([
'accounting_code_ids' => [
'<string>'
]
]),
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/{accounting_code}/merge"
payload := strings.NewReader("{\n \"accounting_code_ids\": [\n \"<string>\"\n ]\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/{accounting_code}/merge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounting_code_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.nmbr.co/services/payroll/accounting_codes/{accounting_code}/merge")
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 \"accounting_code_ids\": [\n \"<string>\"\n ]\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": "9916",
"title": "Vitae error architecto sint.",
"title_translations": null,
"title_translated": "Vitae error architecto sint.",
"description": "Vitae error architecto sint velit tempora illo itaque consequuntur omnis ratione esse sint.",
"description_translations": null,
"description_translated": "Vitae error architecto sint velit tempora illo itaque consequuntur omnis ratione esse sint.",
"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>"
}
}Merge accounting codes
Merge manual generated accounting codes into other codes. A manual code is any code that has no xero_id or quickbooks_id, which indicates it was imported from an external accounting platform. The manual codes will be deleted after reassignment, with all references to them updated to the target accounting code.
curl --request POST \
--url https://sandbox.nmbr.co/services/payroll/accounting_codes/{accounting_code}/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounting_code_ids": [
"<string>"
]
}
'import requests
url = "https://sandbox.nmbr.co/services/payroll/accounting_codes/{accounting_code}/merge"
payload = { "accounting_code_ids": ["<string>"] }
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({accounting_code_ids: ['<string>']})
};
fetch('https://sandbox.nmbr.co/services/payroll/accounting_codes/{accounting_code}/merge', 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/{accounting_code}/merge",
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([
'accounting_code_ids' => [
'<string>'
]
]),
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/{accounting_code}/merge"
payload := strings.NewReader("{\n \"accounting_code_ids\": [\n \"<string>\"\n ]\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/{accounting_code}/merge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounting_code_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.nmbr.co/services/payroll/accounting_codes/{accounting_code}/merge")
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 \"accounting_code_ids\": [\n \"<string>\"\n ]\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": "9916",
"title": "Vitae error architecto sint.",
"title_translations": null,
"title_translated": "Vitae error architecto sint.",
"description": "Vitae error architecto sint velit tempora illo itaque consequuntur omnis ratione esse sint.",
"description_translations": null,
"description_translated": "Vitae error architecto sint velit tempora illo itaque consequuntur omnis ratione esse sint.",
"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.
Path Parameters
Body
An array of one or more accounting code IDs to be removed from the system, with all references to them updated to the accounting code in the resource path. All accounting codes in this array must be of the same type as the accounting code in the resource path, and must belong to the same business entity.
Response
OK
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.

