Merchandise Hierarchy

The following services are included in this functional area:

Class Download Service

The following services are included in this functional area:

Get Class Details for Provided Class

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Get Classes

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Class Upload Service

The following services are included in this functional area:

Create Class

Functional Area

Merchandise Hierarchy

Business Overview

The merchandise hierarchy allows the retailer to create the relationships that are necessary to support the product management structure of a company. This hierarchy reflects a classification of merchandise into multi-level descriptive categorizations to facilitate the planning, tracking, reporting, and management of merchandise within the company. This service may be used to create the class element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information.

The merchandise hierarchy must be created from the highest-level down. This means a department is associated with a group; a class is associated with a department; and a subclass is associated with department/class combination because classes are not unique across departments.

When a new class is created, this service will first validate that all the required fields are present in the request payload. Business level validation on the input information will be performed, which checks whether the class already exists. If the class does not exist, the class is created. Active custom flex attributes that are associated with a class can also be created through this service.

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/class/create
Input Payload Details

Table 5-686 Create - Object. See list of elements for detail

Element Name Required Data Type Description

class

Yes

Number (4)

The unique number of the class. This field cannot be modified.

className

Yes

String (120)

The name of the class.

dept

Yes

Number (4)

The number of the department which contains the class. This value must be predefined on the DEPS table. This value cannot be modified.

customFlexAttribute

No

Collection of Object

References a collection of customer flexible attributes.

Table 5-687 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Sample Input Message

