Corporate Rules

Functional Area

Allocations

Business Overview

This service provides the ability to create, modify, and delete corporate rules within Allocation CS.

Service Type

POST

REST URL

/MerchIntegrations/services/alloc/foundation/corporateRules/manage

Roles Allowed

ALLOCATION_APPLICATION_ADMINISTRATOR_JOB, rgbu:merch:system

Request Headers

Accept:  <application/json or application/xml>
Accept-Language: <locale>
Content-Type: <application/json or application/xml>

For Example:

Accept:  application/json
Accept-Language: en-US
Content-Type: application/json

URL Query Parameters

N/A

Input Payload Details

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

Entity Element Name Required Data Type Description
collectionSize

Yes

Integer Collection of corporate rule details.
items action

Yes

String Contains the intended action for the corporate rule. Valid values are CREATE, UPDATE and DELETE.
items corporateRuleId No Integer Corporate rule identifier.
items

corporateRuleName

Yes String Corporate rule name.
items netNeedIndicator

Yes

String Specifies if the need quantity corresponding to the corporate rule is the Net Need (Y) or Gross Need (N).
items details

Yes

List Details of the corporate rule. At least one detail item is mandatory for header action CREATE, otherwise it is ignored.
items/details location Yes String Location identifier
items/details dept

No

String

Department identifier

items/details

class

No

String Class identifier
items/details

subclass

No

String Subclass identifier
items/details

item

No

String Item identifier
items/details

diff1

No

String Differentiator ID that is used to distinguish the item from its parent. For an item that is a parent, this field will contain the first differentiator ID.
items/details diff2

No

String Differentiator ID that is used to distinguish the item from its parent. For an item that is a parent, this field will contain the second differentiator ID.
items/details diff3

No

String Differentiator ID that is used to distinguish the item from its parent. For an item that is a parent, this field will contain the third differentiator ID.
items/details diff4

No

String Differentiator ID that is used to distinguish the item from its parent. For an item that is a parent, this field will contain the fourth differentiator ID.
items/details needQuantity

Yes

String The need quantity for the specified hierarchy location combination.

Note:

In the ‘details’ section, you need to provide one of the following parameters (depending on the level at which the rule will apply for the specified location) –

  • Department
  • Class
  • Subclass
  • Parent/Diff
  • SKU

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "action": “CREATE”,
      "corporateRuleId": 1001,
      "corporateRuleName": "Spring 2025 Men's Casuals",
      "netNeedIndicator": “Y”,
      "details": [
        {
          "location": 1121,
          "dept": 1111,
          "class": null,
          "subclass": null,
          "item": null,
          "diff1": null,
          "diff2": null,
          "diff3": null,
          "diff4": null,
          "needQuantity": 1500
        }
      ]
    }
  ]
}

Response Code: 200 (Success)

Sample Response Message

{
  "message": "SUCCESS",
  "items": [
    {
      "corporateRuleId": 1001,
      "corporateRuleName": "Spring 2025 Men’s Casuals"
    }
  ]
}

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": "NET_NEED_IND must be Y or N."
}