Skip to main content

General Ledger Account

Security

DELETE /general-ledger-account/document/<_id>

DELETE /general-ledger-account/entity/<entity_id>

GET /general-ledger-account/current

GET /general-ledger-account/document/<_id>

GET /general-ledger-account/list

GET /general-ledger-account/mapping/entity/<entity_id>

GET /general-ledger-account/master

PATCH /general-ledger-account/document/<_id>

POST /general-ledger-account

POST /general-ledger-account/documents/dependencies

POST /general-ledger-account/entity/<entity_id>

POST /general-ledger-account/mapping

POST /general-ledger-account/mapping/entity/<entity_id>

POST /general-ledger-account/updateEntitiesWithDependencies

Data Models

Security

jwt-bearer-token

apiKey

API Key

Name

Authorization

In

header

Endpoints

GET /general-ledger-account/master

Summary

Gets a master list of general ledger account entities, regardless of site.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

query

$top

integer

No

The maximum documents to return. For example, if top is 100, and skip is 0, the system returns documents 1 to 100.

query

$skip

integer

No

The documents to skip before returning. For example, if top is 100, and skip is 100, the system returns documents 101 to 200.

query

$filter

string

No

A filter expression in OData v4 format

query

$orderby

string

No

An order by expression in OData v4 format

query

include_nested

boolean

No

Hydrates-related nested objects when returning a result (For example, populate a menu with menu categories and menu groups)

query

include_mappings

boolean

No

Include the mappings for the document in the response

query

include_entities

[ string ]

No

Specifies entity_types to be populated by nesting mechanism (For example, include_entities=['menu-category'] for menu call - populate a menu with menu categories)

query

include_inactive

boolean

No

Includes the documents that are inactive for the current sites

Responses

Code

Description

Schema

200

Success

general_ledger_account_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

GET /general-ledger-account/current

Summary

Gets a list of currently effective active general ledger account entities for the specified sites as of the given effective_date:

effective_date=2099-11-18T19:04:58.124Z

To narrow the list to specific entity_ids:

?effective_date=2099-11-18T19:04:58.124Z&entity_ids=['578e98111fa261f4867bdf12','231e98111fa261f4867bdf08']

To include the audit fields:

?include_audit=true

To include the inactive documents:

?include_inactive=true

To populate nested entities:

?include_nested=true

To populate only specified nested entities:

?include_entities="menu-category","menu-item-group"

Other filters can be applied against the entity documents by using the $filter parameter

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

header

X-SITE-IDs

[ string ]

No

The unique identifiers (UIDs) of the site to manage data for

query

$filter

string

No

A filter expression in OData v4 format

query

$top

int32

No

The maximum documents to return. For example, if top is 100, and skip is 0, then system returns documents 1 to 100.

query

$skip

int32

No

The documents to skip before returning. For example, if top is 100, and skip is 100, system returns documents 101 to 200.

query

$orderby

string

No

An order by expression in OData v4 format

query

effective_date

string

Yes

The date and time to query against. If the entity is updated on a specific date, then specifying an effective_date prior to that date returns a previous version of the entity.

query

entity_ids

[ string ]

No

An array of entity identifiers

query

include_nested

boolean

No

Hydrates-related nested objects when returning a result (For example, populate a menu with menu categories and menu groups)

query

include_mappings

boolean

No

Includes the mappings for the document in the response

query

include_mappings_for_entities

[ string ]

No

