createAppeasement
post
/ccagent/v1/appeasements
Create an Appeasement. If an Id is provided in the payload and it exists in the system do not proceed or else create an appeasement
Request
Supported Media Types
- application/json
Header Parameters
-
X-CCAsset-Language(optional): string
The asset language of the request. E.g., en,de,fr_CA.
-
X-CCOrganization(optional): string
The organization Id on which the appeasement is being submitted.
-
X-CCSite(optional): string
The site Id on which the appeasement is being submitted.
Root Schema : createAppeasement_request
Type:
Show Source
object
-
agentId(optional):
string
Id of the agent who is creating appeasement. It is an optional property.
-
appeasementRefunds(optional):
array appeasementRefunds
Array of appeasement Refunds represents the list of payment instrument details that we want to use for giving the appeasement.
-
comments(optional):
array comments
Array of comments given on an appeasement.
-
creationDate(optional):
string
Date and timestamp when the appeseasement is created.
-
id(optional):
string
Appeasement ID of the appeasement to be created. By default, a system generated appeasement id will be considered, if not provided explicitly.
-
notes(optional):
string
Notes to describe the appeasement.
-
orderId(optional):
string
Id of the order, to which appeasement is associated. OrderId is required only in case of certain appeaesement types which are configured to mandate order as required.
-
originOfAppeasement(optional):
string
Origin of appeasement signifies the channel of appeasement creation. By default, it is "external".
-
profileId(optional):
string
Id of the user, to whom appeasement is given. It can be any valid string.
-
reason:
string
Reason to create appeasement, among the configured appeasement reason in the system.
-
state(optional):
string
Current state of the appeasement. It is among the predefined appeasement states. By default, it is "INCOMPLETE".
-
type:
string
Type of appeasement, among the configured appeasement type in the system.
Example:
{
"reason":"incorrectItem",
"agentId":"service",
"notes":"Providing an appeasement of 20 USD which is 20% of the Order Total, according to the appeasement policy.",
"comments":[
{
"agentId":"AgentBob",
"comment":"Appeasement to be settled on priority. Valued customer.",
"creationDate":"2020-03-20T04:56:13.935Z"
}
],
"orderId":"o1234",
"appeasementRefunds":[
{
"paymentGroupId":"pg1001",
"refundType":"externalRefund",
"amount":20,
"id":"ar1234",
"state":"COMPLETE",
"currencyCode":"USD"
}
],
"profileId":"se-570031",
"id":"app1234",
"state":"SUBMITTED",
"type":"order"
}
Nested Schema : appeasementRefunds
Type:
array
Array of appeasement Refunds represents the list of payment instrument details that we want to use for giving the appeasement.
Show Source
-
Array of:
object items
Properties of the appeasement refund.
Nested Schema : comments
Type:
array
Array of comments given on an appeasement.
Show Source
-
Array of:
object items
Properties of the comments
Nested Schema : items
Type:
object
Properties of the appeasement refund.
Show Source
-
amount(optional):
number
Appeasement refund amount to be given to the customer.
-
currencyCode(optional):
string
Currency code for the appeasement refund amount.
-
id(optional):
string
Id of the Appeasement refund to be created. By default, a system generated id will be considered, if not provided explicitly.
-
paymentGroupId(optional):
string
Payment group id associated to order, to which appeasement is to be issued. It is a required property for out-of-the-box refund type.
-
refundType:
string
Type of appeasement refund, among the predefined appeasement refund types.
-
state(optional):
string
Current state of the appeasement refund. It is among the predefined appeasement refund states. By default, it is "INCOMPLETE".
Nested Schema : items
Type:
object
Properties of the comments
Show Source
-
agentId(optional):
string
Agent who saved the comment.
-
comment:
string
Comment text.
-
creationDate(optional):
string
Date and timestamp of the comment. If creation date is not provided in the input, system date will be considered by default.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createAppeasement_response
Type:
Show Source
object
-
agentId(optional):
string
Id of the agent who created the appeasement.
-
appeasementRefunds(optional):
array appeasementRefunds
Array of appeasement Refunds represents the list of payment instrument details that we want to use for giving the appeasement.
-
comments(optional):
array comments
Array of comments given on an appeasement.
-
creationDate(optional):
string
Date and timestamp when the appeseasement is created.
-
id(optional):
string
Id of the appeasement.
-
lastModifiedDate(optional):
string
Date and timestamp when the appeseasement is modified recently.
-
notes(optional):
string
Notes to describe the appeasement.
-
orderId(optional):
string
Id of the order, to which appeasement is given.
-
originOfAppeasement(optional):
string
Origin of appeasement signifies the channel of appeasement created.
-
profileId(optional):
string
Id of the user, to whom appeasement is given.
-
reason(optional):
string
Reason for the appeasement, among the configured appeasement reason in the system.
-
state(optional):
string
Current state of the appeasement. It is among the predefined appeasement states.
-
submittedDate(optional):
string
Date and timestamp when the appeseasement is submitted.
-
type(optional):
string
Type of appeasement, among the configured appeasement type in the system.
Example:
{
"reason":"incorrectItem",
"agentId":"service",
"notes":"Providing an appeasement of 20 USD which is 20% of the Order Total, according to the appeasement policy.",
"comments":[
{
"agentId":"AgentBob",
"comment":"Appeasement to be settled on priority. Valued customer.",
"id":100001,
"creationDate":"2020-03-20T04:56:13.935Z"
}
],
"orderId":"o1234",
"appeasementRefunds":[
{
"paymentGroupId":"pg1001",
"refundType":"externalRefund",
"amount":20,
"id":"ar1234",
"state":"COMPLETE",
"currencyCode":"USD"
}
],
"lastModifiedDate":"2020-03-20T05:15:05.645Z",
"type":"order",
"creationDate":"2020-03-20T04:56:13.935Z",
"submittedDate":"2020-04-20T04:56:13.935Z",
"profileId":"se-570031",
"id":"app1234",
"state":"SUBMITTED",
"originOfAppeasement":"external"
}
Nested Schema : appeasementRefunds
Type:
array
Array of appeasement Refunds represents the list of payment instrument details that we want to use for giving the appeasement.
Show Source
-
Array of:
object items
Properties of the appeasemen refund.
Nested Schema : comments
Type:
array
Array of comments given on an appeasement.
Show Source
-
Array of:
object items
Properties of the comments
Nested Schema : items
Type:
object
Properties of the appeasemen refund.
Show Source
-
amount(optional):
number
Appeasement refund amount issued to the customer.
-
currencyCode(optional):
string
Currency code for the appeasement refund amount.
-
id(optional):
string
Id of the Appeasement refund associated to an appeasement.
-
paymentGroupId(optional):
string
Payment group id associated to order, to which appeasement is issued.
-
refundType(optional):
string
Type of appeasement refund, among the predefined appeasement refund types.
-
state(optional):
string
Current state of the appeasement refund. It is among the predefined appeasement refund states.
Nested Schema : items
Type:
object
Properties of the comments
Show Source
-
agentId(optional):
string
Agent who saved the comment.
-
comment(optional):
string
Comment text.
-
creationDate(optional):
string
Date and timestamp of the comment.
-
id(optional):
string
Id of the comment associated to the appeasement.
Default Response
The error response.
The following are the error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|900000|When an internal error occurs|
|13001|When the input is invalid|
|900015|When an internal error occurs with the appeasementValidation webhook|
|900016|When the appeasement is invalid according to the appeasementValidation webhook|
|900017|When the invalid refundType is passed for an appeasement refund|
|900001|If an internal error occurs with the repository|
|900002|When the given appeasement Id is invalid or not found|
|30014|SiteId passed in x-ccsite header is invalid or the site was deleted|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code