Skip to main content
POST
/
accounting_code_rules
/
search
Search accounting code rules
curl --request POST \
  --url https://sandbox.nmbr.co/services/payroll/accounting_code_rules/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "business_entity_id": "<id>",
  "expense_accounting_codes": {
    "include": [
      "<id>"
    ]
  },
  "any_of": [
    {
      "tag_groups": {
        "include": [
          "<id>"
        ]
      },
      "has_tag": true
    },
    {
      "types": {
        "include": [
          "earning"
        ]
      }
    }
  ]
}
'
{
  "object": "list",
  "data": [
    {
      "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": null,
        "subtype": null,
        "business_preset": null,
        "expense_accounting_code": {
          "id": "<id>",
          "object": "accounting_code",
          "links": {
            "self": "/accounting_codes/<id>"
          }
        },
        "liability_accounting_code": null,
        "created_at": "2026-01-01T00:00:00.000000Z",
        "updated_at": "2026-01-01T00:00:00.000000Z"
      },
      "links": {
        "self": "/accounting_code_rules/<id>"
      }
    }
  ],
  "links": {
    "first": "http://localhost/accounting_code_rules/search?business_entity_id=<id>&expense_accounting_codes%5Binclude%5D%5B0%5D=<id>&any_of%5B0%5D%5Btag_groups%5D%5Binclude%5D%5B0%5D=<id>&any_of%5B0%5D%5Bhas_tag%5D=1&any_of%5B1%5D%5Btypes%5D%5Binclude%5D%5B0%5D=earning&page=1",
    "last": "http://localhost/accounting_code_rules/search?business_entity_id=<id>&expense_accounting_codes%5Binclude%5D%5B0%5D=<id>&any_of%5B0%5D%5Btag_groups%5D%5Binclude%5D%5B0%5D=<id>&any_of%5B0%5D%5Bhas_tag%5D=1&any_of%5B1%5D%5Btypes%5D%5Binclude%5D%5B0%5D=earning&page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 15,
    "total": 1,
    "has_more": false
  }
}

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

The business entity whose accounting code rules to search.

any_of
object[]

A list of filter sets combined with OR; a rule matches when it satisfies at least one entry. Each entry has the same shape as the root filter set. An omitted or empty list applies no OR condition.

tag_groups
object
has_tag_group
boolean
tags
object
has_tag
boolean
types
object
has_type
boolean
subtypes
object
has_subtype
boolean
business_presets
object
has_business_preset
boolean
expense_accounting_codes
object
has_expense_accounting_code
boolean
liability_accounting_codes
object
has_liability_accounting_code
boolean

Response

200 - application/json

OK

object
string
read-only

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

data
object[]