{
  "class": 1,
  "className": "className",
  "dept": 3041,
  "customFlexAttribute": [
    {
      "name": "REVIEW_DATE",
      "value": null,
      "valueDate": "2001-12-31"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Class

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to delete the class element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information. When a class is deleted, this service will add the class to a purging staging table for processing in the Daily Purge of Foundation Data process.

Note: Associated custom flex attributes are deleted when the class is deleted.

For more details on Class, see the Create Class service description.

Service Type

DELETE

ReST URL
MerchIntegrations/services/merchandiseHierarchy/class/delete
Input Payload Details

Table 5-688 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

class

Yes

Number (4)

The unique number of the class.

dept

Yes

Number (4)

The ID of the department which which contains the class.

Sample Input Message

{
  "class": 1,
  "dept": 3041
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Class

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to update the class element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information. When a class is updated, this service first validates that all the required fields are present in the request payload. Business level validation on the input information will be performed, which verifies if the class to be updated already exists. If class already exists, the class details are updated. Active custom flex attributes can also be updated for the class.

For more details on Class, see the Create Class service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/merchandiseHierarchy/class/update
Input Payload Details

Table 5-689 Update - Object. See list of elements for detail

Element Name Required Data Type Description

class

Yes

Number (4)

The unique number of the class. This field cannot be modified.

className

Yes

String (120)

The name of the class.

dept

Yes

Number (4)

The number of the department which contains the class. This value must be predefined on the DEPS table. This value cannot be modified.

customFlexAttribute

No

Collection of Object

References a collection of customer flexible attributes.

Table 5-690 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Sample Input Message

{
  "class": 1,
  "className": "className",
  "dept": 3041,
  "customFlexAttribute": [
    {
      "name": "REVIEW_DATE",
      "value": null,
      "valueDate": "2001-12-31"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Company Upload Service

The following services are included in this functional area:

Update Company

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to update the company element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information.

When a company is updated, this service will first validate that all the required fields are present in the request payload. Business level validation on the input information will be performed, which verifies if the company ID to be updated already exists. If the company already exists, the details of the company are updated.

Service Type

PUT

ReST URL
MerchIntegrations/services/merchandiseHierarchy/company/update
Input Payload Details

Table 5-691 Update - Object. See list of elements for detail

Element Name Required Data Type Description

company

Yes

Number (4)

The unique number which identifies the company for which the system is running. This value cannot be modified.

companyName

Yes

String (120)

The name of the company for which the system is running.

add1

Yes

String (240)

The first line of the company headquarters address.

add2

No

String (240)

The second line of the company headquarters address.

add3

No

String (240)

The third line of the company headquarters address.

city

Yes

String (120)

The city the company headquarters.

state

No

String (3)

The abbreviation of the state of the company headquarters. This value must be predefined on the STATE table.

countryCode

Yes

String (3)

The abbreviation of the country of the company headquarters. This value must be predefined on the COUNTRY table.

postalCode

No

String (30)

The postal zip code of the company headquarters.

Sample Input Message

{
  "company": 1000,
  "companyName": "companyName",
  "add1": "101 First Street",
  "add2": "201 Second Street",
  "add3": "301 Third Street",
  "city": "Minneapolis",
  "state": "MN",
  "countryCode": "US",
  "postalCode": "55555-1234"
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Department Download Service

The following services are included in this functional area:

Get Department Details

Business Overview

This service retrieves departments with ID or name matching search string.

Service Type

GET

ReST URL
/Common/departmentSearch?searchString={searchString}&pageSize={pageSize}&pageNumber={pageNumber}
Input Parameters
Parameter Name Required Description Valid values

searchString

Yes

search string for department Id or Name

PageSize

No

Maximum number of records to retrieve per page

PageNumber

No

Result page to retrieve

Output

Table 5-692 MerchHierDeptRDO

Parameter Name Data Type

department

BigDecimal

departmentName

String

Table 5-693 PagedResultsRDO

Parameter Name Data Type

totalRecordCount

BigDecimal

Next Page URL

String

Previous Page URL

String

JSON Structure:

{
  “type": “paginationRDO",
  “totalRecordCount": 3512,
  “hyperMediaContent": {},
  “links" : [],
  “results": [{
     “departmentId": 3252,
     “departmentDescription": “some description"
  }]
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

V_DEPS

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Get Department Details for Provided Department

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Get Department Name

Business Overview

This service retrieves departments' name of input IDs.

Service Type

GET

ReST URL
/Common/departmentLoad?departments={departments}
Input Parameters
Parameter Name Required Description Valid values

departments

Yes

Comma separated values for Departments

NA

Output

Table 5-694 MerchHierDeptRDO

Parameter Name Data Type

department

BigDecimal

departmentName

String

JSON Structure:

{
  "departmentId": 3252,
  "departmentDescription": "some description"
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

V_DEPS

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Get Department Tax Details

This section describes the VAT Detail service.

Business Overview

VAT Detail service allows user to retrieve VAT information for a selected department.

Service Type

Get

ReST URL

Vat/vatDetail?department={departmentNumber}

Input Parameters
Parameter Name Required Description

Department

Yes

Department ID

Output

RestVatRecRDO

Parameter Name Data Type

vatRegion

BigDecimal

vatRegionName

String

vatRegionType

String

vatType

String

vatCode

String

vatCodeDesc

String

vatRate

BigDecimal

JSON Structure:
{
     "vatRegion": null,
     "vatRegionName": null,
     "vatRegionType": null,
     "vatType": null,
     "vatCode": null,
     "vatCodeDesc": null,
     "vatRate": null,
     "links": [],
     "hyperMediaContent": {
         "linkRDO": []
     }
 }
Table Impact
TABLE SELECT INSERT UPDATE DELETE

V_DEPS

Yes

No

No

No

VAT_DEPS

Yes

No

No

No

VAT_REGION

Yes

No

No

No

V_VAT_REGION_TL

Yes

No

No

No

V_VAT_CODES_TL

Yes

No

No

No

VAT_CODE_RATES

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Get Departments

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Department Upload Service

The following services are included in this functional area:

Create Department

Functional Area

Merchandise Hierarchy

Business Overview

The merchandise hierarchy allows the retailer to create the relationships that are necessary to support the product management structure of a company. This hierarchy reflects a classification of merchandise into multi-level descriptive categorizations to facilitate the planning, tracking, reporting, and management of merchandise within the company. This service may be used to create the department element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information,

When a new department is created, this service will first validate that all required fields are present in the request payload. Business level validation on the input information will be performed to:

  • Verify if the department is not already present.

  • Verify if total market amount is received. If received then it should be at least 1000.

  • Verify the child details, if included, have their required fields present. The child detail contains the VAT and up charge details for a department.

If all the validations are completed successfully, then the department data is created. Active custom flex attributes that are associated with a department can also be created through this service.

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/department/create
Input Payload Details

Table 5-695 Create - Object. See list of elements for detail

Element Name Required Data Type Description

dept

Yes

Number (4)

The number which uniquely identifies the department. This value cannot be modified.

deptName

Yes

String (120)

The name of the department.

buyer

No

Number (4)

The number of the buyer associated to the department. This value must be predefined on the BUYER table.

purchaseType

Yes

Number (1)

The code which indicates whether items in this department are normal merchandise (0) or consignment stock (1).

totalMarketAmount

No

Number (24,4)

The total market amount that is expected for the department. This value cannot be less than 1000.

merchandiser

No

Number (4)

The number of the merchandiser that is associated to the department. This value must be predefined on the MERCHANT table.

groupNo

Yes

Number (4)

The number of the group to which the department belongs. This value must be predefined on the GROUPS table.

budgetedMarkup

No

Number (12,4)

The budgeted markup percentage. The markup percent of cost. If this value is not populated on the message it will be calculated to be the inverse of the budgeted intake percentage. This column will hold 70% as 70, not. 70.

profitCalcType

Yes

Number (1)

The number which indicates whether profit will be calculated by direct cost (1) or retail inventory (2).

markupCalcType

Yes

String (2)

The code letter that indicates how markup is calculated in this department. Valid values are cost (C) and retail (R).

otbCalcType

No

String (1)

The code letter which indicates how OTB is calculated for this department. Valid values are cost (C) and retail (R).

maximumAverageCounter

No

Number (5)

The maximum count of days with acceptable data to include in an average for items within the department. This value is required if RPM is installed.

averageTolerancePercent

No

Number (12,4)

The tolerance percentage value used in averaging for items within this value. This column will hold 70% as 70, not. 70. This value is required if pricing is installed.

budgetedIntakePercent

No

Number (12,4)

The budgeted intake percentage. The percent of the total take that is income. If this field is not populated on the message it will be calculated as the inverse of the budgeted markup percentage. This column will hold 70% as 70, not. 70.

vat

No

Collection of Object

References a collection of department VAT information.

customFlexAttribute

No

Collection of Object

References a collection of customer flexible attributes.

upcharge

No

Collection of Object

References a collection of department upcharges.

Table 5-696 Vat - Object. See list of elements for detail

Element Name Required Data Type Description

vatRegion

Yes

Number (4)

The number of the VAT region to which this department is associated. This value must be predefined on the VAT_REGION table.

vatCode

Yes

String (6)

The alphanumeric identifier of the VAT code. This value must be predefined on the VAT_CODES table.

vatType

Yes

String (1)

Indicates if the VAT rate is used for purchasing (C), selling (R), or both (B).

reverseVatInd

No

String (1)

Indicates if items in the department are subject to reverse charge VAT at the vat region. Valid values are Y and N.

Table 5-697 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-698 Upcharge - Object. See list of elements for detail

Element Name Required Data Type Description

fromLocation

No

String (10)

Contains the source location from which goods will be transferred. This column can contain Country/Area/Region IDs when From Location Type is 'C', 'A', or 'R'. It will be a store, virtual warehouse or physical warehouse when From Location Type is 'S', 'W' or 'PW'. Otherwise, it should be left blank when From Location Type is either 'AS' or 'AW'.

toLocation

No

String (10)

Contains the destination location to which goods will be transferred. This column can contain Country/Area/Region IDs when To Location Type is 'C', 'A', or 'R'. It will be a store, virtual warehouse or physical warehouse when To Location Type is 'S', 'W' or 'PW'. Otherwise, it should be left blank when To Location Type is either 'AS' or 'AW'.

fromLocationType

Yes

String (6)

Contains the type of source location from which goods will be transferred. Valid values are defined in code type 'LTPC'. Examples are: C - Country, A - Area, R - Region, S - Store, W - Virtual Warehouse, PW - Physical Warehouse, AS - All Stores, AW - All Warehouses

toLocationType

Yes

String (6)

Contains the type of destination location to which goods will be transferred. Valid values are defined in code type 'LTPC'. Examples are: C - Country, A - Area, R - Region, S - Store, W - Virtual Warehouse, PW - Physical Warehouse, AS - All Stores, AW - All Warehouses.

details

No

Collection of Object

References a collection of department upcharge detail information.

Table 5-699 Details - Object. See list of elements for detail

Element Name Required Data Type Description

component

Yes

String (10)

This field contains the unique identifier of the Up Charge component.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the cost of the Item/To Location combinations within the department.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified.

upChargeGroup

Yes

String (6)

This field contains the up charge group to which the component ID belongs. Valid values can be found on the codes table with a code type of UCHG. Examples are Admin. Fee (A), Freight (F) and Special K Fees (K).

componentCurrency

Yes

String (3)

This field contains the currency of the Up Charge component.

effectiveDate

No

date

The date from which the new values are effective in the system.

itemDefaultInd

No

String (1)

Indicates if component rate information is updated or not for existing items under the department.

transferAllocationDefaultInd

No

String (1)

Indicates if component rate information is updated or not for existing transfers and allocations under the department.

computationValueBase

No

String (10)

Contains the Computation Value Basis for the Up Charge component.

costBasis

No

String (6)

Contains the basis the Up Charge will be calculated against. Valid values are defined in code type UCCB (Up Charge Cost Basis) with values: Weighted Average Cost (W), Supplier Cost (S) and Off-Invoice Net Cost (N).

includeInTotalUpChargeInd

No

String (1)

Used to determine if the value of the individual up charge component is used to calculate the total up charge (Y) or if it is only used as the basis of calculating another up charge (N). This column will default to the value in the ELC_COMP table but can be updated at the department level.

Sample Input Message

{
  "dept": 3041,
  "deptName": "deptName",
  "buyer": 610,
  "purchaseType": 1,
  "totalMarketAmount": 1010,
  "merchandiser": 810,
  "groupNo": 300,
  "budgetedMarkup": 3,
  "profitCalcType": 1,
  "markupCalcType": "C",
  "otbCalcType": "C",
  "maximumAverageCounter": 42,
  "averageTolerancePercent": 3,
  "budgetedIntakePercent": 3,
  "vat": [
    {
      "vatRegion": 1000,
      "vatCode": "S",
      "vatType": "B",
      "reverseVatInd": "Y"
    }
  ],
  "customFlexAttribute": [
    {
      "name": "REVIEW_DATE",
      "value": null,
      "valueDate": "2001-12-31"
    }
  ],
  "upcharge": [
    {
      "fromLocation": "1231",
      "toLocation": "3111",
      "fromLocationType": "S",
      "toLocationType": "S",
      "details": [
        {
          "component": "UC1",
          "componentRate": 3.55,
          "perCount": 3,
          "perCountUom": "EA",
          "upChargeGroup": "A",
          "componentCurrency": "USD",
          "effectiveDate": "2001-12-31",
          "itemDefaultInd": "Y",
          "transferAllocationDefaultInd": "Y",
          "computationValueBase": "C1",
          "costBasis": "S",
          "includeInTotalUpChargeInd": "N"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Create Department Taxes

Functional Area

Merchandise Hierarchy

Business Overview

If you are configured to run Merchandising using the Simple VAT (SVAT) setup for your default tax type, then you can set the VAT rates by region for the department using this service. VAT details can be passed in the Department create service payload, or they can be passed in specifically using this service. VAT region and VAT codes records must exist prior to creating department VAT records. Also, when passing in a new VAT region to an existing department with attached items, the VAT information will default to all items.

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/department/tax/create
Input Payload Details

Table 5-700 Create - Object. See list of elements for detail

Element Name Required Data Type Description

dept

Yes

Number (4)

The number which uniquely identifies the department. This value cannot be modified.

vat

No

Collection of Object

References a collection of department VAT information.

Table 5-701 Vat - Object. See list of elements for detail

Element Name Required Data Type Description

vatRegion

Yes

Number (4)

The number of the VAT region to which this department is associated. This value must be predefined on the VAT_REGION table.

vatCode

Yes

String (6)

The alphanumeric identifier of the VAT code. This value must be predefined on the VAT_CODES table.

vatType

Yes

String (1)

Indicates if the VAT rate is used for purchasing (C), selling (R), or both (B).

reverseVatInd

No

String (1)

Indicates if items in the department are subject to reverse charge VAT at the vat region. Valid values are Y and N.

Sample Input Message

{
  "dept": 3041,
  "vat": [
    {
      "vatRegion": 1000,
      "vatCode": "S",
      "vatType": "C",
      "reverseVatInd": "Y"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Create Department Up Charge

Functional Area

Merchandise Hierarchy

Business Overview

This service is used to create up charges for a department. 

This service first validates the set of required fields, including the from-locations and to-locations in the request payload. If no up-charge record is found, this message creates the up-charge for the department and from/to location combination. As part of the addition, you can indicate in the payload if you want to have the up-charges added to existing items or only added for new items. Similarly, there is a flag in the message to indicate whether the new up charges need to be cascaded to transfers and allocations which are unshipped and not in closed or deleted status. The department up charges will be created as soon as the request payload is consumed, but the new up charges will be cascaded to items, transfers, and allocations via batches which runs at the end of every business day.

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/department/upCharge/create
Input Payload Details

Table 5-702 Create - Object. See list of elements for detail

Element Name Required Data Type Description

dept

Yes

Number (4)

The number which uniquely identifies the department. This value cannot be modified.

upcharge

No

Collection of Object

References a collection of department upcharges.

Table 5-703 Upcharge - Object. See list of elements for detail

Element Name Required Data Type Description

fromLocation

No

String (10)

Contains the source location from which goods will be transferred. This column can contain Country/Area/Region IDs when From Location Type is 'C', 'A', or 'R'. It will be a store, virtual warehouse or physical warehouse when From Location Type is 'S', 'W' or 'PW'. Otherwise, it should be left blank when From Location Type is either 'AS' or 'AW'.

toLocation

No

String (10)

Contains the destination location to which goods will be transferred. This column can contain Country/Area/Region IDs when To Location Type is 'C', 'A', or 'R'. It will be a store, virtual warehouse or physical warehouse when To Location Type is 'S', 'W' or 'PW'. Otherwise, it should be left blank when To Location Type is either 'AS' or 'AW'.

fromLocationType

Yes

String (6)

Contains the type of source location from which goods will be transferred. Valid values are defined in code type 'LTPC'. Examples are: C - Country, A - Area, R - Region, S - Store, W - Virtual Warehouse, PW - Physical Warehouse, AS - All Stores, AW - All Warehouses

toLocationType

Yes

String (6)

Contains the type of destination location to which goods will be transferred. Valid values are defined in code type 'LTPC'. Examples are: C - Country, A - Area, R - Region, S - Store, W - Virtual Warehouse, PW - Physical Warehouse, AS - All Stores, AW - All Warehouses.

details

No

Collection of Object

References a collection of department upcharge detail information.

Table 5-704 Details - Object. See list of elements for detail

Element Name Required Data Type Description

component

Yes

String (10)

This field contains the unique identifier of the Up Charge component.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the cost of the Item/To Location combinations within the department.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified.

upChargeGroup

Yes

String (6)

This field contains the up charge group to which the component ID belongs. Valid values can be found on the codes table with a code type of UCHG. Examples are Admin. Fee (A), Freight (F) and Special K Fees (K).

componentCurrency

Yes

String (3)

This field contains the currency of the Up Charge component.

effectiveDate

No

date

The date from which the new values are effective in the system.

itemDefaultInd

No

String (1)

Indicates if component rate information is updated or not for existing items under the department.

transferAllocationDefaultInd

No

String (1)

Indicates if component rate information is updated or not for existing transfers and allocations under the department.

computationValueBase

No

String (10)

Contains the Computation Value Basis for the Up Charge component.

costBasis

No

String (6)

Contains the basis the Up Charge will be calculated against. Valid values are defined in code type UCCB (Up Charge Cost Basis) with values: Weighted Average Cost (W), Supplier Cost (S) and Off-Invoice Net Cost (N).

includeInTotalUpChargeInd

No

String (1)

Used to determine if the value of the individual up charge component is used to calculate the total up charge (Y) or if it is only used as the basis of calculating another up charge (N). This column will default to the value in the ELC_COMP table but can be updated at the department level.

Sample Input Message

{
  "dept": 3041,
  "upcharge": [
    {
      "fromLocation": "1231",
      "toLocation": "6000",
      "fromLocationType": "S",
      "toLocationType": "S",
      "details": [
        {
          "component": "UC1",
          "componentRate": 6.2,
          "perCount": 3,
          "perCountUom": "EA",
          "upChargeGroup": "A",
          "componentCurrency": "USD",
          "effectiveDate": "2001-12-31",
          "itemDefaultInd": "Y",
          "transferAllocationDefaultInd": "Y",
          "computationValueBase": "C1",
          "costBasis": "S",
          "includeInTotalUpChargeInd": "N"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Department

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to delete the department element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information. When a department is deleted, this service will add the department to a purge staging table for processing in the Daily Purge of Foundation Data process. 

Note: Associated custom flex attributes are also deleted when the department is deleted.

For more details on Departments, see the Create Department service description.

Service Type

DELETE

ReST URL
MerchIntegrations/services/merchandiseHierarchy/department/delete
Input Payload Details

Table 5-705 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

dept

Yes

Number (4)

The number which uniquely identifies the department.

Sample Input Message

{
  "dept": 3041
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Department Up Charge

Functional Area

Merchandise Hierarchy

Business Overview

This service is used to delete up charges linked with a department. When a request containing an up charge is received, the set of required fields is validated. If the up charge record exists for the department, then this gets deleted. If no up charge component is provided, the system will delete all the up charge components along with the from location / to location combination. Deleting up charges from a department does not automatically remove them from the items or transfers and allocations for items in the department.

Service Type

DELETE

ReST URL
MerchIntegrations/services/merchandiseHierarchy/department/upCharge/delete
Input Payload Details

Table 5-706 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

dept

Yes

Number (4)

The number which uniquely identifies the department.

upcharge

No

Collection of Object

References a collection of department upcharge information.

Table 5-707 Upcharge - Object. See list of elements for detail

Element Name Required Data Type Description

fromLocation

No

String (10)

Contains the source location from which goods will be transferred. This column can contain Country/Area/Region IDs when From Location Type is 'C', 'A', or 'R'. It will be a store, virtual warehouse or physical warehouse when From Location Type is 'S', 'W' or 'PW'. Otherwise, it should be left blank when From Location Type is either 'AS' or 'AW'.

toLocation

No

String (10)

Contains the destination location to which goods will be transferred. This column can contain Country/Area/Region IDs when To Location Type is 'C', 'A', or 'R'. It will be a store, virtual warehouse or physical warehouse when To Location Type is 'S', 'W' or 'PW'. Otherwise, it should be left blank when To Location Type is either 'AS' or 'AW'.

fromLocationType

Yes

String (6)

Contains the type of source location from which goods will be transferred. Valid values are defined in code type 'LTPC'. Examples are: C - Country, A - Area, R - Region, S - Store, W - Virtual Warehouse, PW - Physical Warehouse, AS - All Stores, AW - All Warehouses.

toLocationType

Yes

String (6)

Contains the type of destination location to which goods will be transferred. Valid values are defined in code type 'LTPC'. Examples are: C - Country, A - Area, R - Region, S - Store, W - Virtual Warehouse, PW - Physical Warehouse, AS - All Stores, AW - All Warehouses.

details

No

Collection of Object

References a collection of department upcharge detail information.

Table 5-708 Details - Object. See list of elements for detail

Element Name Required Data Type Description

component

No

String (10)

This field contains the unique identifier of the Up Charge component.

Sample Input Message

{
  "dept": 3041,
  "upcharge": [
    {
      "fromLocation": "1121",
      "toLocation": "1311",
      "fromLocationType": "S",
      "toLocationType": "S",
      "details": [
        {
          "component": "UC1"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Department

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to update the department element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information. When a department is updated, this service will first validate that all the required fields are present in the message. Business level validation on the input information will be performed to:

  • Verify if the department is present.

  • Verify if total market amount is received then it should be at least 1000.

  • Verify the child detail, if included, contain all required fields. The child detail contain VAT and upcharge details for a department.

If all the validations are completed successfully, then the department is updated. Active custom flex attributes can also be updated for the department via this service.

For more details on Department, see the Create Department service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/merchandiseHierarchy/department/update
Input Payload Details

Table 5-709 Update - Object. See list of elements for detail

Element Name Required Data Type Description

dept

Yes

Number (4)

The number which uniquely identifies the department. This value cannot be modified.

deptName

Yes

String (120)

The name of the department.

buyer

No

Number (4)

The number of the buyer associated to the department. This value must be predefined on the BUYER table.

totalMarketAmount

No

Number (24,4)

The total market amount that is expected for the department. This value cannot be less than 1000.

merchandiser

No

Number (4)

The number of the merchandiser that is associated to the department. This value must be predefined on the MERCHANT table.

groupNo

Yes

Number (4)

The number of the group to which the department belongs. This value must be predefined on the GROUPS table.

budgetedMarkup

No

Number (12,4)

The budgeted markup percentage. The markup percent of cost. If this value is not populated on the message it will be calculated to be the inverse of the budgeted intake percentage. This column will hold 70% as 70, not. 70.

markupCalcType

Yes

String (2)

The code letter that indicates how markup is calculated in this department. Valid values are cost (C) and retail (R).

maximumAverageCounter

No

Number (5)

The maximum count of days with acceptable data to include in an average for items within the department. This value is required if RPM is installed.

averageTolerancePercent

No

Number (12,4)

The tolerance percentage value used in averaging for items within this value. This column will hold 70% as 70, not. 70. This value is required if pricing is installed.

budgetedIntakePercent

No

Number (12,4)

The budgeted intake percentage. The percent of the total take that is income. If this field is not populated on the message it will be calculated as the inverse of the budgeted markup percentage. This column will hold 70% as 70, not. 70.

customFlexAttribute

No

Collection of Object

References a collection of customer flexible attributes.

Table 5-710 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Sample Input Message

{
  "dept": 3041,
  "deptName": "deptName",
  "buyer": 1000,
  "totalMarketAmount": 3,
  "merchandiser": 1000,
  "groupNo": 1000,
  "budgetedMarkup": 3,
  "markupCalcType": "C",
  "maximumAverageCounter": 10000,
  "averageTolerancePercent": 3,
  "budgetedIntakePercent": 3,
  "customFlexAttribute": [
    {
      "name": "REVIEW_DATE",
      "value": null,
      "valueDate": "2001-12-31"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Department Taxes

Functional Area

Merchandise Hierarchy

Business Overview

If you are configured to run Merchandising using Simple VAT (SVAT) for your default tax type, then you can update the VAT rates by region for the department using this service. This service will check for all the required fields in the message and updates the VAT information for a department. When updating VAT details for a department containing items, the VAT information will default to all items within the department.

Service Type

PUT

ReST URL
MerchIntegrations/services/merchandiseHierarchy/department/tax/update
Input Payload Details

Table 5-711 Update - Object. See list of elements for detail

Element Name Required Data Type Description

dept

Yes

Number (4)

The number which uniquely identifies the department. This value cannot be modified.

vat

No

Collection of Object

References a collection of department VAT information.

Table 5-712 Vat - Object. See list of elements for detail

Element Name Required Data Type Description

vatRegion

Yes

Number (4)

The number of the VAT region to which this department is associated. This value must be predefined on the VAT_REGION table.

vatCode

Yes

String (6)

The alphanumeric identifier of the VAT code. This value must be predefined on the VAT_CODES table.

vatType

Yes

String (1)

Indicates if the VAT rate is used for purchasing (C), selling (R), or both (B).

reverseVatInd

No

String (1)

Indicates if items in the department are subject to reverse charge VAT at the vat region. Valid values are Y and N.

Sample Input Message

{
  "dept": 3041,
  "vat": [
    {
      "vatRegion": 1000,
      "vatCode": "S",
      "vatType": "C",
      "reverseVatInd": "Y"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Department Up Charge

Functional Area

Merchandise Hierarchy

Business Overview

This service is used to update up charges linked with a department. When a message containing up charge details is received, the set of required fields is validated. If an up charge record exists for a department and the from-location and to-location combination in the request payload, then the up charge details are updated for the department. As part of the update there is also an option to have the up charges updated for items in the department, or unshipped transfers and allocations for items in the department. The department up charges will be updated as soon as the request payload is consumed, but the updates will be cascaded to items, transfers, and allocations via batches which runs at the end of every day.

Service Type

PUT

ReST URL
MerchIntegrations/services/merchandiseHierarchy/department/upCharge/update
Input Payload Details

Table 5-713 Update - Object. See list of elements for detail

Element Name Required Data Type Description

dept

Yes

Number (4)

The number which uniquely identifies the department. This value cannot be modified.

upcharge

No

Collection of Object

References a collection of department upcharges.

Table 5-714 Upcharge - Object. See list of elements for detail

Element Name Required Data Type Description

fromLocation

No

String (10)

Contains the source location from which goods will be transferred. This column can contain Country/Area/Region IDs when From Location Type is 'C', 'A', or 'R'. It will be a store, virtual warehouse or physical warehouse when From Location Type is 'S', 'W' or 'PW'. Otherwise, it should be left blank when From Location Type is either 'AS' or 'AW'.

toLocation

No

String (10)

Contains the destination location to which goods will be transferred. This column can contain Country/Area/Region IDs when To Location Type is 'C', 'A', or 'R'. It will be a store, virtual warehouse or physical warehouse when To Location Type is 'S', 'W' or 'PW'. Otherwise, it should be left blank when To Location Type is either 'AS' or 'AW'.

fromLocationType

Yes

String (6)

Contains the type of source location from which goods will be transferred. Valid values are defined in code type 'LTPC'. Examples are: C - Country, A - Area, R - Region, S - Store, W - Virtual Warehouse, PW - Physical Warehouse, AS - All Stores, AW - All Warehouses

toLocationType

Yes

String (6)

Contains the type of destination location to which goods will be transferred. Valid values are defined in code type 'LTPC'. Examples are: C - Country, A - Area, R - Region, S - Store, W - Virtual Warehouse, PW - Physical Warehouse, AS - All Stores, AW - All Warehouses.

details

No

Collection of Object

References a collection of department upcharge detail information.

Table 5-715 Details - Object. See list of elements for detail

Element Name Required Data Type Description

component

Yes

String (10)

This field contains the unique identifier of the Up Charge component.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the cost of the Item/To Location combinations within the department.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified.

upChargeGroup

Yes

String (6)

This field contains the up charge group to which the component ID belongs. Valid values can be found on the codes table with a code type of UCHG. Examples are Admin. Fee (A), Freight (F) and Special K Fees (K).

componentCurrency

Yes

String (3)

This field contains the currency of the Up Charge component.

effectiveDate

No

date

The date from which the new values are effective in the system.

itemDefaultInd

No

String (1)

Indicates if component rate information is updated or not for existing items under the department.

transferAllocationDefaultInd

No

String (1)

Indicates if component rate information is updated or not for existing transfers and allocations under the department.

computationValueBase

No

String (10)

Contains the Computation Value Basis for the Up Charge component.

costBasis

No

String (6)

Contains the basis the Up Charge will be calculated against. Valid values are defined in code type UCCB (Up Charge Cost Basis) with values: Weighted Average Cost (W), Supplier Cost (S) and Off-Invoice Net Cost (N).

includeInTotalUpChargeInd

No

String (1)

Used to determine if the value of the individual up charge component is used to calculate the total up charge (Y) or if it is only used as the basis of calculating another up charge (N). This column will default to the value in the ELC_COMP table but can be updated at the department level.

Sample Input Message

{
  "dept": 3041,
  "upcharge": [
    {
      "fromLocation": "1231",
      "toLocation": "1521",
      "fromLocationType": "S",
      "toLocationType": "S",
      "details": [
        {
          "component": "UC1",
          "componentRate": 3.55,
          "perCount": 3,
          "perCountUom": "EA",
          "upChargeGroup": "A",
          "componentCurrency": "USD",
          "effectiveDate": "2001-12-31",
          "itemDefaultInd": "Y",
          "transferAllocationDefaultInd": "Y",
          "computationValueBase": null,
          "costBasis": "S",
          "includeInTotalUpChargeInd": "N"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Division Download Service

The following services are included in this functional area:

Get Division Details for Provided Division

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Get Divisions

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Division Upload Service

The following services are included in this functional area:

Create Division

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to create the division element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information. When a new division is created, this service will first validate that all the required fields are present in the request payload. Business level validation on the input information will be performed to:

  • Verify division is not already present

  • Verify if the total market amount is received, then it should be at least 1000.

If both the above validations are met, the division in the message data is created.

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/division/create
Input Payload Details

Table 5-716 Create - Object. See list of elements for detail

Element Name Required Data Type Description

division

Yes

Number (4)

The unique identifier of the division.

divisionName

Yes

String (120)

The name of the division.

merchandiser

No

Number (4)

The number of the merchant associated with the division. This value must be predefined on the MERCHANT table.

buyer

No

Number (4)

The number of the buyer associated with the division. This value must be predefined on the BUYER table.

totalMarketAmount

No

Number (24,4)

The total market amount that is expected for the division. If this field is not null it must be at least 1000.

Sample Input Message

{
  "division": 200,
  "divisionName": "Division 200",
  "merchandiser": 612,
  "buyer": 307,
  "totalMarketAmount": 1010
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Division

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to delete the division element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information. When a division is deleted, this service will first validate that all required fields are present in the message. Business level validation on the input information will be performed to:

  • Verify the division already exists.

  • Verify the division is not associated to a differentiator group.

  • Verify the division is not associated to a season ID.

  • Verify the division is not associated to a ticket type.

  • Verify the division is not associated to a UDA.

If the information passes the above validations, the division will be deleted in Merchandising. Deletion of a division will get processed immediately upon receipt of the request, assuming that there are no dependent levels below it.

Service Type

DELETE

ReST URL
MerchIntegrations/services/merchandiseHierarchy/division/delete
Input Payload Details

Table 5-717 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

division

Yes

Number (4)

The unique identifier of the division.

Sample Input Message

{
  "division": 1000
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Division

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to update the division element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information. When a division is updated, this service will first validate that all required fields are present in the request payload. Business level validation on the input information will be performed to:

  • Verify division is present.

  • Verify if the total market amount is received, then it should be at least 1000.

If all the validations are met, the details of the division are updated.

For more details on Division, see the Create Division service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/merchandiseHierarchy/division/update
Input Payload Details

Table 5-718 Update - Object. See list of elements for detail

Element Name Required Data Type Description

division

Yes

Number (4)

The unique identifier of the division.

divisionName

Yes

String (120)

The name of the division.

merchandiser

No

Number (4)

The number of the merchant associated with the division. This value must be predefined on the MERCHANT table.

buyer

No

Number (4)

The number of the buyer associated with the division. This value must be predefined on the BUYER table.

totalMarketAmount

No

Number (24,4)

The total market amount that is expected for the division. If this field is not null it must be at least 1000.

Sample Input Message

{
  "division": 1000,
  "divisionName": "divName",
  "merchandiser": 1000,
  "buyer": 1000,
  "totalMarketAmount": 3
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Group Download Service

The following services are included in this functional area:

Get Group for Provided Group

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Get Groups

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Group Upload Service

The following services are included in this functional area:

Create Group

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to create the group element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information.

When a new group is created, this service will first validate that all the required fields are present in the request payload. Business level validation on the input information will be performed, which checks whether the group already exists. If it does not exist, the group is created.

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/group/create
Input Payload Details

Table 5-719 Create - Object. See list of elements for detail

Element Name Required Data Type Description

groupNo

Yes

Number (4)

The number which uniquely identifies the group. This field cannot be modified.

groupName

Yes

String (120)

Description is not available.

division

Yes

Number (4)

The identifier of the division of which the group is a member. This value must be predefined on the DIVISION table.

merchandiser

No

Number (4)

The number of the merchandiser associated to the group. This value must be predefined on the MERCHANT table.

buyer

No

Number (4)

The number of the buyer associated to the group. This value must be predefined on the BUYER table.

Sample Input Message

{
  "groupNo": 1000,
  "groupName": "groupName",
  "division": 1000,
  "merchandiser": 1000,
  "buyer": 1000
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Group

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to delete the group element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information. When a group is deleted, this service will first validate that all required fields are present in the request payload. Business level validation on the input information will be performed to:

  • Verify the group already exists.

  • Verify the group is not associated to a differentiator group.

  • Verify the group is not associated to a season ID

  • Verify the group is not associated to a ticket type.

  • Verify the group is not associated to a UDA.

If the information passes the above validations, the group will be deleted from Merchandising. Deletion of a group will get processed immediately upon receipt of the request, assuming that there are no dependent levels below it.

Service Type

DELETE

ReST URL
MerchIntegrations/services/merchandiseHierarchy/group/delete
Input Payload Details

Table 5-720 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

groupNo

Yes

Number (4)

Description is not available.

Sample Input Message

{
  "groupNo": 1000
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Group

Functional Area

Merchandise Hierarchy

Business Overview

This service may be used to update the group element of the merchandise hierarchy based on an external system if Merchandising is not the system of record for merchandise hierarchy information. When a group is updated, this service will first validate that all required fields are present in the request payload. Business level validation on the input information will be performed to verify whether the group to be updated already exists. If group already exists, the details of the group are updated.

For more details on Group, see the Create Group service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/merchandiseHierarchy/group/update
Input Payload Details

Table 5-721 Update - Object. See list of elements for detail

Element Name Required Data Type Description

groupNo

Yes

Number (4)

The number which uniquely identifies the group. This field cannot be modified.

groupName

Yes

String (120)

Description is not available.

division

Yes

Number (4)

The identifier of the division of which the group is a member. This value must be predefined on the DIVISION table.

merchandiser

No

Number (4)

The number of the merchandiser associated to the group. This value must be predefined on the MERCHANT table.

buyer

No

Number (4)

The number of the buyer associated to the group. This value must be predefined on the BUYER table.

Sample Input Message

{
  "groupNo": 1000,
  "groupName": "groupName",
  "division": 1000,
  "merchandiser": 1000,
  "buyer": 1000
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Merchandise Hierarchy Download Service

The following services are included in this functional area:

Get Merchandise Hierarchy

This section describes the MerchHierarchy Detail service.

Business Overview

MerchHierarchyDetail service allows user to retrieve full merchandising hierarchy information for the input Department.

Service Type

Get

ReST URL
/MerchHierarchy/merchHierarchy
Input Parameters

Department ID

Output

RestMerchHierarchyRecRDO

Parameter Name Data Type

profitCalcType

BigDecimal

deptVatInclInd

String

classAttribute

BigDecimal

division

BigDecimal

classVatInd

String

subclass

BigDecimal

buyer

BigDecimal

dept

BigDecimal

className

String

subName

String

groupNo

BigDecimal

otbCalcType

String

groupName

String

divName

String

purchaseType

BigDecimal

merch

BigDecimal

deptName

String

JSON Structure

  {
    "profitCalcType": null,
    "deptVatInclInd": null,
    "classAttribute": null,
    "division": null,
    "classVatInd": null,
    "subclass": null,
    "buyer": null,
    "dept": null,
    "className": null,
    "subName": null,
    "groupNo": null,
    "otbCalcType": null,
    "groupName": null,
    "divName": null,
    "purchaseType": null,
    "merch": null,
    "deptName": null,
    "links": [],
    "hyperMediaContent": {
      "linkRDO": []
    }
  }
Table Impact
TABLE SELECT INSERT UPDATE DELETE

V_MERCH_HIERARCHY

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Subclass Download Service

The following services are included in this functional area:

Get Subclass Details for Provided Subclass

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Get Subclasses

Endpoints
MerchIntegrations/services/foundation/merchhier/division/{division}
MerchIntegrations/services/foundation/merchhier/division
MerchIntegrations/services/foundation/merchhier/groups/{group}
MerchIntegrations/services/foundation/merchhier/groups
MerchIntegrations/services/foundation/merchhier/deps/{dept}
MerchIntegrations/services/foundation/merchhier/deps
MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
MerchIntegrations/services/foundation/merchhier/class
MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
MerchIntegrations/services/foundation/merchhier/subclass
Functional Area

Merchandise Hierarchy

Business Overview

This service can be used by external applications to get all or selected hierarchy levels and its details from Merchandising.

Service Type

GET

ReST URLs for Division
/MerchIntegrations/services/foundation/merchhier/division? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/division/{division}
ReST URLs for Groups
/MerchIntegrations/services/foundation/merchhier/groups? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/groups/{group}
ReST URLs for Department
/MerchIntegrations/services/foundation/merchhier/deps? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}
/MerchIntegrations/services/foundation/merchhier/deps/{dept}
ReST URLs for Class
/MerchIntegrations/services/foundation/merchhier/class? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}
/MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
ReST URLs for Subclass
/MerchIntegrations/services/foundation/merchhier/subclass? since={since}&before={before}&offsetkey={offsetkey}&limit={limit}&dept={dept}&class={class}&subclass={subclass}
/MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Common Input Parameters for URLs Without Path Parameter
Parameter Name Required Data Type Description

since

No

String

Since Date.

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

before

No

String

Before Date

Format: yyyy-mm-dd"T"hh24:mi:ss.fftzh:tzm

offsetkey

No

String

Offset Key. Valid Value is combination of sort_order_seq and node id.

limit

No

BigDecimal

Pagination limit. Default Value is 1000.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/class
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return classes which belong to this dept

class

No

Number

If class is provided, the service will return class(es) matching the input class number. To query a specific class, value for both dept and class should be provided.

Input Query Parameter for /MerchIntegrations/services/foundation/merchhier/subclass
Parameter Name Required Data Type Description

dept

No

Number

If dept is provided, the service will return subclasses which belong to this dept

class

No

Number

If class is provided, the service will return subclass(es) whose parent class number matches the input class number.

subclass

No

Number

If subclass is provided, the service will return subclass(es) matching the input subclass number. To query a specific subclass, value for dept and class and subclass should be provided.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/division/{division}
Parameter Name Required Data Type Description

division

Yes

Number

This field contains the number which uniquely identifies the division of the company

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/groups/{group}
Parameter Name Required Data Type Description

group

Yes

Number

This field contains the number which uniquely identifies the group.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/deps/{dept}
Parameter Name Required Data Type Description

dept

Yes

Number

This field contains the number which uniquely identifies the department.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/class/{uniqueClassId}
Parameter Name Required Data Type Description

uniqueClassId

Yes

Number

This field contains the number that uniquely identifies the department/class combination.

Input Path Parameter for /MerchIntegrations/services/foundation/merchhier/subclass/{uniqueSubclassId}
Parameter Name Required Data Type Description

uniqueSubclassId

Yes

Number

This field contains the number that uniquely identifies the department/class/subclass combination.

Output - Division
Name Data Type Description

action

String

Action for division details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

division

Number

This field contains the number which uniquely identifies the division of the company.

divisionName

String

This field contains the name which, along with the division number, identifies the division of the company.

buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

company

Number

This field contains the number which uniquely identifies the Company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Groups
Name Data Type Description

action

String

Action for group details. Valid Values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

group

Number

This field contains the number which uniquely identifies the group.

groupName

String

This field contains the description which, along with the group number, identifies the group.

Buyer

Number

This field contains the number of the buyer associated with the division.

merchantId

String

This field contains the number of the merchandiser associated with the division.

division

Number

This field contains the number which uniquely identifies the division of the company.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Department
Name Data Type Description

action

String

Action for department details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

dept

Number

This field contains the number which uniquely identifies the department.

deptName

String

This field contains the description which identifies the department.

buyer

Number

This field contains the number of the buyer associated with the division.

purchaseType

Number

This field Contains a code which indicates whether items in this department are, by default, owned (normal) merchandise, consignment, or concession.

totalMarketAmount

Number

This field contains the total market amount that is expected for the division. The field can be used for analytics or reporting.

merchantId

String

This field contains the number of the merchandiser associated with the division.

group

Number

This field contains the number which uniquely identifies the group.

budgetMarkup

Number

This field contains the number of the group in which the department exists.

profitCalcType

Number

This field contains a number which indicates whether profit will be calculated by cost or retail, indicating the accounting method to be used for the department.

markupCalcType

String

This field contains the code which determines how markup is calculated in this department.

otbCalcType

String

This field contains the code which determines how markup is calculated in this department.

budgetedIntakePercent

Number

This field contains maximum average counter will hold the maximum count of days with acceptable data to include in an average for items within the department.

deptVatIncludeInd

String

This field is no longer used by Merchandising and will always be defaulted to Y.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Class
Name Data Type Description

action

String

Action for class details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

class

Number

Contains the number which uniquely identifies the class within the department.

className

String

This field contains the name of the class which, along with the class number, identifies the class.

classVATInd

String

This field is no longer used by Merchandising and will always default to N.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Subclass
Name Data Type Description

action

String

Action for subclass details. Valid values are INSERT, UPDATE and DELETE.

hierarchylevel

String

This field contains the Merchandising Hierarchy Level.

subclass

Number

This field Contains the number which uniquely identifies the subclass within the department and class.

subclassName

String

This field Contains the name of the subclass which, along with the subclass number, uniquely identifies the subclass.

class

Number

Contains the number which uniquely identifies the class within the department.

dept

Number

This field contains the number of the department of which the class is a member.

uniqueSubclassId

Number

This field contains the number that uniquely identifies the department/class/subclass combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class/subclass key in their hierarchy and item structures.

uniqueClassId

Number

This field contains the number that uniquely identifies the department/class combination. This column is populated by the system and not displayed to end users. This will be used for integration to downstream systems as many downstream systems are unable to accommodate the composite dept/class key in their hierarchy and item structures.

createDateTime

String

This field holds the record creation date.

updateDateTime

String

This field holds the date when the record was last updated.

customFlexAttributes

 

This list holds custom flex attributes for the Department.

cacheTimestamp

String

This field specifies date and time when Merch Hier record was last maintained.

Output - Custom Flex Attribute
Name Data Type Description

name

String

This field will hold the custom flex attribute name.

value

String

This field will hold the numeric or string value of the custom flex attribute.

valueDate

String

This field will hold the date value of the custom flex attribute.

createDateTime

String

This field will hold the date time when the custom flex attribute was inserted.

updateDateTime

String

This field will hold the date time when the custom flex attribute was last updated.

Elements in JSON Output
Elements Description

items

The first element is named as items and contains a number of child elements. Each child element corresponds to a row in the result set generated by the query.

hasMore

This is dependent on limit value. If the total rows are more than then limit defined then hasMore will be set to true else false.

limit

This is used to limit the rows to control the paging of result data. Based on the limit, next and previous links are displayed.

For example: If the limit is set to 25, internal it tries to fetch 26 rows. If 26th row exists then 25 rows are returned along with a "next" link else no links would be added to the JSON response.

links

“self” : This contains URI pointing to current page.

“next”: This contains URI pointing to the next page of results.

Example JSON Output

Division

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DIVISION",
      "division": 1000,
      "divisionName": "Grocery",
      "buyer": 1002,
      "merchantId": "612",
      "totalMarketAmount": null,
      "company": 1,
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T11:34:21.000Z",
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Groups

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "GROUP",
      "group": 1841,
      "groupName": "Smoke Group",
      "buyer": 1003,
      "merchantId": "845",
      "division": 3978,
      "createDateTime": "2020-08-24T17:06:58.000Z",
      "updateDateTime": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Department

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "DEPARTMENT",
      "dept": 3061,
      "deptName": "Cats",
      "buyer": 610,
      "purchaseType": 0,
      "totalMarketAmount": null,
      "merchantId": "840",
      "group": 306,
      "budgetedMarkup": 33.3333,
      "profitCalcType": 1,
      "markupCalcType": "C",
      "otbCalcType": "C",
      "budgetedIntakePercent": 25,
      "deptVatIncludeInd": "Y",
      "createDateTime": "2020-08-18T08:45:53.000Z",
      "updateDateTime": "2021-07-23T12:01:34.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Class

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "CLASS",
      "class": 1,
      "className": "Childrens",
      "classVatInd": "Y",
      "dept": 3100,
      "uniqueClassId": 204,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": null,
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}

Subclass

{
  "items": [
    {
      "action": null,
      "hierarchyLevel": "SUBCLASS",
      "subclass": 2,
      "subclassName": "Reels",
      "class": 3,
      "dept": 3032,
      "uniqueSubclassId": 15,
      "uniqueClassId": 137,
      "createDateTime": "2020-08-18T08:45:55.000Z",
      "updateDateTime": "2021-07-23T12:12:17.000Z",
      "customFlexAttribute": null,
      "cacheTimestamp": "2021-08-19T06:55:11.469Z"
    }
  ],
  "hasMore": false,
  "limit": 1,
  "count": 1,
  "links": null
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE

MERCHAPI_CONFIG

Yes

No

No

No

MERCHAPI_CONSUMER_CONFIG

Yes

No

No

No

MERCHAPI_ASYNC_REQUEST

Yes

No

No

No

MERCH_BATCH_PARAM

Yes

No

No

No

ICL_RMS_DIVISION

Yes

No

Yes

Yes

ICL_RMS_GROUPS

Yes

No

Yes

Yes

ICL_RMS_DEPS

Yes

No

Yes

Yes

ICL_RMS_CLASS

Yes

No

Yes

Yes

ICL_RMS_SUBCLASS

Yes

No

Yes

Yes

COMPHEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

MERCHAPI_EXT_MERCHHIER

Yes

Yes

Yes

Yes

V_ MERCHAPI_EXT_MERCH_HIER _JSON

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

MERCHAPI_EXT_CLASS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_DEPS_CFA

Yes

Yes

No

Yes

MERCHAPI_EXT_SUBCLASS_CFA

Yes

Yes

No

Yes

DEPS_CFA_EXT

Yes

No

No

No

CLASS_CFA_EXT

Yes

No

No

No

SUBCLASS_CFA_EXT

Yes

No

No

No

Subclass Upload Service

The following services are included in this functional area:

Create Subclass

Functional Area

Merchandise Hierarchy

Business Overview

This service is can be used to create subclasses for an existing department-class in Merchandising. When a new subclass is created, this service will first validate that all required fields are present in the request payload. Business level validation on the input information will be performed, which checks whether the subclass already exists. If the subclass does not exist, then it is created.  Active custom flex attributes that are associated with a subclass can also be created through this service.

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/subclass/create
Input Payload Details

Table 5-722 Create - Object. See list of elements for detail

Element Name Required Data Type Description

subclass

Yes

Number (4)

The unique number which identifies the subclass. This value cannot be modified.

subclassName

Yes

String (120)

The name of the subclass.

class

Yes

Number (4)

The number of the class which contains the subclass. This value must be predefined on the CLASS table. This value cannot be modified.

dept

Yes

Number (4)

The number of the department which contains the subclass. This value must be predefined on the DEPS table. This value cannot be modified.

intercompanyTransferPriceBasis

No

String (6)

This specifies the Default Intercompany Transfer Price that will be used during recording of transaction data postings on intercompany transfers and allocations. Valid values are 'W'(Weighted Average Cost) and 'S'(Supplier Cost). If not defined, the value will default to 'W' for subclasses under departments with cost-based profit calculation type or to 'R' (Retail Based) for subclasses under departments with retail-based profit calculation type.

customFlexAttribute

No

Collection of Object

References a collection of customer flexible attributes.

Table 5-723 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Sample Input Message

{
  "subclass": 1,
  "subclassName": "subclassName",
  "class": 1,
  "dept": 3041,
  "intercompanyTransferPriceBasis": null,
  "customFlexAttribute": [
    {
      "name": "REVIEW_DATE",
      "value": null,
      "valueDate": "2001-12-31"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Subclass

Functional Area

Merchandise Hierarchy

Business Overview

This service is used to delete an existing subclass from Merchandising. When a subclass is deleted, this service will add the subclass to a purging staging table for processing in the Daily Purge of Foundation Data process.

Note: Associated custom flex attributes are deleted when the subclass is deleted.

For more details on Subclass, see the Create Subclass service description.

Service Type

DELETE

ReST URL
MerchIntegrations/services/merchandiseHierarchy/subclass/delete
Input Payload Details

Table 5-724 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

subclass

Yes

Number (4)

The unique number which identifies the subclass.

class

Yes

Number (4)

The number of the class which contains the subclass. This value must be predefined on the CLASS table.

dept

Yes

Number (4)

The number of the department which contains the subclass. This value must be predefined on the DEPS table.

Sample Input Message

{
  "subclass": 1,
  "class": 1,
  "dept": 3041
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Subclass

Functional Area

Merchandise Hierarchy

Business Overview

This service is used to update an existing subclass in Merchandising. When a subclass is updated, this service will first validate that all the required fields are present in the request payload. Business level validation on the input information will be performed which verifies if the subclass to be updated already exists. If the subclass already exists, it is updated. Active custom flex attributes that are associated with a subclass can also be updated using this service.

For more details on Subclass, see the Create Subclass service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/merchandiseHierarchy/subclass/update
Input Payload Details

Table 5-725 Update - Object. See list of elements for detail

Element Name Required Data Type Description

subclass

Yes

Number (4)

The unique number which identifies the subclass. This value cannot be modified.

subclassName

Yes

String (120)

The name of the subclass.

class

Yes

Number (4)

The number of the class which contains the subclass. This value must be predefined on the CLASS table. This value cannot be modified.

dept

Yes

Number (4)

The number of the department which contains the subclass. This value must be predefined on the DEPS table. This value cannot be modified.

intercompanyTransferPriceBasis

No

String (6)

This specifies the Default Intercompany Transfer Price that will be used during recording of transaction data postings on intercompany transfers and allocations. Valid values are 'W'(Weighted Average Cost) and 'S'(Supplier Cost). If not defined, the value will default to 'W' for subclasses under departments with cost-based profit calculation type or to 'R' (Retail Based) for subclasses under departments with retail-based profit calculation type.

customFlexAttribute

No

Collection of Object

References a collection of customer flexible attributes.

Table 5-726 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Sample Input Message

{
  "subclass": 1,
  "subclassName": "subclassName",
  "class": 1,
  "dept": 3041,
  "intercompanyTransferPriceBasis": null,
  "customFlexAttribute": [
    {
      "name": "REVIEW_DATE",
      "value": null,
      "valueDate": "2001-12-31"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Reclassification

The following services are included in this functional area:

Item Reclassification Download Service

Get Item Reclassifications

This section describes the Reclass Detail service.

Business Overview

This service is used to retrieve reclassification details for a given item.

Service Type

Get

ReST URL
Reclass/reclass?item={itemNumber}
Input Parameters
Parameter Name Required Description

Item

Yes

Item number

Output

RestReclassRecRDO

Parameter Name Data Type

toClass

BigDecimal

reclassDate

Timestamp

reclassDesc

String

toSubclass

BigDecimal

reclassNo

BigDecimal

toDept

toDept

JSON Structure

[
  {
    "toClass": null,
    "reclassDate": null,
    "reclassDesc": null,
    "toSubclass": null,
    "reclassNo": null,
    "toDept": null,
    "links": [],
    "hyperMediaContent": {
      "linkRDO": []
    }
  }
]
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RECLASS_HEAD

Yes

No

No

No

RECLASS_ITEM

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Item Reclassification Upload Service

Create Item Reclassification
Functional Area

Merchandise Hierarchy - Reclassification

Business Overview

This service allows external systems to create item reclassification events within Merchandising which are necessary in order to keep it in sync with the external system. Merchandising subscribes to item reclassification messages, which updates the department, class, and/or subclass for an item, based on the data that is published by the external system. Only the following item types can be interfaced using this API:

  • Transaction level items without a parent

  • Parent items, whose child items are the transaction level, such as with a fashion style (parent) and its SKUs (children)

  • Complex pack items - but the reclassification cannot include the component items in the pack

The following item types cannot be reclassified:

  • Child items with a parent - these are reclassified when the parent is updated

  • Reference items - these below transaction level items are automatically reclassified with the transaction level item or its parent, whichever applies.

  • Simple Packs - these are reclassified when the component item is reclassified

This service also allows a reclassification event to be created for a department/class/subclass combination that does not exist yet. This is valid as long as the merchandise hierarchy is scheduled to be created on or prior to the reclassification taking effect. In order to create a reclassification, both header and detail level records are required.

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/itemReclassification/create
Availability During Nightly Batch Cycle

This service will not be available during total duration of nightly batch run cycle.

Input Payload Details

Table 5-727 Create - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of item reclassification records.

Table 5-728 Items - Object. See list of elements for detail

Element Name Required Data Type Description

reclassNo

Yes

Number (4)

The unique number which identifies the reclass event.

description

Yes

String (120)

The description of the reclass event.

reclassDate

Yes

date

The date on which the reclass event is scheduled to take place.

toDept

Yes

Number (4)

The department to which the item will belong after the reclass event.

toClass

Yes

Number (4)

The class to which the item will belong after the reclass event.

toSubclass

Yes

Number (4)

The subclass to which the item will belong after the reclass event.

items

No

Collection of Object

References a collection of items in the reclassification event.

Table 5-729 Items.Items - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

The item in the reclass event.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "reclassNo": 1,
      "description": "reclassDesc",
      "reclassDate": "2001-12-31",
      "toDept": 3041,
      "toClass": 1,
      "toSubclass": 1,
      "items": [
        {
          "item": "100100076"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}
Create Item Reclassification Detail
Functional Area

Merchandise Hierarchy - Reclassification

Business Overview

This service allows external systems to add items to an existing item reclassification event in Merchandising in order to keep it in sync with the external system. Merchandising subscribes to item reclassification requests, which update the department, class, and/or subclass for the item, based on the data that is published by the external system. 

Before an item is added to the reclassification event, the following things would be validated:

  • Must be a level 1 item

  • If the item is a pack, it should not be a simple pack

  • Must not be on any approved order

  • Must not be an orderable buyer pack that can be received as component items

  • Must not be on an existing reclassification

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/itemReclassification/detail/create
Availability During Nightly Batch Cycle

This service will not be available during total duration of nightly batch run cycle.

Input Payload Details

Table 5-730 Create - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of item reclassification details.

Table 5-731 Items - Object. See list of elements for detail

Element Name Required Data Type Description

reclassNo

Yes

Number (4)

The unique number which identifies the reclass event.

description

Yes

String (120)

The description of the reclass event.

reclassDate

Yes

date

The date on which the reclass event is scheduled to take place.

toDept

Yes

Number (4)

The department to which the item will belong after the reclass event.

toClass

Yes

Number (4)

The class to which the item will belong after the reclass event.

toSubclass

Yes

Number (4)

The subclass to which the item will belong after the reclass event.

items

No

Collection of Object

References a collection of items in the reclassification event.

Table 5-732 Items.Items - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

The item to be added to the reclassification event.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "reclassNo": 1,
      "description": "reclassDesc",
      "reclassDate": "2001-12-31",
      "toDept": 3041,
      "toClass": 1,
      "toSubclass": 1,
      "items": [
        {
          "item": "100100076"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}
Delete Item Reclassification
Functional Area

Merchandise Hierarchy - Reclassification

Business Overview

This service allows external systems to delete item reclassification events within Merchandising in order to keep it in sync with the external system. Reclassifications can be deleted using any of the following:

  • Deleting a single reclassification event

  • Deleting all reclassification events on a particular event date

  • Deleting all reclassification events

Service Type

DELETE

ReST URL
MerchIntegrations/services/merchandiseHierarchy/itemReclassification/delete
Availability During Nightly Batch Cycle

This service will not be available during total duration of nightly batch run cycle.

Input Payload Details

Table 5-733 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

reclassNo

No

Number (4)

If this is provided, then the particular reclass event will be deleted. The purgeAllInd must be N when this is provided.

reclassDate

No

date

If this is provided, then all reclass events with this date will be deleted. The purgeAllInd must be N when this is provided.

purgeAllInd

No

String (1)

If this field is Y, then all item reclass events will be deleted. If this is provided, both reclassNo and reclassDate must not be provided.

Sample Input Message

{
  "reclassNo": 1,
  "reclassDate": "2001-12-31",
  "purgeAllInd": "Y"
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}
Delete Item Reclassification Detail
Functional Area

Merchandise Hierarchy - Reclassification

Business Overview

This service allows external systems to remove items from an existing item reclassification event in Merchandising in order to keep it in sync with the external system. The entire reclassification event gets deleted once there are no remaining item lines based on detail level deletion.

Service Type

DELETE

ReST URL
MerchIntegrations/services/merchandiseHierarchy/itemReclassification/detail/delete
Availability During Nightly Batch Cycle

This service will not be available during total duration of nightly batch run cycle.

Input Payload Details

Table 5-734 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

reclassNo

Yes

Number (4)

The reclass event for which deletion activity is occurring.

items

Yes

Collection of Object

References a collection of items to be deleted from a reclassification event.

Table 5-735 Items - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

The item in the reclassification event that needs to be deleted.

Sample Input Message

{
  "reclassNo": 1,
  "items": [
    {
      "item": "100100076"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Merchandise Hierarchy Reclassification Upload Service

Create Merchandise Hierarchy Reclassification
Functional Area

Merchandise Hierarchy - Reclassification

Business Overview

This service allows Merchandising to subscribe to merchandise hierarchy reclassification requests from an external system and is intended to be used by retailers who manage their hierarchies in an external system which is outside Merchandising. This service creates pending merchandise hierarchy reclassification events within Merchandising based on the data sent by the external system.

When a new merchandise hierarchy reclassification is created, the service will first validate that all the required fields are present in the payload. There are certain fields that are required irrespective of the hierarchy level, while there are a few which depend on other hierarchy configurations. After this is completed, business level validation will be carried out on the input information. 

There is a separate batch process to read the information that is present in the pending merchandise hierarchy table and create the merchandise hierarchy information in Merchandising on the effective date.

Service Type

POST

ReST URL
MerchIntegrations/services/merchandiseHierarchy/reclassification/create
Availability During Nightly Batch Cycle

This service will not be available during total duration of nightly batch run cycle.

Input Payload Details

Table 5-736 Create - Object. See list of elements for detail

Element Name Required Data Type Description

hierarchyLevel

Yes

String (1)

Indicates the level of the merchandise hierarchy. Valid values are V (division), G (group), D (department), C (class), and S (subclass).

hierarchyId

Yes

Number (4)

Contains the merchandise hierarchy ID.

parentHierarchyId

No

Number (4)

The parent of the hierarchy identified in the hierarchyId field. This field is optional when hierarchyLevel is V (Division). For a Division, if parent is provided, it must be Company.

grandparentHierarchyId

No

Number (4)

The grandparent of the hierarchy identified in the hierarchyId field. This field will only be used when the hierarchyLevel indicates subclass. It will contain the number of the department the subclass belongs to.

hierarchyName

Yes

String (120)

The name of the hierarchy value.

effectiveDate

Yes

date

The date the hierarchy change will become effective.

actionType

No

String (1)

Indicates if this field is an addition or modification. Valid values are A and M. It is required on a create message and should not be populated on a modify message.

buyer

No

Number (4)

The number of the buyer associated with the entity. This value must be predefined on the BUYER table. This field should only hold a value if the hierarchy level indicates division, group, or department.

purchaseType

No

Number (1)

The code which indicates whether items in the department are normal merchandise (0) or consignment stock (1). This field will only be used if the hierarchy level indicates department.

totalMarketAmount

No

Number (24,4)

The total market amount that is expected for the entity. This field will only be used if the hierarchy value indicates division or department.

merchandiser

No

Number (4)

The number of the merchandiser associated with the entity. This value must be predefined on the MERCHANT table. This field should hold a value only if the hierarchy level indicates division, group, or department.

budgetedMarkupPercent

No

Number (12,4)

The budgeted markup percentage. The markup percent of cost. This field will only be used if the hierarchy level indicates department.

profitCalcType

No

Number (1)

The number which indicates whether profit will be calculated by direct cost (1) or retail inventory (2). This field will only be used if the hierarchy level indicates department.

markupCalcType

No

String (2)

The code letter which indicates how markup is calculated in the department. This field will only be used if the hierarchy level indicates department. Valid values are C (cost) and R (retail).

otbCalcType

No

String (1)

The code letter which indicates how OTB is calculated in the department. Valid values are cost (C) and retail (R). This field will only be used if the hierarchy value indicates department.

maximumAverageCounter

No

Number (5)

The maximum count of days with acceptable data to include in an average for items with the department. This field will only be used if the hierarchy level indicates department. It is required if RPM is installed.

averageTolerancePercent

No

Number (12,4)

The tolerance percentage value used in averaging for items within this value. This column will hold 70% as 70, not. 70. This field will only be used if the hierarchy value indicates department. It is required if RPM is installed.

budgetedIntakePercent

No

Number (12,4)

The budgeted intake percentage. The percent of the total take that is income. This field will only be used if the hierarchy value indicates department.

deptVatIncludeInd

No

String (1)

Indicates the default value for the class VAT indicator. When classes are initially set up they will inherit this value. This field will only be populated when the hierarchy level indicates department.

classVatInd

No

String (1)

Indicates if retail is displayed and held with or without VAT for items within a class. Valid values are Y (yes) and N (no). This field will only be used if the hierarchy level indicates class.

Sample Input Message

{
  "hierarchyLevel": "D",
  "hierarchyId": 100,
  "parentHierarchyId": 108,
  "grandparentHierarchyId": 1000,
  "hierarchyName": "Dept 100 MrchRcls Action New",
  "effectiveDate": null,
  "actionType": "A",
  "buyer": 305,
  "purchaseType": 0,
  "totalMarketAmount": 3,
  "merchandiser": 601,
  "budgetedMarkupPercent": 3,
  "profitCalcType": 1,
  "markupCalcType": "C",
  "otbCalcType": "C",
  "maximumAverageCounter": 10000,
  "averageTolerancePercent": 3,
  "budgetedIntakePercent": 15.00,
  "deptVatIncludeInd": "Y",
  "classVatInd": null
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}
Delete Merchandise Hierarchy Reclassification
Functional Area

Merchandise Hierarchy - Reclassification

Business Overview

This service allows for pending merchandise hierarchy reclassification events to be deleted in Merchandising. Prior to deleting a previously created reclassification event, the existence of any related child reclassification records will be checked and the necessary validations will be executed to ensure there are no conflicts.

Service Type

DELETE

ReST URL
MerchIntegrations/services/merchandiseHierarchy/reclassification/delete
Availability During Nightly Batch Cycle

This service will not be available during total duration of nightly batch run cycle.

Input Payload Details

Table 5-737 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

hierarchyLevel

Yes

String (1)

Indicates the level of the merchandise hierarchy. Valid values are V (division), G (group), D (department), C (class), and S (subclass).

hierarchyId

Yes

Number (4)

Contains the merchandise hierarchy ID.

parentHierarchyId

No

Number (4)

The parent of the hierarchy identified in the hierarchyId field.

grandparentHierarchyId

No

Number (4)

The grandparent of the hierarchy identified in the hierarchyId field. This column will only be populated if the hierarchyLevel = subclass. In this case, the column will contain the dept number.

Sample Input Message

{
  "hierarchyLevel": "D",
  "hierarchyId": 100,
  "parentHierarchyId": 108,
  "grandparentHierarchyId": 1000
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}
Update Merchandise Hierarchy Reclassification
Functional Area

Merchandise Hierarchy - Reclassification

Business Overview

This service allows for pending merchandise hierarchy reclassification events to be modified in Merchandising. In order to update a previously created reclassification, the hierarchy type must be already present in Merchandising. While updating the effective date of a reclassification that involves an addition, there should not be any child hierarchy addition with an earlier effective date. For example, if you are adding a department within Merchandising on a given date, there cannot be a reclassification event for adding a class within the department with an earlier effective date.

Service Type

PUT

ReST URL
MerchIntegrations/services/merchandiseHierarchy/reclassification/update
Availability During Nightly Batch Cycle

This service will not be available during total duration of nightly batch run cycle.

Input Payload Details

Table 5-738 Update - Object. See list of elements for detail

Element Name Required Data Type Description

hierarchyLevel

Yes

String (1)

Indicates the level of the merchandise hierarchy. Valid values are V (division), G (group), D (department), C (class), and S (subclass).

hierarchyId

Yes

Number (4)

Contains the merchandise hierarchy ID.

parentHierarchyId

No

Number (4)

The parent of the hierarchy identified in the hierarchyId field. This field is optional when hierarchyLevel is V (Division). For a Division, if parent is provided, it must be Company.

grandparentHierarchyId

No

Number (4)

The grandparent of the hierarchy identified in the hierarchyId field. This field will only be used when the hierarchyLevel indicates subclass. It will contain the number of the department the subclass belongs to.

hierarchyName

Yes

String (120)

The name of the hierarchy value.

effectiveDate

Yes

date

The date the hierarchy change will become effective.

buyer

No

Number (4)

The number of the buyer associated with the entity. This value must be predefined on the BUYER table. This field should only hold a value if the hierarchy level indicates division, group, or department.

purchaseType

No

Number (1)

The code which indicates whether items in the department are normal merchandise (0) or consignment stock (1). This field will only be used if the hierarchy level indicates department.

totalMarketAmount

No

Number (24,4)

The total market amount that is expected for the entity. This field will only be used if the hierarchy value indicates division or department.

merchandiser

No

Number (4)

The number of the merchandiser associated with the entity. This value must be predefined on the MERCHANT table. This field should hold a value only if the hierarchy level indicates division, group, or department.

budgetedMarkupPercent

No

Number (12,4)

The budgeted markup percentage. The markup percent of cost. This field will only be used if the hierarchy level indicates department.

profitCalcType

No

Number (1)

The number which indicates whether profit will be calculated by direct cost (1) or retail inventory (2). This field will only be used if the hierarchy level indicates department.

markupCalcType

No

String (2)

The code letter which indicates how markup is calculated in the department. This field will only be used if the hierarchy level indicates department. Valid values are C (cost) and R (retail).

otbCalcType

No

String (1)

The code letter which indicates how OTB is calculated in the department. Valid values are cost (C) and retail (R). This field will only be used if the hierarchy value indicates department.

maximumAverageCounter

No

Number (5)

The maximum count of days with acceptable data to include in an average for items with the department. This field will only be used if the hierarchy level indicates department. It is required if RPM is installed.

averageTolerancePercent

No

Number (12,4)

The tolerance percentage value used in averaging for items within this value. This column will hold 70% as 70, not. 70. This field will only be used if the hierarchy value indicates department. It is required if RPM is installed.

budgetedIntakePercent

No

Number (12,4)

The budgeted intake percentage. The percent of the total take that is income. This field will only be used if the hierarchy value indicates department.

deptVatIncludeInd

No

String (1)

Indicates the default value for the class VAT indicator. When classes are initially set up they will inherit this value. This field will only be populated when the hierarchy level indicates department.

classVatInd

No

String (1)

Indicates if retail is displayed and held with or without VAT for items within a class. Valid values are Y (yes) and N (no). This field will only be used if the hierarchy level indicates class.

Sample Input Message

{
  "hierarchyLevel": "D",
  "hierarchyId": 100,
  "parentHierarchyId": 108,
  "grandparentHierarchyId": 1000,
  "hierarchyName": "merchHierName",
  "effectiveDate": "2001-12-31",
  "buyer": 1000,
  "purchaseType": 1,
  "totalMarketAmount": 3,
  "merchandiser": 1000,
  "budgetedMarkupPercent": 3,
  "profitCalcType": 1,
  "markupCalcType": "C",
  "otbCalcType": "C",
  "maximumAverageCounter": 10000,
  "averageTolerancePercent": 3,
  "budgetedIntakePercent": 15.00,
  "deptVatIncludeInd": "Y",
  "classVatInd": null
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}