House Account
POST /house-account/entity/<entity_id>
DELETE /house-account/entity/<entity_id>
POST /house-account/updateEntitiesWithDependencies
GET /house-account/document/<_id>
PATCH /house-account/document/<_id>
DELETE /house-account/document/<_id>
POST /house-account/documents/dependencies
GET /house-account/mapping/entity/<entity_id>
POST /house-account/mapping/entity/<entity_id>
Security
jwt-bearer-token
apiKey | API Key |
|---|---|
Name | Authorization |
In | header |
Endpoints
GET /house-account/master
Summary
Gets a master list of house account entities, regardless of site.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
query |
| integer | No | The maximum documents to return |
query |
| integer | No | The documents to skip before returning |
query |
| string | No | A filter expression in OData v4 format |
query |
| string | No | An order by expression in OData v4 format |
query |
| boolean | No | Hydrates related nested objects when returning a result. For example, populate a Menu with Menu Categories and Menu Groups. |
query |
| boolean | No | Include mappings for document in the response |
query |
| [string] | No | Specify |
query |
| boolean | No | Includes documents that inactive for current sites |
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 |
GET /house-account/current
Summary
Gets a list of currently effective active house account 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 |
| string | Yes | The identifier of the company to manage data for |
header |
| [string] | No | The identifiers of the site to manage data for |
query |
| string | No | A filter expression in OData v4 format |
query |
| integer | No | The maximum documents to return |
query |
| integer | No | The documents to skip before returning |
query |
| string | No | An order by expression in OData v4 format |
query |
| string | Yes | The date and time to query against |
query |
| string | No | An array of entity identifiers |
query |
| boolean | No | Hydrates related nested objects when returning a result. For example, populate a Menu with Menu Categories and Menu Groups. |
query |
| boolean | No | Include mappings for document in the response |
query |
| [string] | No | Specify entity types for which mappings will be presented as a part of the response. For example, |
query |
| [string] | No | Specify |
query |
| boolean | No | Adds audit fields to each document when returning a result: |
query |
| boolean | No | Includes documents that inactive for current sites |
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 |
GET /house-account/list
Summary
Gets a list of currently effective active house account 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 |
| string | Yes | The identifier of the company to manage data for |
header |
| [string] | No | The identifiers of the site to manage data for |
query |
| string | No | A filter expression in OData v4 format |
query |
| integer | No | The maximum documents to return |
query |
| integer | No | The documents to skip before returning |
query |
| string | No | An order by expression in OData v4 format |
query |
| string | Yes | The date and time to query against |
query |
| string | No | An array of entity identifiers |
query |
| boolean | No | Hydrates related nested objects when returning a result. For example, populate a Menu with Menu Categories and Menu Groups. |
query |
| [string] | No | Specify |
query |
| boolean | No | Adds audit fields to each document when returning a result: |
query |
| boolean | No | Includes documents that inactive for current sites |
query |
| [string] | No | Specify entity types for which mappings will be presented as a part of the response. For example, |
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 /house-account
Summary
Adds a new house account.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
query |
| boolean | No | Hydrates related nested objects when returning a result. For example, populate a Menu with Menu Categories and Menu Groups. |
query |
| [string] | No | Specify |
body |
| Yes | The JSON formatted request |
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 /house-account/entity/<entity_id>
Summary
Creates and updates house accounts.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
path |
| string | Yes | The entity identifier |
body |
| Yes | The JSON formatted request |
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 |
DELETE /house-account/entity/
Summary
Deletes an entity and all versions of it.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
path |
| 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/updateEntitiesWithDependencies
Summary
Creates and updates house accounts with the mappings.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
header |
| [string] | No | The identifiers of the site to manage data for |
body |
| Yes | Supports the mappings field (array/boolean) for each document. In the case with |
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 |
GET /house-account/document/<_id>
Summary
Gets one house account by specific document identifier.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
path |
| string | Yes | The document identifier |
query |
| boolean | No | Hydrates related nested objects when returning a result. For example, populate a Menu with Menu Categories and Menu Groups. |
query |
| [string] | No | Specify |
query |
| [string] | No | Specify entity types for which mappings will be presented as a part of the response. For example, |
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 |
PATCH /house-account/document/<_id>
Summary
Partially updates a house account.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
path |
| string | Yes | The document identifier |
query |
| boolean | No | Hydrates related nested objects when returning a result. For example, populate a Menu with Menu Categories and Menu Groups. |
query |
| [string] | No | Specify |
body |
| Yes | The JSON of the category being patched |
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 |
DELETE /house-account/document/<_id>
Summary
Deletes a house account.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
path |
| 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/documents/dependencies
Summary
Checks for documents' dependencies.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
body |
| Yes | The JSON formatted request |
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 |
GET /house-account/mapping/entity/<entity_id>
Summary
Gets a list of house account mappings for specified sites.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
header |
| [string] | No | The identifiers of the site to manage data for |
path |
| string | Yes | The entity identifier |
query |
| integer | No | The maximum documents to return |
query |
| integer | No | The documents to skip before returning |
query |
| string | No | A filter expression in OData v4 format |
query |
| string | No | An order by expression in OData v4 format |
query |
| boolean | No | Includes documents that inactive for current sites |
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 /house-account/mapping/entity/<entity_id>
Summary
Creates the list of house account mappings for entity and sites.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
header |
| [string] | No | The identifiers of the site to manage data for |
path |
| string | Yes | The entity identifier |
body |
| Yes | The array of the house account mappings being added |
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 /house-account/mapping
Summary
Adds a new house account mapping.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes | The identifier of the company to manage data for |
body |
| Yes | The JSON of the house account mapping being added |
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 |
Data Models
house_account
Stores the definition of the House Account.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The name for the House Account, which is used by the ordering application |
| string | No | The identifier for the House Account, which may be used by external partners and integrators |
| string, object | Yes | The status for House Account, which is used in the ordering application to allow or restrict using a House Account in operations |
| No | ||
| No | ||
| No | ||
| No | ||
| No | ||
| No | ||
| No | ||
| No | ||
| No | ||
| No |
house_account_create
Stores the definition of the House Account.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The name for the House Account, which is used by the ordering application |
| string | No | The identifier for the House Account, which may be used by external partners and integrators |
| string, object | Yes | The status for House Account, which is used in the ordering application to allow or restrict using a House Account in operations |
| No | ||
| No |
house_account_edit
Stores the definition of the House Account.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The name for the House Account, which is used by the ordering application |
| string | No | The identifier for the House Account, which may be used by external partners and integrators |
| string, object | No | The status for House Account, which is used in the ordering application to allow or restrict using a House Account in operations |
| No |
house_account_list
Field Name | Type | Description |
|---|---|---|
| integer | |
|
name
Field Name | Type | Description |
|---|---|---|
| string |
_id
Field Name | Type | Description |
|---|---|---|
| string | The auto-assigned system document identifier |
company_id
Field Name | Type | Description |
|---|---|---|
| string | The identifier of the company who owns the document |
entity_id
Field Name | Type | Description |
|---|---|---|
| string | The auto-assigned unique identifier of this entity, set on creation. All future versions of this entity will share the same |
is_master
Field Name | Type | Description |
|---|---|---|
| boolean |
is_active
Field Name | Type | Description |
|---|---|---|
| boolean | A flag that indicates active documents. Sets to |
external_id
Field Name | Type | Description |
|---|---|---|
| string |
created_by
Field Name | Type | Description |
|---|---|---|
| string | The identifier of the OPRA user or site that created this document |
updated_by
Field Name | Type | Description |
|---|---|---|
| string | The identifier of the OPRA user or site that last updated this document |
created_at
Field Name | Type | Description |
|---|---|---|
| string | The date and time the document was created |
updated_at
Field Name | Type | Description |
|---|---|---|
| string | The last date and time the document was updated |
mapping_list_response
Field Name | Type | Description |
|---|---|---|
| integer | |
|
mapping_create_request
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The document identifier in the collection the mapping refers to |
| Yes | ||
| string | Yes | |
| string | Yes | The identifiers of the site to manage data for |
mappings_update_request
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The document identifier in the collection the mapping refers to |
| Yes | ||
| string | Yes | |
| string | Yes | The identifiers of the site to manage data for |
document_mapping
Field Name | Type | Description |
|---|---|---|
| ||
| ||
| string | The identifiers of the site to manage data for |
| ||
| string | The document identifier in the collection the mapping refers to |
| ||
| ||
| ||
|