ULID
All Nmbr entities have anid. These ids are based on a customized version of ULIDs. Nmbr ULIDs take the form of a standard ULID prefixed with a namespace reference.
For example, an employee may be emp_01JAV10D4QJ3500QANBTTBW9DW, and a company may be cmp_01JAV11013A9V4V0F30099BVGH.
Response Structure
Objects across the Nmbr API follow a consistent JSON structure, either a single Entity, a Pageable List, or a Non-Pageable List. Entities and Lists can be returned as the root response on an endpoint.Entities
Entity Responses will follow the structure:Pageable Lists
Pageable Lists contain up to 15 objects per-page and can be paged using the associatedlinks data. The object type will always have the value list .
Non-Pageable Lists
Non-Pageable Lists are returned for lists with no related endpoint to page through. In these cases the complete data set will be returned as alist with no paging information.
Related Resources
Entities will contain references to other objects - e.g an Employee will contain a Company reference. By default, these will be “stub” entities which will have nodata attribute. They may be an Entity, a Pageable List or a Non-Pageable List.
Expanding Resources
If you would like to retrieve thedata of a related resource inline, you may pass the expand array parameter to expand its contents.
Request:
data by passing the expand parameter in your request.
You can expand multiple layers down by defining dot (.) notation values to the expand array.
In the following example, the company entity is expanded to a full company resource, and its pageable-list of business_entities is expanded into a list of business_entity resources.
Request:
Using the expand array
Multiple objects can be expanded by passing multiple values to the expand parameter.
Some objects have properties which are arrays of data - if there is an expandable property in such an array, you must pass the dot-property of the array.property. For example, to expand the recurring_allowance in a allowance_line_item, you must pass the parameter expand[]=allowance.recurring_allowance.
The expand parameter can also accept a comma separated list of expandable attributes: expand=company,allowance.recurring_allowance.
Request
Maximum expansion depth
expand parameters using dot-properties for deep expanding may go up to 4 layers deep. For example, the following is a valid expand argument on a pay_stub -work_assignment.pay_rate.expense_accounting_code.business_entity. However, no property on the business_entity may be expanded.
Expanding optional properties
Some resources will have expandable properties that are not returned by default (i.e no “stub” entity will be returned by default). These optional properties will be documented as available, but must be requested in theexpand argument to be returned.
The expand parameter can be used to reduce the total number of requests required to use the Nmbr API, however it should be used only when required, as there may be a noticeable performance difference when querying for a single entity with no expand argument, vs a query with multiple expand arguments - especially when expanding attributes in a list.
Error Response Structure
When a client error (4xx) occurs, the Nmbr API returns a standardized error response.Bad Request (400)
A400 status code indicates that the request was invalid.
The response message explains why the request could not be processed.
Unauthorized (401)
A401 status code indicates that authentication has failed.
Forbidden (403)
A403 status code indicates that the client does not have permission to perform the requested action.
Not Found (404)
A404 status code indicates that the requested resource does not exist.
Unprocessable Entity (422)
A422 status code is returned when validation errors occur.
The response includes a summary message and an errors object detailing validation issues for each field.

