Skip to main content

House Account Status

Security

GET /house-account-status/master

GET /house-account-status/current

GET /house-account-status/list

POST /house-account-status

POST /house-account-status/entity/<entity_id>

DELETE /house-account-status/entity/<entity_id>

POST /house-account-status/updateEntitiesWithDependencies

GET /house-account-status/document/<_id>

PATCH /house-account-status/document/<_id>

DELETE /house-account-status/document/<_id>

POST /house-account-status/documents/dependencies

GET /house-account-status/mapping/entity/<entity_id>

POST /house-account-status/mapping/entity/<entity_id>

POST /house-account-status/mapping

Data Models

Security

jwt-bearer-token

apiKey

API Key

Name

Authorization

In

header

Endpoints

GET /house-account-status/master

Gets a master list of house account status 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

query

$skip

integer

No

The documents to skip before returning

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 mappings for document in the response

query

include_entities

[string]

No

Specify 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 documents that inactive for current sites

Responses

Code

Description

Schema

200

Success

house_account_status_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not found

422

Unprocessable error

Default

Unexpected error

GET /house-account-status/current

Summary

Gets a list of currently effective active house account status entities for the specified sites as of the given  effective_date:effective_date=2016-11-18T19:04:58.124Z.

To narrow the list to specific entity_id: ?effective_date=2016-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 identifiers 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

query

$skip

integer

No

The documents to skip before returning

query

$orderby

string

No

An order by expression in OData v4 format

query

effective_date

string

Yes

The date and time to query against

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

Include mappings for document in the response

query

include_mappings_for_entities

[string]

No

Specify entity types for which mappings will be presented as a part of the response. For example, include_mappings_for_entities_param=['product','product-price', etc..].

query

include_entities

[string]

No

Specify 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 documents that inactive for current sites

Responses

Code

Description

Schema

200

Success

house_account_status_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not found

422

Unprocessable error

Default

Unexpected error

GET /house-account-status/list

Summary

Gets a list of currently effective active house account status entities for the specified sites as of the given  effective_date:effective_date=2016-11-18T19:04:58.124Z.

To narrow the list to specific entity_id: ?effective_date=2016-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 identifiers 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

query

$skip

integer

No

The documents to skip before returning

query

$orderby

string

No

An order by expression in OData v4 format

query

effective_date

string

Yes

The date and time to query against

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

Specify 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 documents that inactive for current sites

query

include_mappings_for_entities

[string]

No

Specify entity types for which mappings will be presented as a part of the response. For example, include_mappings_for_entities_param=['product','product-price', etc..].

Responses

Code

Description

Schema

200

Success

house_account_status_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not found

422

Unprocessable error

Default

Unexpected error

POST /house-account-status

Summary

Adds a new house account status.

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

Specify 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

house_account_status_create

Yes

The JSON formatted request

Responses

Code

Description

Schema

200

Success

house_account_status

400

Bad request, for more information look at body error

403

Invalid token

404

Not found

422

Unprocessable error

Default

Unexpected error

POST /house-account-status/entity/<entity_id>

Summary

Creates and updates house account statuses.

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 entity identifier

body

body

house_account_status_create

Yes

The JSON formatted request

Responses

Code

Description

Schema

200

Success

house_account_status

400

Bad request, for more information look at body error

403

Invalid token

404

Not found

422

Unprocessable error

Default

Unexpected error

DELETE /house-account-status/entity/<entity_id>

Summary

Deletes an entity and all versions of it.

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 entity identifier

Responses

Code

Description

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 /house-account-status/updateEntitiesWithDependencies

Summary

Creates and updates house account statuses 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 identifiers of the site to manage data for

body

body

house_account_status_create

Yes

Supports the mappings field (array/boolean) for each document. In the case with mappings: true the mappings are created for the current date and sites from the X-SITE-IDs header.

Responses

Code

Description

Schema

200

Success

house_account_status_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not found

422

Unprocessable error

Default

Unexpected error

GET /house-account-status/document/<_id>

Summary

Gets one house account status by 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 document identifier

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

Specify 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

Specify entity types for which mappings will be presented as a part of the response. For example, include_mappings_for_entities_param=['product','product-price', etc..].

Responses

Code

Description

Schema

200

Success

house_account_status

400

Bad request, for more information look at body error

403

Invalid token

404

Not found

422

Unprocessable error

Default

Unexpected error

PATCH /house-account-status/document/<_id>

Summary

Partially updates a house account status.

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 document identifier

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

