Skip to main content

Variant

GET /variant/master

GET /variant/current

GET /variant/list

POST /variant

POST /variant/entity/<entity_id>

DELETE /variant/entity/<entity_id>

POST /variant/updateEntitiesWithDependencies

GET /variant/document/<_id>

PATCH /variant/document/<_id>

DELETE /variant/document/<_id>

GET /variant/mapping/entity/<entity_id>

POST /variant/mapping/entity/<entity_id>

POST /variant/mapping

Data Models

Endpoints

GET /variant/master

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

int32

No

The maximum documents to return

query

$skip

int32

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

query

include_entities

[ csv of 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

Response: 200 OK

Schema

Field Name

Type

Description

total

integer

items

[ array, object ]

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: "standard," "modifier"

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

entity_id

string

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

is_master

boolean

is_active

boolean

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

external_id

string

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

GET /variant/current

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

[ csv of 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

query

$skip

int32

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

query

include_mappings_for_entities

[ csv of string ]

No

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

query

include_entities

[ csv of 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

Response: 200 OK

Schema

Field Name

Type

Description

total

integer

items

[ array, object ]

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: "standard," "modifier"

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

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

boolean

is_active

boolean

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

external_id

string

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

GET /variant/list

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

[ csv of 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

query

$skip

int32

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

[ csv of 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

[ csv of string ]

No

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

Response: 200 OK

Schema

Field Name

Type

Description

total

integer

items

[ array, object ]

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: "standard," "modifier"

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%.

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

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

boolean

is_active

boolean

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

external_id

string

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

POST /variant

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

[ csv of 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

Yes

The JSON formatted request

Request Body

Field Name

Type

Description

object

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: "standard," "modifier"

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

none, fixed_amount, fixed_rate

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

entity_id

string

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

external_id

string

Response: 200 OK

Schema

Field Name

Type

Description

object

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: standard, modifier

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

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

boolean

is_active

boolean

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

external_id

string

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

POST /variant/entity/<entity_id>

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

Yes

The JSON formatted request

Request Body

Field Name

Type

Description

[ array, object ]

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: "standard," "modifier"

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

entity_id

string

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

external_id

string

Response: 200 OK

Schema

Field Name

Type

Description

[ array, object ]

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: standard, modifier

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option fort he variant positioning. For example, Small (1), Medium (2), Large (3).

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

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

boolean

is_active

boolean

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

external_id

string

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

DELETE /variant/entity/<entity_id>

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

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

POST /variant/updateEntitiesWithDependencies

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

[ csv of string ]

No

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

body

body

Yes

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

Request Body

Field Name

Type

Description

[ array, object ]

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: "standard," "modifier"

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

entity_id

string

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

external_id

string

Response: 200 OK

Schema

Field Name

Type

Description

total

integer

items

[ array, object ]

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: standard, modifier

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

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

boolean

is_active

boolean

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

external_id

string

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

GET /variant/document/<_id>

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

[ csv of 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

[ csv of string ]

No

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

Response: 200 OK

Schema

Field Name

Type

Description

object

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: "standard," "modifier"

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%.

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

entity_id

string

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

is_master

boolean

is_active

boolean

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

external_id

string

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

PATCH /variant/document/<_id>

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

[ csv of 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

Yes

The JSON of the category being patched

Request Body

Field Name

Type

Description

object

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: "standard," "modifier"

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

external_id

string

Response: 200 OK

Schema

Field Name

Type

Description

object

Stores the definition of a variant

name

string

The name of the variant

product_type

string

The type of product the variant can be applied to.

Examples: standard, modifier

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

external_id

string

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

DELETE /variant/document/<_id>

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

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

GET /variant/mapping/entity/<entity_id>

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

[ csv of 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

int32

No

The maximum documents to return

query

$skip

int32

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

Response: 200 OK

Schema

Field Name

Type

Description

total

integer

items

[ array, object ]

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

site_id

string

The identifier of the site associated with the document

entity_id

string

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

document_id

string

The identifier of the document in the collection the mapping refers to

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

POST /variant/mapping/entity/<entity_id>

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

[ csv of 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

Yes

The array of the time period mappings being added

Request Body

[ array ] (unspecified type)

Response: 200 OK

Schema

Field Name

Type

Description

total

integer

items

[ array, object ]

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

site_id

string

The identifier of the site associated with the document

entity_id

string

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

document_id

string

The identifier of the document in the collection the mapping refers to

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

POST /variant/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

Yes

The JSON of the variant mapping being added

Request Body

Field Name

Type

Description

document_id

string

The identifier of the document in the collection the mapping refers to

entity_id

string

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

effective_date

string

The date and time (date-time) the document becomes "current"

site_ids

[ string ]

The identifier of the site associated with the document

Response: 200 OK

Schema

Field Name

Type

Description

total

integer

items

[ array, object ]

_id

string

The auto-assigned system document identifier

company_id

string

The identifier of the company that owns the document

site_id

string

The identifier of the site associated with the document

entity_id

string

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

document_id

string

The identifier of the document in the collection the mapping refers to

created_by

string

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

updated_by

string

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

created_at

string

The date and time (date-time) the document was created

updated_at

string

The last date and time (date-time) the document was updated

Response Codes

Response

Description

200 OK

Success

400 Bad Request

Bad request, for more information look at body error

403 Forbidden

Invalid token

404 Not Found

Not found

422 Unprocessable Entity

Unprocessable error

Default

Unexpected error

Data Models

variant_entity_id

variant_type_entity_id

variant_kit_entity_ids

variant

variant_create

variant_edit

variant_list

variant_type

variant_type_create

variant_type_edit

variant_type_list

name

_id

company_id

entity_id

is_master

is_active

external_id

created_by

updated_by

created_at

updated_at

variant_entity_id

The variant entity_id.

Field Name

Type

Description

variant_entity_id

string, object

The variant entity_id

variant_type_entity_id

Field Name

Type

Description

variant_type_entity_id

string, object

variant_kit_entity_ids

An array of variant entity_ids.

Field Name

Type

Description

variant_kit_entity_ids

array

An array of variant entity_ids

variant

Stores the definition of a variant.

Field Name

Type

Required

Description

name

string

Yes

 

product_type

string

No

The type of product the variant can be applied to.

The possible values are "standard" or "modifier."

variant_type_entity_id

string, object

No

The entity_id of the associated variant-type

price_adjustment_type

string

Yes

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

Yes

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

Yes

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

Yes

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

No

Identifies whether or not the variation is the without or with.

The possible values are  "none," "add," or "no."

sort_order

integer

No

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

_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

 

variant_create

Stores the definition of a variant.

Field Name

Type

Required

Description

name

string

Yes

 

product_type

string

No

The type of product the variant can be applied to.

The possible values are "standard" or "modifier."

variant_type_entity_id

string, object

No

The entity_id of the associated variant-type

price_adjustment_type

string

Yes

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

Yes

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

Yes

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are  "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

Yes

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

No

Identifies whether or not the variation is the without or with.

The possible values are  "none," "add," or "no."

sort_order

integer

No

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

entity_id

entity_id

No

 

external_id

external_id

No

 

variant_edit

Stores the definition of a variant.

Field Name

Type

Description

name

string

 

product_type

string

The type of product the variant can be applied to.

The possible values are "standard" or "modifier."

variant_type_entity_id

string, object

The entity_id of the associated variant-type

price_adjustment_type

string

How the variant affects the price, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

price_adjustment_value

number

The value of the price multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

quantity_adjustment_type

string

How the variant affects the quantity, either by a fixed amount or a percentage.

The possible values are "none," "fixed_amount," or "fixed_rate."

quantity_adjustment_value

number

The value of the quantity multiplier, either a currency value such as 0.50 for $0.50 or 0.50 for 50%

action

string

Identifies whether or not the variation is the without or with.

The possible values are "none," "add," or "no."

sort_order

integer

The sort option for the variant positioning. For example, Small (1), Medium (2), Large (3).

external_id

external_id

 

variant_list

Field Name

Type

Description

total

integer

 

items

[variant ]

 

variant_type

Describes the variation type of the product.

Field Name

Type

Required

Description

name

string

Yes

 

code

string

Yes

 

sync_product_variations

string

No

The product variations synchronization method applied at Data Management.

The possible values are "sync_all" or "prompt."

_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

 

variant_type_create

Describes the variation type of the product.

Field Name

Type

Required

Description

name

string

Yes

 

code

string

Yes

 

sync_product_variations

string

No

The product variations synchronization method applied at Data Management.

The possible values are "sync_all" or "prompt."

entity_id

entity_id

No

 

external_id

external_id

No

 

variant_type_edit

Describes the variation type of the product.

Field Name

Type

Description

name

string

 

code

string

 

sync_product_variations

string

The product variations synchronization method applied at Data Management.

The possible values are "sync_all" or "prompt."

external_id

external_id

 

variant_type_list

Field Name

Type

Description

total

integer

 

items

[variant_type ]

 

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 that 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 unique ID 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

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.

Field Name

Type

Description

updated_by

string

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

created_at

The date and time the document was created.

Field Name

Type

Description

created_at

string

The date and time (date-time) the document was created

updated_at

The last date and time the document was updated.

Field Name

Type

Description

updated_at

string

The last date and time (date-time) the document was updated