PUT api/v7/Hierarchies

Add or Update existing hierarchy.

Tables Impacted

Hierarchy, HierarchyDesc

Request Information

URI Parameters

None.

Body Parameters

the hierarchy information

HierarchyDto
NameDescriptionTypeRequired?Additional information
hierarchyCode *

Hiearchy Code

string

Yes

String length: between 1 and 14, inclusive

hierarchyLevelCode *

Hierarchy Level Code

string

Conditional

Conditionally required: HierarchyLevelCode is required if it is new hiearchy code.

String length: between 1 and 24, inclusive

description

Hierarchy Description

string

No

String length: between 1 and 128, inclusive

culture

Culture

string

No

String length: between 1 and 10, inclusive

parentHierarchyCode

Parent Hierarhcy Code

string

No

String length: between 1 and 14, inclusive

externalId

External Hierarchy ID

string

No

None.

taxClassCode

TaxClass Code for the hierarchy

string

No

String length: between 1 and 10, inclusive

taxTypeCodes

Hierarchy Tax Type

Collection of string

No

None.

salesCategoryCode

Sales Category Code for the hierarchy

string

No

String length: between 1 and 20, inclusive

maxAllowedQuantity

Maximum sales quantity allowed for any item under this Hierarchy

integer

No

None.

ubcRequired

Flag which indicates if UBC is required for item sold at hierarchy

boolean

No

None.

nonReturnable

Flag which represents if an item sold by hierarchy is returnable

boolean

No

None.

customerAuditDate

Last modified audit information

date

No

None.

Request Formats

application/json, text/json

Sample:
{
  "hierarchyCode": "51",
  "hierarchyLevelCode": "2",
  "description": "merch hier 1",
  "culture": "en-US",
  "parentHierarchyCode": "1",
  "externalId": "MERCH-1",
  "taxClassCode": "100200",
  "salesCategoryCode": "normal",
  "maxAllowedQuantity": 50,
  "ubcRequired": false,
  "nonReturnable": false,
  "customerAuditDate": "2018-01-01T00:00:00"
}

application/xml, text/xml

Sample:
<Hierarchy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <hierarchyCode>51</hierarchyCode>
  <hierarchyLevelCode>2</hierarchyLevelCode>
  <description>merch hier 1</description>
  <culture>en-US</culture>
  <parentHierarchyCode>1</parentHierarchyCode>
  <externalId>MERCH-1</externalId>
  <taxClassCode>100200</taxClassCode>
  <salesCategoryCode>normal</salesCategoryCode>
  <maxAllowedQuantity>50</maxAllowedQuantity>
  <ubcRequired>false</ubcRequired>
  <nonReturnable>false</nonReturnable>
  <customerAuditDate>2018-01-01T00:00:00</customerAuditDate>
</Hierarchy>

Response Information

Resource Description

Returns a HTTPResponse Message stating the success/failure of API Action

HttpResponseMessage
NameDescriptionType
Version

Version
Content

HttpContent
StatusCode

HttpStatusCode
ReasonPhrase

string
Headers

Collection of Object
RequestMessage

HttpRequestMessage
IsSuccessStatusCode

boolean