Create appeasement - Fabric
Create appeasement
cURL
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/order/appeasement \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '
{
"orderNumber": "123",
"userID": "12",
"source": "SFSC",
"appeasementType": "refund",
"customer": {
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "john@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"userId": "62272e917b12209e68751d94",
"accountId": "62272e917b12209e68751d94",
"employeeId": "62272e917b12209e68751d94",
"company": "fabric"
},
"appeasements": [
{
"value": 12.5,
"appeasementCounter": 1,
"reasonCode": "Late Delivery",
"subReasonCode": "subReasonCode",
"notes": "Any additional info",
"payments": [
{
"paymentCounter": 1,
"refundAmount": 40
}
]
}
],
"items": [
{
"lineItemId": "d538b1f1-0e45-43c6-bfc6-9666fc1188ca",
"appeasements": [
{
"value": 12.5,
"appeasementCounter": 1,
"reasonCode": "Late Delivery",
"subReasonCode": "subReasonCode",
"notes": "Any additional info",
"payments": [
{
"paymentCounter": 1,
"refundAmount": 40
}
]
}
]
}
]
}
'
Python Example
import requests
url = "https://prod01.oms.fabric.inc/api/v2/order/appeasement"
payload = {
"orderNumber": "123",
"userID": "12",
"source": "SFSC",
"appeasementType": "refund",
"customer": {
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "john@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"userId": "62272e917b12209e68751d94",
"accountId": "62272e917b12209e68751d94",
"employeeId": "62272e917b12209e68751d94",
"company": "fabric"
},
"appeasements": [
{
"value": 12.5,
"appeasementCounter": 1,
"reasonCode": "Late Delivery",
"subReasonCode": "subReasonCode",
"notes": "Any additional info",
"payments": [
{
"paymentCounter": 1,
"refundAmount": 40
}
]
}
],
"items": [
{
"lineItemId": "d538b1f1-0e45-43c6-bfc6-9666fc1188ca",
"appeasements": [
{
"value": 12.5,
"appeasementCounter": 1,
"reasonCode": "Late Delivery",
"subReasonCode": "subReasonCode",
"notes": "Any additional info",
"payments": [
{
"paymentCounter": 1,
"refundAmount": 40
}
]
}
]
}
]
}
headers = {
"x-site-context": "<x-site-context>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
... (Additional examples in Java, PHP, Go, etc.)
Response
200 - Success
{
"responseCode": "SUCCESS",
"responseMessage": "API Operation successfully completed",
"responseData": {
"orderNumber": "12",
"totalAmountRefunded": 25.5,
"channel": "12",
"tenant": "5f689caa4216e7000750d1ef"
}
}
Error Responses
- 400: Bad Request
{"message": "Bad Request"} - 404: Not Found
{"message": "Not Found"} - 500: Internal Server Error
{"message": "Internal Server Error"}
Authorizations
Authorization: Bearer authentication header of the formBearer <token>x-site-context: A JSON object containing information about the source.