GL Classifications

Create classification

Changed on

Create a GL classification, typically for a value from your ERP. A classification is identified by its type, thirdPartyId and vendorValueId. Creating an identical classification again returns the existing one with status 200. Creating one with the same type, thirdPartyId and vendorValueId but a different payload returns 409. Use :find and then update the existing classification instead.

Every id in glEntityIds must be an existing GL entity. An empty glEntityIds applies the classification to the whole organization, which principals restricted to specific entities are not allowed to do.

post/accounting/v2beta/gl-classifications

Request

Request body

vendorValueIdstring required

ID of the classification value in the ERP.

thirdPartyIdstring

ID of the third party (ERP) the classification originates from. Omit if the integration has no third party.

namestring required

Human-readable name of the classification value, as shown in the ERP.

glEntityIdsstring[]

GL entity ids this value may be used with. Empty means all GL entities (restricted principals cannot use an empty list on create).

inactiveboolean

Whether the value is inactive in the ERP. Omit for false.

Example request

{
  "thirdPartyId": "9a8b1372-5c80-44a5-81a9-553a34041eb7",
  "type": {
    "type": "cseg_region",
    "name": "Class",
    "fieldKey": "cseg_region"
  },
  "name": "EMEA Sales"
}

Response

An identical GL classification already existed and is returned.

idstring required

Unique resource identifier.

organizationIdstring required

Unique resource identifier for an Organization.

thirdPartyIdstring

ID of the third party (ERP) the classification originates from. Omitted if the integration has no third party.

vendorValueIdstring required

ID of the classification value in the ERP.

namestring required

Human-readable name of the classification value, as shown in the ERP.

glEntityIdsstring[]

GL entity ids this value may be used with. Empty means all GL entities in the organization (restricted principals cannot create or widen to org-wide scope).

inactiveboolean required

Whether the value is inactive in the ERP. Inactive classifications remain addressable by id; retire obsolete values with inactive true instead of deleting.

versioninteger required

Resource version. Starts at value 1 when the resource is created and increases by one for each successive update.

etagstring required

ETag based on the resource version. This can be passed along in If-Match HTTP header when updating a resource to perform a conditional update.

createdstring date-time required

Time at which the resource was created.

updatedstring date-time required

Time at which the resource was last updated.

Example response

{
  "id": "2ed9a3ee-60aa-4f9f-a858-2eed4eefbbc8",
  "organizationId": "0160f6ab-5741-49e1-af46-9138927e547e",
  "thirdPartyId": "9a8b1372-5c80-44a5-81a9-553a34041eb7",
  "type": {
    "type": "cseg_region",
    "name": "Class",
    "fieldKey": "cseg_region"
  },
  "name": "EMEA Sales",
  "version": 1,
  "etag": "version:3",
  "created": "2022-05-04T18:31:12.889104898Z",
  "updated": "2022-05-04T18:47:32.213842599Z"
}

Changes