Specifies entity types for which mappings are presented as a part of the response (For example, include_mappings_for_entities_param=&

query

include_entities

[ string ]

No

Specifies entity_types to be populated by nesting mechanism (For example, include_entities=['menu-category'] for menu call - populate a menu with menu categories)

query

include_audit

boolean

No

Adds audit fields to each document when returning a result (is_active, is_master, created_at, created_by, updated_at, updated_by)

query

include_inactive

boolean

No

Includes the documents that are inactive for the current sites

Responses

Code

Description

Schema

200

Success

general_ledger_account_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

GET /general-ledger-account/list

Summary

Gets a list of currently effective active general ledger account entities for the specified sites as of the given effective_date:

effective_date=2099-11-18T19:04:58.124Z

To narrow the list to specific entity_ids:

?effective_date=2099-11-18T19:04:58.124Z&entity_ids=['578e98111fa261f4867bdf12','231e98111fa261f4867bdf08']

To include the audit fields:

?include_audit=true

To include the inactive documents:

?include_inactive=true

To populate nested entities:

?include_nested=true

To populate only specified nested entities:

?include_entities="menu-category","menu-item-group"

Other filters can be applied against the entity documents by using the $filter parameter

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

header

X-SITE-IDs

[ string ]

No

The unique identifiers (UIDs) of the site to manage data for

query

$filter

string

No

A filter expression in OData v4 format

query

$top

integer

No

The maximum documents to return. For example, if top is 100, and skip is 0, system returns documents 1 to 100.

query

$skip

integer

No

The documents to skip before returning. If top is 100, and skip is 100, the system returns documents 101 to 200.

query

$orderby

string

No

An order by expression in OData v4 format

query

effective_date

string

Yes

The date and time to query against. If the entity is updated on a specific date, then specifying an effective date prior to that date returns a previous version of the entity.

query

entity_ids

[ string ]

No

An array of entity identifiers

query

include_nested

boolean

No

Hydrates-related nested objects when returning a result (For example, populate a menu with menu categories and menu groups)

query

include_entities

[ string ]

No

Specifies entity_types to be populated by nesting mechanism (For example, include_entities=['menu-category'] for menu call - populate a menu with menu categories)

query

include_audit

boolean

No

Adds audit fields to each document when returning a result (is_active, is_master, created_at, created_by, updated_at, updated_by)

query

include_inactive

boolean

No

Includes the documents that are inactive for the current sites

query

include_mappings_for_entities

[ string ]

No

Specifies entity types for which mappings are presented as a part of the response (For example, include_mappings_for_entities_param='product';'product-price',etc.

Responses

Code

Description

Schema

200

Success

general_ledger_account_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

POST /general-ledger-account

Summary

Adds a new general ledger account.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

query

include_nested

boolean

No

Hydrates-related nested objects when returning a result (For example, populate a menu with menu categories and menu groups)

query

include_entities

[ string ]

No

Specifies entity_types to be populated by nesting mechanism (For example, include_entities=['menu-category'] for menu call - populate a menu with menu categories)

body

body

general_ledger_account_create

Yes

The JSON formatted request

Responses

Code

Description

Schema

200

Success

general_ledger_account

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

POST /general-ledger-account/entity/<entity_id>

Summary

Creates/Updates general ledger accounts.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

path

entity_id

string

Yes

The identifier of the entity

body

body

[ general_ledger_account_create ]

Yes

The JSON formatted request

Responses

Code

Description

Schema

200

Success

[ general_ledger_account ]

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

DELETE /general-ledger-account/entity/<entity_id>

Summary

Deletes an entity and all versions of the entity.

Request Parameters

In

FieldName

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

path

entity_id

string

Yes

The identifier of the entity

Responses

Code

Description

Schema

200

Success

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

POST /general-ledger-account/updateEntitiesWithDependencies

Summary

Creates/Updates general ledger accounts with the mappings.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

header

X-SITE-IDs

[ string ]

No

The unique identifiers (UIDs) of the site to manage data for

body

body

general_ledger_account_create

Yes

Supports the mappings fields (array/boolean) for each document. With mappings: True mappings are created for the current date and sites from the X-SITE-IDs header.

Responses

Code

Description

Schema

200

Success

general_ledger_account_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

GET /general-ledger-account/document/<_id>

Summary

Gets one general ledger account by a specific document identifier.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

path

_id

string

Yes

The identifier of the document

query

include_nested

boolean

No

Hydrates-related nested objects when returning a result (i.e. populate a Menu with Menu Categories and Menu Groups)

query

include_entities

[ string ]

No

Specifies entity_types to be populated by nesting mechanism (For example, include_entities=['menu-category'] for menu call - populate a menu with menu categories)

query

include_mappings_for_entities

[ string ]

No

Specifies entity types for which mappings are presented as a part of the response (For example, include_mappings_for_entities_param=&

Responses

Code

Description

Schema

200

Success

general_ledger_account

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

GET /general-ledger-account/document/<_id>

Summary

Gets one general ledger account by a specific document identifier.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

path

_id

string

Yes

The identifier of the document

query

include_nested

boolean

No

Hydrates-related nested objects when returning a result (i.e. populate a Menu with Menu Categories and Menu Groups)

query

include_entities

[ string ]

No

Specifies entity_types to be populated by nesting mechanism (For example, include_entities=['menu-category'] for menu call - populate a menu with menu categories)

query

include_mappings_for_entities

[ string ]

No

Specifies entity types for which mappings are presented as a part of the response (For example, include_mappings_for_entities_param=&

Responses

Code

Description

Schema

200

Success

general_ledger_account

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

PATCH /general-ledger-account/document/<_id>

Summary

Partially updates a general ledger account.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

path

_id

string

Yes

The identifier of the document

query

include_nested

boolean

No

Hydrates-related nested objects when returning a result (For example, populate a menu with menu categories and menu groups)

query

include_entities

[ string ]

No

Specifies entity_types to be populated by nesting mechanism (For example, include_entities=['menu-category'] for menu call - populate a menu with menu categories)

body

body

general_ledger_account_edit

Yes

The JSON of the category being patched

Responses

Code

Description

Schema

200

Success

general_ledger_account_edit

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

DELETE /general-ledger-account/document/<_id>

Summary

Deletes a general ledger account.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

path

_id

string

Yes

The identifier of the document

Responses

Code

Description

Schema

200

Success

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

POST /general-ledger-account/documents/dependencies

Summary

Checks for documents dependencies.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

body

body

[ general_ledger_account ]

Yes

The JSON formatted request

Responses

Code

Description

Schema

200

Success

general_ledger_account_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

GET /general-ledger-account/mapping/entity/<entity_id>

Summary

Gets a list of general ledger account mappings for specified sites.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

header

X-SITE-IDs

[ string ]

No

The unique identifiers (UIDs) of the site to manage data for

path

entity_id

string

Yes

The identifier of the entity

query

$top

integer

No

The maximum documents to return. For example, if top is 100, and skip is 0, the system returns documents 1 to 100.

query

$skip

integer

No

The documents to skip before returning. For example, if top is 100, and skip is 100, the system returns documents 101 to 200.

query

$filter

string

No

A filter expression in OData v4 format

query

$orderby

string

No

An order by expression in OData v4 format

query

include_inactive

boolean

No

Includes the documents that inactive for the current sites

Responses

Code

Description

Schema

200

Success

mapping_list_response

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

POST /general-ledger-account/mapping/entity/<entity_id>

Summary

Creates the list of general ledger account mappings for an entity and site.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

header

X-SITE-IDs

[ string ]

No

The unique identifiers (UIDs) of the site to manage data for

path

entity_id

string

Yes

The identifier of the entity

body

body

mapping_update_request

Yes

The array of the general ledger account mappings being added

Responses

Code

Description

Schema

200

Success

mapping_list_response

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

POST /general-ledger-account/mapping

Summary

Adds a new general ledger account mapping.

Request Parameters

In

Field Name

Type

Required

Description

header

X-COMPANY-ID

string

Yes

The identifier of the company to manage data for

body

body

[ mapping_create_request ]

Yes

The JSON of the general ledger account mapping being added

Responses

Code

Description

Schema

200

Success

mapping_list_response

400

Bad request, for more information look at body error

403

Invalid token

404

Not Found

422

Unprocessable error

default

Unexpected Error

Data Models

general_ledger_account

general_ledger_account_create

general_ledger_account_edit

general_ledger_account_list

name

_id

company_id

entity_id

is_master

is_active

external_id

created_by

updated_by

created_at

updated_at

general_ledger_account

Stores the definition of the General Ledger (GL) account.

Field Name

Type

Required

Description

name

string

Yes

The GL account name

description

string

No

The description for the GL account

account_number

string

Yes

The GL account number

allowed_for_paid_in

boolean

No

Allowed for Paid In

allowed_for_paid_out

boolean

No

Allowed for Paid Out

type

string

No

The possible values are "Revenue," "Cost," "Paid In," "Paid Out," or "Tips"

_id

_id

No

company_id

company_id

No

entity_id

entity_id

No

is_master

is_master

No

is_active

is_active

No

external_id

external_id

No

created_by

created_by

No

updated_by

updated_by

No

created_at

created_at

No

updated_at

updated_at

No

general_ledger_account_create

Stores the definition of the General Ledger (GL) account.

Field Name

Type

Required

Description

name

string

Yes

The GL account name

description

string

No

The description for the General Ledger account

account_number

string

Yes

The GL account number

allowed_for_paid_in

boolean

No

Allowed for Paid In

allowed_for_paid_out

boolean

No

Allowed for Paid Out

type

string

No

The possible values are "Revenue," "Cost," "Paid In," "Paid Out," or "Tips"

entity_id

entity_id

No

external_id

external_id

No

general_ledger_account_edit

Stores the definition of the General Ledger (GL) account.

Field Name

Type

Description

name

string

The GL account name

description

string

The description for the GL account

account_number

string

The GL account number

allowed_for_paid_in

boolean

Allowed for Paid In

allowed_for_paid_out

boolean

Allowed for Paid Out

type

string

The possible values are "Revenue," "Cost," "Paid In," "Paid Out," or "Tips"

external_id

external_id

general_ledger_account_list

Field Name

Type

Description

total

integer

items

general_ledger_account

name

Field Name

Type

Description

name

string

_id

The auto-assigned system document identifier.

Field Name

Type

Description

_id

string

The auto-assigned system document identifier

company_id

The identifier of the company who owns the document.

Field Name

Type

Description

company_id

string

The identifier of the company that owns the document

entity_id

The auto-assigned unique identifier (UID) of the entity, set on creation. All future versions of the entity share the same entity_id.

Field Name

Type

Description

entity_id

string

The auto-assigned UID of the entity, set on creation. All future versions of the entity share the same entity_id.

is_master

Field Name

Type

Description

is_master

boolean

is_active

Marking property is the essence of active documents. Sets in true by default.

Field Name

Type

Description

is_active

boolean

Marking property is the essence of active documents. Sets in true by default.

external_id

Field Name

Type

Description

external_id

string

created_by

The identifier of the OPRA user or site that created the document.

Field Name

Type

Description

created_by

string

The identifier of the OPRA user or site that created the document

updated_by

The identifier of the OPRA user or site that last updated the document.

Name

Type

Description

updated_by

string

The identifier of the OPRA user or site that last updated the document

created_at

The last date and time the document was updated.

Field Name

Type

Description

created_at

string

The last date and time the document was updated

updated_at

The last date and time the document was updated.

Field Name

Type

Description

updated_at

string

The last date and time the document was updated