update site based Organization properties
post
/ccadmin/v1/organizations/{id}/updateSiteOrganizationProperties
This operation is used to create/update site based organization proeprties in Oracle Commerce Cloud for a customer.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The ID of the Organization for which site based properties has to be updated.
Body Parameter
Root Schema : updateSiteOrganizationProperties_request
{
"siteOrganizationProperties":[
{
"site":{
"id":"site1"
},
"properties":{
"op":"remove",
"contract":null
}
},
{
"site":{
"id":"site2"
},
"properties":{
"approvalRequired":false,
"contract":{
"catalogId":"cloudCatalog",
"priceListGroupId":"defaultPriceGroup",
"displayName":"Us Motor Works Contract",
"description":"This is a written or spoken agreement, especially one concerning employment, sales, or tenancy, that is intended to be enforceable by law.",
"contract_terms":{
"terms":"All copyright, trade marks, design rights, patents and other intellectual property rights (registered and unregistered) belong to Us Motor Works Contract"
},
"externalContractReference":"UMWCUS001"
},
"delegateApprovalManagement":false,
"useExternalApprovalWebhook":false,
"orderPriceLimit":null
}
}
]
}
- siteOrganizationProperties
-
Type:
array
siteOrganizationPropertiesRequired:true
Additional Properties Allowed:Site Organizaiton properties
Nested Schema : siteOrganizationProperties
Nested Schema : items
Type:
object
- properties
-
Type:
object
propertiesRequired:true
Additional Properties Allowed:site based properties information - site
-
Type:
object
siteRequired:true
Additional Properties Allowed:site information
Nested Schema : properties
Type:
object
site based properties information
- approvalRequired
-
Type:
boolean
Approval flag is required for the organization, by default it is set to false - contract
-
Type:
object
contractRequired:true
Additional Properties Allowed:Contract Info - delegateApprovalManagement
-
Type:
boolean
This flag indicates if the delegated admin has the provision of approval management, if set merchant admin cannot do any approval management. - op
-
Type:
string
A OP code parameter used to remove inheritance for a property, the supported value is 'remove'. If this op code is given and properties field has a some property like contract or orderPriceLimit then it will remove inheritance for that property (if exists), it will set NULL if no inheritance is found. - orderPriceLimit
-
Type:
number
Its order limit value for the organization, if order limit is more than this value then approval is needed for the order - useExternalApprovalWebhook
-
Type:
boolean
Flag to enable/disable Order Approval check from External Webhook
Nested Schema : site
Type:
object
site information
- id
-
Type:
string
Required:true
Id of the Site for which mapping is to be created/updated
Nested Schema : contract
Type:
object
Contract Info
- catalogId
-
Type:
string
Required:true
Catalog Id of the contract associated with account - contract_terms
-
Type:
object
contract_termsAdditional Properties Allowed:Terms & Conditions for contract - description
-
Type:
string
Description for contract - displayName
-
Type:
string
Required:true
Display name for contract - externalContractReference
-
Type:
string
External contract reference - priceListGroupId
-
Type:
string
Required:true
Price list group Id associated with account
Nested Schema : contract_terms
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateSiteOrganizationProperties_response
- siteOrganizationProperties
-
Type:
array
siteOrganizationPropertiesAdditional Properties Allowed:Site Organizaiton properties
Nested Schema : siteOrganizationProperties
Nested Schema : items
Type:
object
- properties
-
Type:
object
propertiesAdditional Properties Allowed:site based properties information - site
-
Type:
object
siteAdditional Properties Allowed:site information
Nested Schema : properties
Type:
object
site based properties information
- approvalRequired
-
Type:
boolean
Approval flag is required for the organization, by default it is set to false - contract
-
Type:
object
contractAdditional Properties Allowed:Contract Info - delegateApprovalManagement
-
Type:
boolean
This flag indicates if the delegated admin has the provision of approval management, if set merchant admin cannot do any approval management. - orderPriceLimit
-
Type:
number
Its order limit value for the organization, if order limit is more than this value then approval is needed for the order - useExternalApprovalWebhook
-
Type:
boolean
Flag to enable/disable Order Approval check from External Webhook
Nested Schema : site
Type:
object
site information
- enabled
-
Type:
boolean
The enabled flag for the site - id
-
Type:
string
The id for Site - name
-
Type:
string
The name for the site - productionURL
-
Type:
string
The production url of the site
Nested Schema : contract
Type:
object
Contract Info
- catalogId
-
Type:
string
Catalog Id of the contract associated with account - contract_terms
-
Type:
object
contract_termsAdditional Properties Allowed:Terms & Conditions for contract - description
-
Type:
string
Description for contract - displayName
-
Type:
string
Display name for contract - externalContractReference
-
Type:
string
External contract reference - priceListGroupId
-
Type:
string
Price list group Id associated with account - repositoryId
-
Type:
string
Repository Id of the contract
Nested Schema : contract_terms
Example application/json
{
"siteOrganizationProperties":[
{
"site":{
"productionURL":null,
"name":"Site 2",
"id":"site2",
"enabled":false
},
"properties":{
"approvalRequired":false,
"contract":{
"catalogId":"cloudCatalog",
"priceListGroupId":"defaultPriceGroup",
"displayName":"Us Motor Works Contract",
"repositoryId":100001,
"description":"This is a written or spoken agreement, especially one concerning employment, sales, or tenancy, that is intended to be enforceable by law.",
"contract_terms":{
"terms":"All copyright, trade marks, design rights, patents and other intellectual property rights (registered and unregistered) belong to Us Motor Works Contract"
},
"externalContractReference":"UMWCUS001"
},
"delegateApprovalManagement":false,
"useExternalApprovalWebhook":false,
"orderPriceLimit":null
}
}
]
}
Default Response
The error response.
100064 : If the catalog id is invalid
100073 : If the catalog id is required
100074 :If the pricelist group id is required
100075 : If external reference number is invalid
100082 : The current account does not have the delegate approval management option enabled. Requiring order approvals or making changes to purchase limits cannot be done.
100083 : You must create at least one active approver for the account before you can enable the approval required option
100086 : Merchant admin is not allowed to do approval management with delegate approval management set to true.
100105 : Error while fetching site account properties
100108 : Invalid organization id for fetching site account properties
100109 : The site id entered is a non b2b site
100110 : Invalid values for site based organization properties
100111 : Internal error occurred while updating site based organization properties
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Request:
{"siteOrganizationProperties": [ { "site": {"id": "site1"}, "properties": { "op": "remove", "contract": null } }, { "site": {"id": "site2"}, "properties": { "approvalRequired": false, "contract": { "catalogId": "cloudCatalog", "priceListGroupId": "defaultPriceGroup", "displayName": "Us Motor Works Contract", "description": "This is a written or spoken agreement, especially one concerning employment, sales, or tenancy, that is intended to be enforceable by law.", "contract_terms": {"terms": "All copyright, trade marks, design rights, patents and other intellectual property rights (registered and unregistered) belong to Us Motor Works Contract"}, "externalContractReference": "UMWCUS001" }, "delegateApprovalManagement": false, "useExternalApprovalWebhook": false, "orderPriceLimit": null } } ]}
Sample Response Payload returned by endpoint:
{"siteOrganizationProperties": [{ "site": { "productionURL": null, "name": "Site 2", "id": "site2", "enabled": false }, "properties": { "approvalRequired": false, "contract": { "catalogId": "cloudCatalog", "priceListGroupId": "defaultPriceGroup", "displayName": "Us Motor Works Contract", "repositoryId": 100001, "description": "This is a written or spoken agreement, especially one concerning employment, sales, or tenancy, that is intended to be enforceable by law.", "contract_terms": {"terms": "All copyright, trade marks, design rights, patents and other intellectual property rights (registered and unregistered) belong to Us Motor Works Contract"}, "externalContractReference": "UMWCUS001" }, "delegateApprovalManagement": false, "useExternalApprovalWebhook": false, "orderPriceLimit": null } }]}