Specify 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

house_account_status_edit

Yes

The JSON of the category being patched

Responses

Code

Description

Schema

200

Success

house_account_status_edit

400

Bad request, for more information look at body error

403

Invalid token

404

Not found

422

Unprocessable error

Default

Unexpected error

DELETE /house-account-status/document/<_id>

Summary

Deletes a house account status.

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 document identifier

Responses

Code

Description

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 /house-account-status/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

[house_account_status]

Yes

The JSON formatted request

Responses

Code

Description

Schema

200

Success

house_account_status_list

400

Bad request, for more information look at body error

403

Invalid token

404

Not found

422

Unprocessable error

Default

Unexpected error

GET /house-account-status/mapping/entity/<entity_id>

Summary

Gets a list of house account status 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 identifiers of the site to manage data for

path

entity_id

string

Yes

The entity identifier

query

$top

integer

No

The maximum documents to return

query

$skip

integer

No

The documents to skip before returning

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 documents that inactive for 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 /house-account-status/mapping/entity/<entity_id>

Summary

Creates the list of house account status mappings for entity and 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 identifiers of the site to manage data for

path

entity_id

string

Yes

The entity identifier

body

body

mappings_update_request

Yes

The array of the house 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 /house-account-status/mapping

Summary

Adds a new house account status 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 house 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

house_account_status

Stores the definition of the House Account Status.

Field Name

Type

Required

Description

name

string

Yes

The name for the House Account Status, which is used by the ordering application and may be used by external partners and integrators

external_id

external_id

No

status_type

string

Yes

The type for the House Account Status, which is used in the ordering application to allow or restrict using a House Account in Operations.

Enum: activeinactiveclosed

_id

_id

No

company_id

company_id

No

entity_id

entity_id

No

is_master

is_master

No

is_active

is_active

No

created_by

created_by

No

updated_by

updated_by

No

created_at

created_at

No

updated_at

updated_at

No

house_account_status_create

Stores the definition of the House Account Status.

Field Name

Type

Required

Description

name

string

Yes

The name for the House Account Status, which is used by the ordering application and may be used by external partners and integrators

external_id

external_id

No

status_type

string

Yes

The type for the House Account Status, which is used in the ordering application to allow or restrict using a House Account in Operations.

Enum: activeinactiveclosed

entity_id

entity_id

No

house_account_status_edit

Stores the definition of the House Account Status.

Field Name

Type

Required

Description

name

string

No

The name for the House Account Status, which is used by the ordering application and may be used by external partners and integrators

external_id

external_id

No

status_type

string

No

The type for the House Account Status, which is used in the ordering application to allow or restrict using a House Account in Operations.

Enum: activeinactiveclosed

house_account_status_list

Field Name

Type

Description

total

integer

items

[house_account_status]

name

Field Name

Type

Description

name

string

_id

Field Name

Type

Description

_id

string

The auto-assigned system document identifier

company_id

Field Name

Type

Description

company_id

string

The identifier of the company who owns the document

entity_id

Field Name

Type

Description

entity_id

string

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

is_master

Field Name

Type

Description

is_master

boolean

is_active

Field Name

Type

Description

is_active

boolean

A flag that indicates active documents. Sets to true by default.

external_id

Field Name

Type

Description

external_id

string

created_by

Field Name

Type

Description

created_by

string

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

updated_by

Field Name

Type

Description

updated_by

string

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

created_at

Field Name

Type

Description

created_at

string

The date and time the document was created

updated_at

Field Name

Type

Description

updated_at

string

The last date and time the document was updated

mapping_list_response

Field Name

Type

Description

total

integer

items

[document_mapping]

mapping_create_request

Field Name

Type

Required

Description

document_id

string

Yes

The document identifier in the collection the mapping refers to

entity_id

entity_id

Yes

effective_date

string

Yes

site_ids

string

Yes

The identifiers of the site to manage data for

mappings_update_request

Field Name

Type

Required

Description

document_id

string

Yes

The document identifier in the collection the mapping refers to

entity_id

entity_id

Yes

effective_date

string

Yes

site_ids

string

Yes

The identifiers of the site to manage data for

document_mapping

Field Name

Type

Description

_id

_id

company_id

company_id

site_ids

string

The identifiers of the site to manage data for

entity_id

entity_id

document_id

string

The document identifier in the collection the mapping refers to

created_by

created_by

updated_by

updated_by

created_at

created_at

updated_at

updated_at