|
| 1 | +#%RAML 1.0 Library |
| 2 | +usage: Business Unit import types. |
| 3 | +(annotations.package): business-units |
| 4 | + |
| 5 | +uses: |
| 6 | + common: common.raml |
| 7 | + custom-field: custom-field.raml |
| 8 | + annotations: ../annotationTypes/annotations.raml |
| 9 | + |
| 10 | +types: |
| 11 | + AssociateRoleInheritanceMode: |
| 12 | + description: | |
| 13 | + Determines whether the AssociateRoleAssignment can be inherited by child Business Units. |
| 14 | + type: string |
| 15 | + enum: [Enabled, Disabled] |
| 16 | + |
| 17 | + BusinessUnitStatus: |
| 18 | + description: Indicates whether the Business Unit can be used. |
| 19 | + type: string |
| 20 | + enum: [Active, Inactive] |
| 21 | + |
| 22 | + BusinessUnitAssociateMode: |
| 23 | + enum: |
| 24 | + - Explicit |
| 25 | + - ExplicitAndFromParent |
| 26 | + (annotations.enumDescriptions): |
| 27 | + Explicit: | |
| 28 | + All Associates of a Business Unit must be explicitly assigned. The Business Unit cannot inherit Associates from a parent. |
| 29 | + ExplicitAndFromParent: | |
| 30 | + Associates of a Business Unit can be assigned explicitly and inherited from a parent. |
| 31 | + default: ExplicitAndFromParent |
| 32 | + |
| 33 | + BusinessUnitApprovalRuleMode: |
| 34 | + description: | |
| 35 | + Determines whether a Business Unit can inherit [Approval Rules](/projects/approval-rules) from a parent. Only Business Units of type `Division` can use `ExplicitAndFromParent`. |
| 36 | + enum: |
| 37 | + - Explicit |
| 38 | + - ExplicitAndFromParent |
| 39 | + (annotations.enumDescriptions): |
| 40 | + Explicit: | |
| 41 | + Approval Rules of a Business Unit must be explicitly assigned. The Business Unit cannot inherit Approval Rules from a parent. |
| 42 | + ExplicitAndFromParent: | |
| 43 | + Approval Rules of a Business Unit are inherited from a parent and can also be explicitly assigned. |
| 44 | +
|
| 45 | + BusinessUnitStoreMode: |
| 46 | + type: string |
| 47 | + description: | |
| 48 | + Defines whether the Stores of the Business Unit are set directly on the Business Unit or are inherited from its parent unit. |
| 49 | + enum: |
| 50 | + - Explicit |
| 51 | + - FromParent |
| 52 | + (annotations.enumDescriptions): |
| 53 | + Explicit: | |
| 54 | + Stores are defined on the Business Unit. |
| 55 | + FromParent: | |
| 56 | + Stores are inherited from the closest parent in the hierarchy that has Stores defined. |
| 57 | +
|
| 58 | + BusinessUnitType: |
| 59 | + description: Defines the type of the Business Unit. |
| 60 | + type: string |
| 61 | + enum: [Company, Division] |
| 62 | + |
| 63 | + AssociateRoleAssignmentDraft: |
| 64 | + description: The role of an Associate in a Business Unit. |
| 65 | + properties: |
| 66 | + associateRole: |
| 67 | + type: common.AssociateRoleKeyReference |
| 68 | + description: The role to assign to the Associate. |
| 69 | + inheritance: |
| 70 | + type: AssociateRoleInheritanceMode |
| 71 | + description: | |
| 72 | + Determines whether the AssociateRole is inherited. If `Disabled`, the AssociateRole is not inherited from a parent Business Unit. |
| 73 | +
|
| 74 | + AssociateDraft: |
| 75 | + description: Draft for an Associate in a Business Unit. |
| 76 | + properties: |
| 77 | + customer: |
| 78 | + type: common.CustomerKeyReference |
| 79 | + description: The Customer to be part of the Business Unit. |
| 80 | + associateRoleAssignments: |
| 81 | + type: AssociateRoleAssignmentDraft[] |
| 82 | + description: The roles to assign to the Associate. |
| 83 | + |
| 84 | + BusinessUnitImport: |
| 85 | + description: | |
| 86 | + Represents the data used to import a BusinessUnit. Can be of type [Company](ctp:api:type:Company) or [Division](ctp:api:type:Division). |
| 87 | + type: object |
| 88 | + discriminator: unitType |
| 89 | + properties: |
| 90 | + unitType: |
| 91 | + type: BusinessUnitType |
| 92 | + description: The type of Business Unit. |
| 93 | + key: |
| 94 | + type: string |
| 95 | + description: User-defined unique identifier. If a [BusinessUnit](ctp:api:type:BusinessUnit) with this `key` exists, it is updated with the imported data. |
| 96 | + pattern: ^[A-Za-z0-9_-]+$ |
| 97 | + minLength: 2 |
| 98 | + maxLength: 256 |
| 99 | + name: |
| 100 | + type: string |
| 101 | + description: The name of the Business Unit. |
| 102 | + status?: |
| 103 | + type: BusinessUnitStatus |
| 104 | + description: The status of the Business Unit. |
| 105 | + contactEmail?: |
| 106 | + type: string |
| 107 | + description: The contact email address for the Business Unit. |
| 108 | + associates?: |
| 109 | + type: AssociateDraft[] |
| 110 | + description: List of Associates to be assigned to the Business Unit. |
| 111 | + addresses?: |
| 112 | + type: common.Address[] |
| 113 | + description: The addresses for the Business Unit. |
| 114 | + shippingAddresses?: |
| 115 | + type: integer[] |
| 116 | + description: | |
| 117 | + The indices of the shipping addresses in the `addresses` array. |
| 118 | + defaultShippingAddress?: |
| 119 | + type: integer |
| 120 | + description: | |
| 121 | + The index of the default shipping address in the `addresses` array. |
| 122 | + billingAddresses?: |
| 123 | + type: integer[] |
| 124 | + description: | |
| 125 | + The indices of the billing addresses in the `addresses` array. |
| 126 | + defaultBillingAddress?: |
| 127 | + type: integer |
| 128 | + description: | |
| 129 | + The index of the default billing address in the `addresses` array. |
| 130 | + stores?: |
| 131 | + type: common.StoreKeyReference[] |
| 132 | + description: The Stores of the Business Unit. |
| 133 | + custom?: |
| 134 | + type: custom-field.Custom |
| 135 | + description: Custom fields for the Business Unit. |
| 136 | + |
| 137 | + CompanyBusinessUnitImport: |
| 138 | + description: Represents a [Company](ctp:api:type:Company), the top-level of a business. |
| 139 | + type: BusinessUnitImport |
| 140 | + example: !include ../examples/business-units-company-import.json |
| 141 | + discriminatorValue: Company |
| 142 | + properties: |
| 143 | + storeMode?: |
| 144 | + type: BusinessUnitStoreMode |
| 145 | + default: Explicit |
| 146 | + |
| 147 | + DivisionBusinessUnitImport: |
| 148 | + description: Represents a [Division](ctp:api:type:Division), a sub-unit of a [Company](ctp:api:type:Company) or another Division. |
| 149 | + type: BusinessUnitImport |
| 150 | + example: !include ../examples/business-units-division-import.json |
| 151 | + discriminatorValue: Division |
| 152 | + properties: |
| 153 | + storeMode?: |
| 154 | + type: BusinessUnitStoreMode |
| 155 | + default: FromParent |
| 156 | + description: | |
| 157 | + If `Explicit`, the `stores` field cannot be empty and the Business Unit is explicitly associated with the given Stores. If `FromParent`, the Business Unit inherits the Stores from its parent. |
| 158 | + parentUnit: |
| 159 | + type: common.BusinessUnitKeyReference |
| 160 | + description: The parent Business Unit of this Division. |
| 161 | + associateMode?: |
| 162 | + type: BusinessUnitAssociateMode |
| 163 | + default: ExplicitAndFromParent |
| 164 | + description: | |
| 165 | + If `Explicit`, Associates are not inherited from the parent. If `ExplicitAndFromParent`, Associates are inherited from the parent. |
| 166 | + approvalRuleMode?: |
| 167 | + type: BusinessUnitApprovalRuleMode |
| 168 | + default: ExplicitAndFromParent |
| 169 | + description: | |
| 170 | + If `Explicit`, approval rules are not inherited from the parent. If `ExplicitAndFromParent`, approval rules are inherited from the parent. |
0 commit comments