Skip to main content
POST
/
accounting_code_rules
Create an accounting code rule
curl --request POST \
  --url https://sandbox.nmbr.co/services/payroll/accounting_code_rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "business_entity_id": "<id>",
  "tag_id": "<id>",
  "type": "earning",
  "subtype": "wage",
  "expense_accounting_code_id": "<id>",
  "liability_accounting_code_id": "<id>"
}
'
{
  "id": "<id>",
  "object": "accounting_code_rule",
  "data": {
    "business_entity": {
      "id": "<id>",
      "object": "business_entity",
      "links": {
        "self": "/business_entities/<id>"
      }
    },
    "tag_group": {
      "id": "<id>",
      "object": "tag_group",
      "links": {
        "self": "/tag_groups/<id>"
      }
    },
    "tag": {
      "id": "<id>",
      "object": "tag",
      "links": {
        "self": "/tags/<id>"
      }
    },
    "type": "earning",
    "subtype": "wage",
    "business_preset": null,
    "expense_accounting_code": {
      "id": "<id>",
      "object": "accounting_code",
      "links": {
        "self": "/accounting_codes/<id>"
      }
    },
    "liability_accounting_code": {
      "id": "<id>",
      "object": "accounting_code",
      "links": {
        "self": "/accounting_codes/<id>"
      }
    },
    "created_at": "2026-01-01T00:00:00.000000Z",
    "updated_at": "2026-01-01T00:00:00.000000Z"
  },
  "links": {
    "self": "/accounting_code_rules/<id>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
business_entity_id
string
required
tag_group_id
string

A tag group to scope this rule to. When set without tag_id, creates a tag-group-level rule that applies to all tags in the group.

tag_id
string

A tag from the business entity's accounting code tag group. Optional — when omitted, the rule matches line items by type/subtype or business_preset_id alone.

type
enum<string>

The line item type to scope this rule to (e.g. earning, deduction). Mutually exclusive with business_preset_id.

Available options:
allowance,
deduction,
earning,
employee_benefit,
employer_benefit,
employer_statutory_withholding,
reimbursement,
statutory_withholding
subtype
string | null

The line item subtype to further scope this rule (e.g. wage, salary). Requires type to be set.

business_preset_id
string

A business preset to scope this rule to. Provides the highest specificity match. Mutually exclusive with type and subtype.

When both tag_id and tag_group_id are omitted, either type or business_preset_id must be set.

expense_accounting_code_id
string
liability_accounting_code_id
string

Response

201 - application/json

Created

id
string
read-only

The unique identifier of the object in Nmbr.

object
string
read-only

The type of the object in Nmbr ("accounting_code_rule").

data
Accounting Code Rule · object